@convex-dev/better-auth 0.8.0-alpha.9 → 0.8.1

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 (301) hide show
  1. package/dist/commonjs/auth.d.ts +4 -0
  2. package/dist/commonjs/auth.d.ts.map +1 -0
  3. package/dist/commonjs/auth.js +44 -0
  4. package/dist/commonjs/auth.js.map +1 -0
  5. package/dist/commonjs/client/adapter.d.ts +8 -10
  6. package/dist/commonjs/client/adapter.d.ts.map +1 -1
  7. package/dist/commonjs/client/adapter.js +48 -32
  8. package/dist/commonjs/client/adapter.js.map +1 -1
  9. package/dist/commonjs/client/adapterUtils.d.ts +66 -0
  10. package/dist/commonjs/client/adapterUtils.d.ts.map +1 -0
  11. package/dist/commonjs/client/adapterUtils.js +429 -0
  12. package/dist/commonjs/client/adapterUtils.js.map +1 -0
  13. package/dist/commonjs/client/createSchema.d.ts +24 -0
  14. package/dist/commonjs/client/createSchema.d.ts.map +1 -0
  15. package/dist/commonjs/client/createSchema.js +101 -0
  16. package/dist/commonjs/client/createSchema.js.map +1 -0
  17. package/dist/commonjs/client/index.d.ts +449 -601
  18. package/dist/commonjs/client/index.d.ts.map +1 -1
  19. package/dist/commonjs/client/index.js +337 -212
  20. package/dist/commonjs/client/index.js.map +1 -1
  21. package/dist/commonjs/component/adapter.d.ts +128 -0
  22. package/dist/commonjs/component/adapter.d.ts.map +1 -0
  23. package/dist/commonjs/component/adapter.js +5 -0
  24. package/dist/commonjs/component/adapter.js.map +1 -0
  25. package/dist/commonjs/component/adapterTest.d.ts +3 -5
  26. package/dist/commonjs/component/adapterTest.d.ts.map +1 -1
  27. package/dist/commonjs/component/adapterTest.js +3 -17
  28. package/dist/commonjs/component/adapterTest.js.map +1 -1
  29. package/dist/commonjs/component/schema.d.ts +451 -207
  30. package/dist/commonjs/component/schema.d.ts.map +1 -1
  31. package/dist/commonjs/component/schema.js +50 -177
  32. package/dist/commonjs/component/schema.js.map +1 -1
  33. package/dist/commonjs/component/util.d.ts.map +1 -1
  34. package/dist/commonjs/nextjs/index.d.ts +1 -2
  35. package/dist/commonjs/nextjs/index.d.ts.map +1 -1
  36. package/dist/commonjs/nextjs/index.js +3 -2
  37. package/dist/commonjs/nextjs/index.js.map +1 -1
  38. package/dist/commonjs/plugins/convex/client.d.ts +2 -5
  39. package/dist/commonjs/plugins/convex/client.d.ts.map +1 -1
  40. package/dist/commonjs/plugins/convex/client.js.map +1 -1
  41. package/dist/commonjs/plugins/convex/index.d.ts +7 -134
  42. package/dist/commonjs/plugins/convex/index.d.ts.map +1 -1
  43. package/dist/commonjs/plugins/convex/index.js +10 -125
  44. package/dist/commonjs/plugins/convex/index.js.map +1 -1
  45. package/dist/commonjs/plugins/cross-domain/index.js +2 -2
  46. package/dist/commonjs/plugins/cross-domain/index.js.map +1 -1
  47. package/dist/commonjs/react-start/index.d.ts +17 -36
  48. package/dist/commonjs/react-start/index.d.ts.map +1 -1
  49. package/dist/commonjs/react-start/index.js +42 -31
  50. package/dist/commonjs/react-start/index.js.map +1 -1
  51. package/dist/commonjs/src/auth.d.ts +3085 -0
  52. package/dist/commonjs/src/auth.d.ts.map +1 -0
  53. package/dist/commonjs/src/auth.js +72 -0
  54. package/dist/commonjs/src/auth.js.map +1 -0
  55. package/dist/commonjs/src/client/adapter.d.ts +18 -0
  56. package/dist/commonjs/src/client/adapter.d.ts.map +1 -0
  57. package/dist/commonjs/src/client/adapter.js +211 -0
  58. package/dist/commonjs/src/client/adapter.js.map +1 -0
  59. package/dist/commonjs/src/client/createSchema.d.ts +25 -0
  60. package/dist/commonjs/src/client/createSchema.d.ts.map +1 -0
  61. package/dist/commonjs/src/client/createSchema.js +103 -0
  62. package/dist/commonjs/src/client/createSchema.js.map +1 -0
  63. package/dist/commonjs/src/client/index.d.ts +3310 -0
  64. package/dist/commonjs/src/client/index.d.ts.map +1 -0
  65. package/dist/commonjs/src/client/index.js +377 -0
  66. package/dist/commonjs/src/client/index.js.map +1 -0
  67. package/dist/commonjs/src/client/plugins/index.d.ts +3 -0
  68. package/dist/commonjs/src/client/plugins/index.d.ts.map +1 -0
  69. package/dist/commonjs/src/client/plugins/index.js +3 -0
  70. package/dist/commonjs/src/client/plugins/index.js.map +1 -0
  71. package/dist/commonjs/src/component/_generated/api.d.ts +12 -0
  72. package/dist/commonjs/src/component/_generated/api.d.ts.map +1 -0
  73. package/dist/commonjs/src/component/_generated/api.js +22 -0
  74. package/dist/commonjs/src/component/_generated/api.js.map +1 -0
  75. package/dist/commonjs/src/component/_generated/server.d.ts +64 -0
  76. package/dist/commonjs/src/component/_generated/server.d.ts.map +1 -0
  77. package/dist/commonjs/src/component/_generated/server.js +74 -0
  78. package/dist/commonjs/src/component/_generated/server.js.map +1 -0
  79. package/dist/commonjs/src/component/adapter.d.ts +355 -0
  80. package/dist/commonjs/src/component/adapter.d.ts.map +1 -0
  81. package/dist/commonjs/src/component/adapter.js +573 -0
  82. package/dist/commonjs/src/component/adapter.js.map +1 -0
  83. package/dist/commonjs/src/component/adapterTest.d.ts +18 -0
  84. package/dist/commonjs/src/component/adapterTest.d.ts.map +1 -0
  85. package/dist/commonjs/src/component/adapterTest.js +75 -0
  86. package/dist/commonjs/src/component/adapterTest.js.map +1 -0
  87. package/dist/commonjs/src/component/convex.config.d.ts +3 -0
  88. package/dist/commonjs/src/component/convex.config.d.ts.map +1 -0
  89. package/dist/commonjs/src/component/convex.config.js +4 -0
  90. package/dist/commonjs/src/component/convex.config.js.map +1 -0
  91. package/dist/commonjs/src/component/schema.d.ts +562 -0
  92. package/dist/commonjs/src/component/schema.d.ts.map +1 -0
  93. package/dist/commonjs/src/component/schema.js +217 -0
  94. package/dist/commonjs/src/component/schema.js.map +1 -0
  95. package/dist/commonjs/src/nextjs/index.d.ts +10 -0
  96. package/dist/commonjs/src/nextjs/index.d.ts.map +1 -0
  97. package/dist/commonjs/src/nextjs/index.js +43 -0
  98. package/dist/commonjs/src/nextjs/index.js.map +1 -0
  99. package/dist/commonjs/src/plugins/convex/client.d.ts +9 -0
  100. package/dist/commonjs/src/plugins/convex/client.d.ts.map +1 -0
  101. package/dist/commonjs/src/plugins/convex/client.js +7 -0
  102. package/dist/commonjs/src/plugins/convex/client.js.map +1 -0
  103. package/dist/commonjs/src/plugins/convex/index.d.ts +415 -0
  104. package/dist/commonjs/src/plugins/convex/index.d.ts.map +1 -0
  105. package/dist/commonjs/src/plugins/convex/index.js +354 -0
  106. package/dist/commonjs/src/plugins/convex/index.js.map +1 -0
  107. package/dist/commonjs/src/plugins/cross-domain/client.d.ts +132 -0
  108. package/dist/commonjs/src/plugins/cross-domain/client.d.ts.map +1 -0
  109. package/dist/commonjs/src/plugins/cross-domain/client.js +176 -0
  110. package/dist/commonjs/src/plugins/cross-domain/client.js.map +1 -0
  111. package/dist/commonjs/src/plugins/cross-domain/index.d.ts +83 -0
  112. package/dist/commonjs/src/plugins/cross-domain/index.d.ts.map +1 -0
  113. package/dist/commonjs/src/plugins/cross-domain/index.js +153 -0
  114. package/dist/commonjs/src/plugins/cross-domain/index.js.map +1 -0
  115. package/dist/commonjs/src/plugins/index.d.ts +3 -0
  116. package/dist/commonjs/src/plugins/index.d.ts.map +1 -0
  117. package/dist/commonjs/src/plugins/index.js +3 -0
  118. package/dist/commonjs/src/plugins/index.js.map +1 -0
  119. package/dist/commonjs/src/react/client.d.ts +31 -0
  120. package/dist/commonjs/src/react/client.d.ts.map +1 -0
  121. package/dist/commonjs/src/react/client.js +96 -0
  122. package/dist/commonjs/src/react/client.js.map +1 -0
  123. package/dist/commonjs/src/react/index.d.ts +9 -0
  124. package/dist/commonjs/src/react/index.d.ts.map +1 -0
  125. package/dist/commonjs/src/react/index.js +15 -0
  126. package/dist/commonjs/src/react/index.js.map +1 -0
  127. package/dist/commonjs/src/react-start/index.d.ts +45 -0
  128. package/dist/commonjs/src/react-start/index.d.ts.map +1 -0
  129. package/dist/commonjs/src/react-start/index.js +60 -0
  130. package/dist/commonjs/src/react-start/index.js.map +1 -0
  131. package/dist/commonjs/src/utils/index.d.ts +9 -0
  132. package/dist/commonjs/src/utils/index.d.ts.map +1 -0
  133. package/dist/commonjs/src/utils/index.js +35 -0
  134. package/dist/commonjs/src/utils/index.js.map +1 -0
  135. package/dist/esm/auth.d.ts +4 -0
  136. package/dist/esm/auth.d.ts.map +1 -0
  137. package/dist/esm/auth.js +44 -0
  138. package/dist/esm/auth.js.map +1 -0
  139. package/dist/esm/client/adapter.d.ts +8 -10
  140. package/dist/esm/client/adapter.d.ts.map +1 -1
  141. package/dist/esm/client/adapter.js +48 -32
  142. package/dist/esm/client/adapter.js.map +1 -1
  143. package/dist/esm/client/adapterUtils.d.ts +66 -0
  144. package/dist/esm/client/adapterUtils.d.ts.map +1 -0
  145. package/dist/esm/client/adapterUtils.js +429 -0
  146. package/dist/esm/client/adapterUtils.js.map +1 -0
  147. package/dist/esm/client/createSchema.d.ts +24 -0
  148. package/dist/esm/client/createSchema.d.ts.map +1 -0
  149. package/dist/esm/client/createSchema.js +101 -0
  150. package/dist/esm/client/createSchema.js.map +1 -0
  151. package/dist/esm/client/index.d.ts +449 -601
  152. package/dist/esm/client/index.d.ts.map +1 -1
  153. package/dist/esm/client/index.js +337 -212
  154. package/dist/esm/client/index.js.map +1 -1
  155. package/dist/esm/component/adapter.d.ts +128 -0
  156. package/dist/esm/component/adapter.d.ts.map +1 -0
  157. package/dist/esm/component/adapter.js +5 -0
  158. package/dist/esm/component/adapter.js.map +1 -0
  159. package/dist/esm/component/adapterTest.d.ts +3 -5
  160. package/dist/esm/component/adapterTest.d.ts.map +1 -1
  161. package/dist/esm/component/adapterTest.js +3 -17
  162. package/dist/esm/component/adapterTest.js.map +1 -1
  163. package/dist/esm/component/schema.d.ts +451 -207
  164. package/dist/esm/component/schema.d.ts.map +1 -1
  165. package/dist/esm/component/schema.js +50 -177
  166. package/dist/esm/component/schema.js.map +1 -1
  167. package/dist/esm/component/util.d.ts.map +1 -1
  168. package/dist/esm/nextjs/index.d.ts +1 -2
  169. package/dist/esm/nextjs/index.d.ts.map +1 -1
  170. package/dist/esm/nextjs/index.js +3 -2
  171. package/dist/esm/nextjs/index.js.map +1 -1
  172. package/dist/esm/plugins/convex/client.d.ts +2 -5
  173. package/dist/esm/plugins/convex/client.d.ts.map +1 -1
  174. package/dist/esm/plugins/convex/client.js.map +1 -1
  175. package/dist/esm/plugins/convex/index.d.ts +7 -134
  176. package/dist/esm/plugins/convex/index.d.ts.map +1 -1
  177. package/dist/esm/plugins/convex/index.js +10 -125
  178. package/dist/esm/plugins/convex/index.js.map +1 -1
  179. package/dist/esm/plugins/cross-domain/index.js +2 -2
  180. package/dist/esm/plugins/cross-domain/index.js.map +1 -1
  181. package/dist/esm/react-start/index.d.ts +17 -36
  182. package/dist/esm/react-start/index.d.ts.map +1 -1
  183. package/dist/esm/react-start/index.js +42 -31
  184. package/dist/esm/react-start/index.js.map +1 -1
  185. package/dist/esm/src/auth.d.ts +3085 -0
  186. package/dist/esm/src/auth.d.ts.map +1 -0
  187. package/dist/esm/src/auth.js +72 -0
  188. package/dist/esm/src/auth.js.map +1 -0
  189. package/dist/esm/src/client/adapter.d.ts +18 -0
  190. package/dist/esm/src/client/adapter.d.ts.map +1 -0
  191. package/dist/esm/src/client/adapter.js +211 -0
  192. package/dist/esm/src/client/adapter.js.map +1 -0
  193. package/dist/esm/src/client/createSchema.d.ts +25 -0
  194. package/dist/esm/src/client/createSchema.d.ts.map +1 -0
  195. package/dist/esm/src/client/createSchema.js +103 -0
  196. package/dist/esm/src/client/createSchema.js.map +1 -0
  197. package/dist/esm/src/client/index.d.ts +3310 -0
  198. package/dist/esm/src/client/index.d.ts.map +1 -0
  199. package/dist/esm/src/client/index.js +377 -0
  200. package/dist/esm/src/client/index.js.map +1 -0
  201. package/dist/esm/src/client/plugins/index.d.ts +3 -0
  202. package/dist/esm/src/client/plugins/index.d.ts.map +1 -0
  203. package/dist/esm/src/client/plugins/index.js +3 -0
  204. package/dist/esm/src/client/plugins/index.js.map +1 -0
  205. package/dist/esm/src/component/_generated/api.d.ts +12 -0
  206. package/dist/esm/src/component/_generated/api.d.ts.map +1 -0
  207. package/dist/esm/src/component/_generated/api.js +22 -0
  208. package/dist/esm/src/component/_generated/api.js.map +1 -0
  209. package/dist/esm/src/component/_generated/server.d.ts +64 -0
  210. package/dist/esm/src/component/_generated/server.d.ts.map +1 -0
  211. package/dist/esm/src/component/_generated/server.js +74 -0
  212. package/dist/esm/src/component/_generated/server.js.map +1 -0
  213. package/dist/esm/src/component/adapter.d.ts +355 -0
  214. package/dist/esm/src/component/adapter.d.ts.map +1 -0
  215. package/dist/esm/src/component/adapter.js +573 -0
  216. package/dist/esm/src/component/adapter.js.map +1 -0
  217. package/dist/esm/src/component/adapterTest.d.ts +18 -0
  218. package/dist/esm/src/component/adapterTest.d.ts.map +1 -0
  219. package/dist/esm/src/component/adapterTest.js +75 -0
  220. package/dist/esm/src/component/adapterTest.js.map +1 -0
  221. package/dist/esm/src/component/convex.config.d.ts +3 -0
  222. package/dist/esm/src/component/convex.config.d.ts.map +1 -0
  223. package/dist/esm/src/component/convex.config.js +4 -0
  224. package/dist/esm/src/component/convex.config.js.map +1 -0
  225. package/dist/esm/src/component/schema.d.ts +562 -0
  226. package/dist/esm/src/component/schema.d.ts.map +1 -0
  227. package/dist/esm/src/component/schema.js +217 -0
  228. package/dist/esm/src/component/schema.js.map +1 -0
  229. package/dist/esm/src/nextjs/index.d.ts +10 -0
  230. package/dist/esm/src/nextjs/index.d.ts.map +1 -0
  231. package/dist/esm/src/nextjs/index.js +43 -0
  232. package/dist/esm/src/nextjs/index.js.map +1 -0
  233. package/dist/esm/src/plugins/convex/client.d.ts +9 -0
  234. package/dist/esm/src/plugins/convex/client.d.ts.map +1 -0
  235. package/dist/esm/src/plugins/convex/client.js +7 -0
  236. package/dist/esm/src/plugins/convex/client.js.map +1 -0
  237. package/dist/esm/src/plugins/convex/index.d.ts +415 -0
  238. package/dist/esm/src/plugins/convex/index.d.ts.map +1 -0
  239. package/dist/esm/src/plugins/convex/index.js +354 -0
  240. package/dist/esm/src/plugins/convex/index.js.map +1 -0
  241. package/dist/esm/src/plugins/cross-domain/client.d.ts +132 -0
  242. package/dist/esm/src/plugins/cross-domain/client.d.ts.map +1 -0
  243. package/dist/esm/src/plugins/cross-domain/client.js +176 -0
  244. package/dist/esm/src/plugins/cross-domain/client.js.map +1 -0
  245. package/dist/esm/src/plugins/cross-domain/index.d.ts +83 -0
  246. package/dist/esm/src/plugins/cross-domain/index.d.ts.map +1 -0
  247. package/dist/esm/src/plugins/cross-domain/index.js +153 -0
  248. package/dist/esm/src/plugins/cross-domain/index.js.map +1 -0
  249. package/dist/esm/src/plugins/index.d.ts +3 -0
  250. package/dist/esm/src/plugins/index.d.ts.map +1 -0
  251. package/dist/esm/src/plugins/index.js +3 -0
  252. package/dist/esm/src/plugins/index.js.map +1 -0
  253. package/dist/esm/src/react/client.d.ts +31 -0
  254. package/dist/esm/src/react/client.d.ts.map +1 -0
  255. package/dist/esm/src/react/client.js +96 -0
  256. package/dist/esm/src/react/client.js.map +1 -0
  257. package/dist/esm/src/react/index.d.ts +9 -0
  258. package/dist/esm/src/react/index.d.ts.map +1 -0
  259. package/dist/esm/src/react/index.js +15 -0
  260. package/dist/esm/src/react/index.js.map +1 -0
  261. package/dist/esm/src/react-start/index.d.ts +45 -0
  262. package/dist/esm/src/react-start/index.d.ts.map +1 -0
  263. package/dist/esm/src/react-start/index.js +60 -0
  264. package/dist/esm/src/react-start/index.js.map +1 -0
  265. package/dist/esm/src/utils/index.d.ts +9 -0
  266. package/dist/esm/src/utils/index.d.ts.map +1 -0
  267. package/dist/esm/src/utils/index.js +35 -0
  268. package/dist/esm/src/utils/index.js.map +1 -0
  269. package/package.json +21 -4
  270. package/src/auth.ts +57 -0
  271. package/src/client/adapter.test.ts +15 -0
  272. package/src/client/adapter.ts +83 -58
  273. package/src/{component/lib.ts → client/adapterUtils.ts} +106 -256
  274. package/src/client/createSchema.ts +149 -0
  275. package/src/client/index.ts +558 -317
  276. package/src/component/_generated/api.d.ts +1711 -547
  277. package/src/component/adapter.ts +13 -0
  278. package/src/component/adapterTest.ts +8 -34
  279. package/src/component/schema.ts +58 -192
  280. package/src/nextjs/index.ts +5 -5
  281. package/src/plugins/convex/client.ts +2 -3
  282. package/src/plugins/convex/index.ts +15 -147
  283. package/src/plugins/cross-domain/index.ts +2 -2
  284. package/src/react-start/index.ts +76 -44
  285. package/dist/commonjs/client/cors.d.ts +0 -77
  286. package/dist/commonjs/client/cors.d.ts.map +0 -1
  287. package/dist/commonjs/client/cors.js +0 -297
  288. package/dist/commonjs/client/cors.js.map +0 -1
  289. package/dist/commonjs/util.d.ts +0 -2
  290. package/dist/commonjs/util.d.ts.map +0 -1
  291. package/dist/commonjs/util.js +0 -8
  292. package/dist/commonjs/util.js.map +0 -1
  293. package/dist/esm/client/cors.d.ts +0 -77
  294. package/dist/esm/client/cors.d.ts.map +0 -1
  295. package/dist/esm/client/cors.js +0 -297
  296. package/dist/esm/client/cors.js.map +0 -1
  297. package/dist/esm/util.d.ts +0 -2
  298. package/dist/esm/util.d.ts.map +0 -1
  299. package/dist/esm/util.js +0 -8
  300. package/dist/esm/util.js.map +0 -1
  301. package/src/component/util.ts +0 -4
@@ -0,0 +1,3085 @@
1
+ import { BetterAuthOptions } from "better-auth";
2
+ declare const config: {
3
+ handler: (request: Request) => Promise<Response>;
4
+ api: import("better-auth").InferAPI<{
5
+ ok: {
6
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
7
+ body?: undefined;
8
+ } & {
9
+ method?: "GET" | undefined;
10
+ } & {
11
+ query?: Record<string, any> | undefined;
12
+ } & {
13
+ params?: Record<string, any>;
14
+ } & {
15
+ request?: Request;
16
+ } & {
17
+ headers?: HeadersInit;
18
+ } & {
19
+ asResponse?: boolean;
20
+ returnHeaders?: boolean;
21
+ use?: import("better-call").Middleware[];
22
+ path?: string;
23
+ } & {
24
+ asResponse?: AsResponse | undefined;
25
+ returnHeaders?: ReturnHeaders | undefined;
26
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
27
+ headers: Headers;
28
+ response: {
29
+ ok: boolean;
30
+ };
31
+ } : {
32
+ ok: boolean;
33
+ }>;
34
+ options: {
35
+ method: "GET";
36
+ metadata: {
37
+ openapi: {
38
+ description: string;
39
+ responses: {
40
+ "200": {
41
+ description: string;
42
+ content: {
43
+ "application/json": {
44
+ schema: {
45
+ type: "object";
46
+ properties: {
47
+ ok: {
48
+ type: string;
49
+ description: string;
50
+ };
51
+ };
52
+ required: string[];
53
+ };
54
+ };
55
+ };
56
+ };
57
+ };
58
+ };
59
+ isAction: false;
60
+ };
61
+ } & {
62
+ use: any[];
63
+ };
64
+ path: "/ok";
65
+ };
66
+ error: {
67
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
68
+ body?: undefined;
69
+ } & {
70
+ method?: "GET" | undefined;
71
+ } & {
72
+ query?: Record<string, any> | undefined;
73
+ } & {
74
+ params?: Record<string, any>;
75
+ } & {
76
+ request?: Request;
77
+ } & {
78
+ headers?: HeadersInit;
79
+ } & {
80
+ asResponse?: boolean;
81
+ returnHeaders?: boolean;
82
+ use?: import("better-call").Middleware[];
83
+ path?: string;
84
+ } & {
85
+ asResponse?: AsResponse | undefined;
86
+ returnHeaders?: ReturnHeaders | undefined;
87
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
88
+ headers: Headers;
89
+ response: Response;
90
+ } : Response>;
91
+ options: {
92
+ method: "GET";
93
+ metadata: {
94
+ openapi: {
95
+ description: string;
96
+ responses: {
97
+ "200": {
98
+ description: string;
99
+ content: {
100
+ "text/html": {
101
+ schema: {
102
+ type: "string";
103
+ description: string;
104
+ };
105
+ };
106
+ };
107
+ };
108
+ };
109
+ };
110
+ isAction: false;
111
+ };
112
+ } & {
113
+ use: any[];
114
+ };
115
+ path: "/error";
116
+ };
117
+ signInSocial: {
118
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
119
+ body: {
120
+ provider: unknown;
121
+ callbackURL?: string | undefined;
122
+ newUserCallbackURL?: string | undefined;
123
+ errorCallbackURL?: string | undefined;
124
+ disableRedirect?: boolean | undefined;
125
+ idToken?: {
126
+ token: string;
127
+ nonce?: string | undefined;
128
+ accessToken?: string | undefined;
129
+ refreshToken?: string | undefined;
130
+ expiresAt?: number | undefined;
131
+ } | undefined;
132
+ scopes?: string[] | undefined;
133
+ requestSignUp?: boolean | undefined;
134
+ loginHint?: string | undefined;
135
+ };
136
+ } & {
137
+ method?: "POST" | undefined;
138
+ } & {
139
+ query?: Record<string, any> | undefined;
140
+ } & {
141
+ params?: Record<string, any>;
142
+ } & {
143
+ request?: Request;
144
+ } & {
145
+ headers?: HeadersInit;
146
+ } & {
147
+ asResponse?: boolean;
148
+ returnHeaders?: boolean;
149
+ use?: import("better-call").Middleware[];
150
+ path?: string;
151
+ } & {
152
+ asResponse?: AsResponse | undefined;
153
+ returnHeaders?: ReturnHeaders | undefined;
154
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
155
+ headers: Headers;
156
+ response: {
157
+ redirect: boolean;
158
+ token: string;
159
+ url: undefined;
160
+ user: {
161
+ id: string;
162
+ email: string;
163
+ name: string;
164
+ image: string | null | undefined;
165
+ emailVerified: boolean;
166
+ createdAt: Date;
167
+ updatedAt: Date;
168
+ };
169
+ } | {
170
+ url: string;
171
+ redirect: boolean;
172
+ };
173
+ } : {
174
+ redirect: boolean;
175
+ token: string;
176
+ url: undefined;
177
+ user: {
178
+ id: string;
179
+ email: string;
180
+ name: string;
181
+ image: string | null | undefined;
182
+ emailVerified: boolean;
183
+ createdAt: Date;
184
+ updatedAt: Date;
185
+ };
186
+ } | {
187
+ url: string;
188
+ redirect: boolean;
189
+ }>;
190
+ options: {
191
+ method: "POST";
192
+ body: import("zod").ZodObject<{
193
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
194
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
195
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
196
+ provider: import("zod").ZodType<"apple" | (string & {}) | "discord" | "facebook" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "notion", unknown, import("better-auth").$ZodTypeInternals<"apple" | (string & {}) | "discord" | "facebook" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "notion", unknown>>;
197
+ disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
198
+ idToken: import("zod").ZodOptional<import("zod").ZodObject<{
199
+ token: import("zod").ZodString;
200
+ nonce: import("zod").ZodOptional<import("zod").ZodString>;
201
+ accessToken: import("zod").ZodOptional<import("zod").ZodString>;
202
+ refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
203
+ expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
204
+ }, import("better-auth").$strip>>;
205
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
206
+ requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
207
+ loginHint: import("zod").ZodOptional<import("zod").ZodString>;
208
+ }, import("better-auth").$strip>;
209
+ metadata: {
210
+ openapi: {
211
+ description: string;
212
+ operationId: string;
213
+ responses: {
214
+ "200": {
215
+ description: string;
216
+ content: {
217
+ "application/json": {
218
+ schema: {
219
+ type: "object";
220
+ description: string;
221
+ properties: {
222
+ redirect: {
223
+ type: string;
224
+ enum: boolean[];
225
+ };
226
+ token: {
227
+ type: string;
228
+ description: string;
229
+ url: {
230
+ type: string;
231
+ nullable: boolean;
232
+ };
233
+ user: {
234
+ type: string;
235
+ properties: {
236
+ id: {
237
+ type: string;
238
+ };
239
+ email: {
240
+ type: string;
241
+ };
242
+ name: {
243
+ type: string;
244
+ nullable: boolean;
245
+ };
246
+ image: {
247
+ type: string;
248
+ nullable: boolean;
249
+ };
250
+ emailVerified: {
251
+ type: string;
252
+ };
253
+ createdAt: {
254
+ type: string;
255
+ format: string;
256
+ };
257
+ updatedAt: {
258
+ type: string;
259
+ format: string;
260
+ };
261
+ };
262
+ required: string[];
263
+ };
264
+ };
265
+ };
266
+ required: string[];
267
+ };
268
+ };
269
+ };
270
+ };
271
+ };
272
+ };
273
+ };
274
+ } & {
275
+ use: any[];
276
+ };
277
+ path: "/sign-in/social";
278
+ };
279
+ callbackOAuth: {
280
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
281
+ body?: {
282
+ code?: string | undefined;
283
+ error?: string | undefined;
284
+ device_id?: string | undefined;
285
+ error_description?: string | undefined;
286
+ state?: string | undefined;
287
+ user?: string | undefined;
288
+ } | undefined;
289
+ } & {
290
+ method: "GET" | "POST";
291
+ } & {
292
+ query?: {
293
+ code?: string | undefined;
294
+ error?: string | undefined;
295
+ device_id?: string | undefined;
296
+ error_description?: string | undefined;
297
+ state?: string | undefined;
298
+ user?: string | undefined;
299
+ } | undefined;
300
+ } & {
301
+ params: {
302
+ id: string;
303
+ };
304
+ } & {
305
+ request?: Request;
306
+ } & {
307
+ headers?: HeadersInit;
308
+ } & {
309
+ asResponse?: boolean;
310
+ returnHeaders?: boolean;
311
+ use?: import("better-call").Middleware[];
312
+ path?: string;
313
+ } & {
314
+ asResponse?: AsResponse | undefined;
315
+ returnHeaders?: ReturnHeaders | undefined;
316
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
317
+ headers: Headers;
318
+ response: void;
319
+ } : void>;
320
+ options: {
321
+ method: ("GET" | "POST")[];
322
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
323
+ code: import("zod").ZodOptional<import("zod").ZodString>;
324
+ error: import("zod").ZodOptional<import("zod").ZodString>;
325
+ device_id: import("zod").ZodOptional<import("zod").ZodString>;
326
+ error_description: import("zod").ZodOptional<import("zod").ZodString>;
327
+ state: import("zod").ZodOptional<import("zod").ZodString>;
328
+ user: import("zod").ZodOptional<import("zod").ZodString>;
329
+ }, import("better-auth").$strip>>;
330
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
331
+ code: import("zod").ZodOptional<import("zod").ZodString>;
332
+ error: import("zod").ZodOptional<import("zod").ZodString>;
333
+ device_id: import("zod").ZodOptional<import("zod").ZodString>;
334
+ error_description: import("zod").ZodOptional<import("zod").ZodString>;
335
+ state: import("zod").ZodOptional<import("zod").ZodString>;
336
+ user: import("zod").ZodOptional<import("zod").ZodString>;
337
+ }, import("better-auth").$strip>>;
338
+ metadata: {
339
+ isAction: false;
340
+ };
341
+ } & {
342
+ use: any[];
343
+ };
344
+ path: "/callback/:id";
345
+ };
346
+ getSession: {
347
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
348
+ body?: undefined;
349
+ } & {
350
+ method?: "GET" | undefined;
351
+ } & {
352
+ query?: {
353
+ disableCookieCache?: unknown;
354
+ disableRefresh?: unknown;
355
+ } | undefined;
356
+ } & {
357
+ params?: Record<string, any>;
358
+ } & {
359
+ request?: Request;
360
+ } & {
361
+ headers: HeadersInit;
362
+ } & {
363
+ asResponse?: boolean;
364
+ returnHeaders?: boolean;
365
+ use?: import("better-call").Middleware[];
366
+ path?: string;
367
+ } & {
368
+ asResponse?: AsResponse | undefined;
369
+ returnHeaders?: ReturnHeaders | undefined;
370
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
371
+ headers: Headers;
372
+ response: {
373
+ session: {
374
+ id: string;
375
+ userId: string;
376
+ expiresAt: Date;
377
+ createdAt: Date;
378
+ updatedAt: Date;
379
+ token: string;
380
+ ipAddress?: string | null | undefined | undefined;
381
+ userAgent?: string | null | undefined | undefined;
382
+ };
383
+ user: {
384
+ id: string;
385
+ email: string;
386
+ emailVerified: boolean;
387
+ name: string;
388
+ createdAt: Date;
389
+ updatedAt: Date;
390
+ image?: string | null | undefined | undefined;
391
+ };
392
+ } | null;
393
+ } : {
394
+ session: {
395
+ id: string;
396
+ userId: string;
397
+ expiresAt: Date;
398
+ createdAt: Date;
399
+ updatedAt: Date;
400
+ token: string;
401
+ ipAddress?: string | null | undefined | undefined;
402
+ userAgent?: string | null | undefined | undefined;
403
+ };
404
+ user: {
405
+ id: string;
406
+ email: string;
407
+ emailVerified: boolean;
408
+ name: string;
409
+ createdAt: Date;
410
+ updatedAt: Date;
411
+ image?: string | null | undefined | undefined;
412
+ };
413
+ } | null>;
414
+ options: {
415
+ method: "GET";
416
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
417
+ disableCookieCache: import("zod").ZodOptional<zod.ZodCoercedBoolean<unknown>>;
418
+ disableRefresh: import("zod").ZodOptional<zod.ZodCoercedBoolean<unknown>>;
419
+ }, import("better-auth").$strip>>;
420
+ requireHeaders: true;
421
+ metadata: {
422
+ openapi: {
423
+ description: string;
424
+ responses: {
425
+ "200": {
426
+ description: string;
427
+ content: {
428
+ "application/json": {
429
+ schema: {
430
+ type: "object";
431
+ properties: {
432
+ session: {
433
+ $ref: string;
434
+ };
435
+ user: {
436
+ $ref: string;
437
+ };
438
+ };
439
+ required: string[];
440
+ };
441
+ };
442
+ };
443
+ };
444
+ };
445
+ };
446
+ };
447
+ } & {
448
+ use: any[];
449
+ };
450
+ path: "/get-session";
451
+ };
452
+ signOut: {
453
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
454
+ body?: undefined;
455
+ } & {
456
+ method?: "POST" | undefined;
457
+ } & {
458
+ query?: Record<string, any> | undefined;
459
+ } & {
460
+ params?: Record<string, any>;
461
+ } & {
462
+ request?: Request;
463
+ } & {
464
+ headers: HeadersInit;
465
+ } & {
466
+ asResponse?: boolean;
467
+ returnHeaders?: boolean;
468
+ use?: import("better-call").Middleware[];
469
+ path?: string;
470
+ } & {
471
+ asResponse?: AsResponse | undefined;
472
+ returnHeaders?: ReturnHeaders | undefined;
473
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
474
+ headers: Headers;
475
+ response: {
476
+ success: boolean;
477
+ };
478
+ } : {
479
+ success: boolean;
480
+ }>;
481
+ options: {
482
+ method: "POST";
483
+ requireHeaders: true;
484
+ metadata: {
485
+ openapi: {
486
+ description: string;
487
+ responses: {
488
+ "200": {
489
+ description: string;
490
+ content: {
491
+ "application/json": {
492
+ schema: {
493
+ type: "object";
494
+ properties: {
495
+ success: {
496
+ type: string;
497
+ };
498
+ };
499
+ };
500
+ };
501
+ };
502
+ };
503
+ };
504
+ };
505
+ };
506
+ } & {
507
+ use: any[];
508
+ };
509
+ path: "/sign-out";
510
+ };
511
+ signUpEmail: {
512
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
513
+ body: {
514
+ name: string;
515
+ email: string;
516
+ password: string;
517
+ image?: string;
518
+ callbackURL?: string;
519
+ rememberMe?: boolean;
520
+ };
521
+ } & {
522
+ method?: "POST" | undefined;
523
+ } & {
524
+ query?: Record<string, any> | undefined;
525
+ } & {
526
+ params?: Record<string, any>;
527
+ } & {
528
+ request?: Request;
529
+ } & {
530
+ headers?: HeadersInit;
531
+ } & {
532
+ asResponse?: boolean;
533
+ returnHeaders?: boolean;
534
+ use?: import("better-call").Middleware[];
535
+ path?: string;
536
+ } & {
537
+ asResponse?: AsResponse | undefined;
538
+ returnHeaders?: ReturnHeaders | undefined;
539
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
540
+ headers: Headers;
541
+ response: {
542
+ token: null;
543
+ user: {
544
+ id: string;
545
+ email: string;
546
+ name: string;
547
+ image: string | null | undefined;
548
+ emailVerified: boolean;
549
+ createdAt: Date;
550
+ updatedAt: Date;
551
+ };
552
+ } | {
553
+ token: string;
554
+ user: {
555
+ id: string;
556
+ email: string;
557
+ name: string;
558
+ image: string | null | undefined;
559
+ emailVerified: boolean;
560
+ createdAt: Date;
561
+ updatedAt: Date;
562
+ };
563
+ };
564
+ } : {
565
+ token: null;
566
+ user: {
567
+ id: string;
568
+ email: string;
569
+ name: string;
570
+ image: string | null | undefined;
571
+ emailVerified: boolean;
572
+ createdAt: Date;
573
+ updatedAt: Date;
574
+ };
575
+ } | {
576
+ token: string;
577
+ user: {
578
+ id: string;
579
+ email: string;
580
+ name: string;
581
+ image: string | null | undefined;
582
+ emailVerified: boolean;
583
+ createdAt: Date;
584
+ updatedAt: Date;
585
+ };
586
+ }>;
587
+ options: {
588
+ method: "POST";
589
+ body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
590
+ metadata: {
591
+ $Infer: {
592
+ body: {
593
+ name: string;
594
+ email: string;
595
+ password: string;
596
+ image?: string;
597
+ callbackURL?: string;
598
+ rememberMe?: boolean;
599
+ };
600
+ };
601
+ openapi: {
602
+ description: string;
603
+ requestBody: {
604
+ content: {
605
+ "application/json": {
606
+ schema: {
607
+ type: "object";
608
+ properties: {
609
+ name: {
610
+ type: string;
611
+ description: string;
612
+ };
613
+ email: {
614
+ type: string;
615
+ description: string;
616
+ };
617
+ password: {
618
+ type: string;
619
+ description: string;
620
+ };
621
+ image: {
622
+ type: string;
623
+ description: string;
624
+ };
625
+ callbackURL: {
626
+ type: string;
627
+ description: string;
628
+ };
629
+ rememberMe: {
630
+ type: string;
631
+ description: string;
632
+ };
633
+ };
634
+ required: string[];
635
+ };
636
+ };
637
+ };
638
+ };
639
+ responses: {
640
+ "200": {
641
+ description: string;
642
+ content: {
643
+ "application/json": {
644
+ schema: {
645
+ type: "object";
646
+ properties: {
647
+ token: {
648
+ type: string;
649
+ nullable: boolean;
650
+ description: string;
651
+ };
652
+ user: {
653
+ type: string;
654
+ properties: {
655
+ id: {
656
+ type: string;
657
+ description: string;
658
+ };
659
+ email: {
660
+ type: string;
661
+ format: string;
662
+ description: string;
663
+ };
664
+ name: {
665
+ type: string;
666
+ description: string;
667
+ };
668
+ image: {
669
+ type: string;
670
+ format: string;
671
+ nullable: boolean;
672
+ description: string;
673
+ };
674
+ emailVerified: {
675
+ type: string;
676
+ description: string;
677
+ };
678
+ createdAt: {
679
+ type: string;
680
+ format: string;
681
+ description: string;
682
+ };
683
+ updatedAt: {
684
+ type: string;
685
+ format: string;
686
+ description: string;
687
+ };
688
+ };
689
+ required: string[];
690
+ };
691
+ };
692
+ required: string[];
693
+ };
694
+ };
695
+ };
696
+ };
697
+ };
698
+ };
699
+ };
700
+ } & {
701
+ use: any[];
702
+ };
703
+ path: "/sign-up/email";
704
+ };
705
+ signInEmail: {
706
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
707
+ body: {
708
+ email: string;
709
+ password: string;
710
+ callbackURL?: string | undefined;
711
+ rememberMe?: boolean | undefined;
712
+ };
713
+ } & {
714
+ method?: "POST" | undefined;
715
+ } & {
716
+ query?: Record<string, any> | undefined;
717
+ } & {
718
+ params?: Record<string, any>;
719
+ } & {
720
+ request?: Request;
721
+ } & {
722
+ headers?: HeadersInit;
723
+ } & {
724
+ asResponse?: boolean;
725
+ returnHeaders?: boolean;
726
+ use?: import("better-call").Middleware[];
727
+ path?: string;
728
+ } & {
729
+ asResponse?: AsResponse | undefined;
730
+ returnHeaders?: ReturnHeaders | undefined;
731
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
732
+ headers: Headers;
733
+ response: {
734
+ redirect: boolean;
735
+ token: string;
736
+ url: string | undefined;
737
+ user: {
738
+ id: string;
739
+ email: string;
740
+ name: string;
741
+ image: string | null | undefined;
742
+ emailVerified: boolean;
743
+ createdAt: Date;
744
+ updatedAt: Date;
745
+ };
746
+ };
747
+ } : {
748
+ redirect: boolean;
749
+ token: string;
750
+ url: string | undefined;
751
+ user: {
752
+ id: string;
753
+ email: string;
754
+ name: string;
755
+ image: string | null | undefined;
756
+ emailVerified: boolean;
757
+ createdAt: Date;
758
+ updatedAt: Date;
759
+ };
760
+ }>;
761
+ options: {
762
+ method: "POST";
763
+ body: import("zod").ZodObject<{
764
+ email: import("zod").ZodString;
765
+ password: import("zod").ZodString;
766
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
767
+ rememberMe: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
768
+ }, import("better-auth").$strip>;
769
+ metadata: {
770
+ openapi: {
771
+ description: string;
772
+ responses: {
773
+ "200": {
774
+ description: string;
775
+ content: {
776
+ "application/json": {
777
+ schema: {
778
+ type: "object";
779
+ description: string;
780
+ properties: {
781
+ redirect: {
782
+ type: string;
783
+ enum: boolean[];
784
+ };
785
+ token: {
786
+ type: string;
787
+ description: string;
788
+ };
789
+ url: {
790
+ type: string;
791
+ nullable: boolean;
792
+ };
793
+ user: {
794
+ type: string;
795
+ properties: {
796
+ id: {
797
+ type: string;
798
+ };
799
+ email: {
800
+ type: string;
801
+ };
802
+ name: {
803
+ type: string;
804
+ nullable: boolean;
805
+ };
806
+ image: {
807
+ type: string;
808
+ nullable: boolean;
809
+ };
810
+ emailVerified: {
811
+ type: string;
812
+ };
813
+ createdAt: {
814
+ type: string;
815
+ format: string;
816
+ };
817
+ updatedAt: {
818
+ type: string;
819
+ format: string;
820
+ };
821
+ };
822
+ required: string[];
823
+ };
824
+ };
825
+ required: string[];
826
+ };
827
+ };
828
+ };
829
+ };
830
+ };
831
+ };
832
+ };
833
+ } & {
834
+ use: any[];
835
+ };
836
+ path: "/sign-in/email";
837
+ };
838
+ forgetPassword: {
839
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
840
+ body: {
841
+ email: string;
842
+ redirectTo?: string | undefined;
843
+ };
844
+ } & {
845
+ method?: "POST" | undefined;
846
+ } & {
847
+ query?: Record<string, any> | undefined;
848
+ } & {
849
+ params?: Record<string, any>;
850
+ } & {
851
+ request?: Request;
852
+ } & {
853
+ headers?: HeadersInit;
854
+ } & {
855
+ asResponse?: boolean;
856
+ returnHeaders?: boolean;
857
+ use?: import("better-call").Middleware[];
858
+ path?: string;
859
+ } & {
860
+ asResponse?: AsResponse | undefined;
861
+ returnHeaders?: ReturnHeaders | undefined;
862
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
863
+ headers: Headers;
864
+ response: {
865
+ status: boolean;
866
+ };
867
+ } : {
868
+ status: boolean;
869
+ }>;
870
+ options: {
871
+ method: "POST";
872
+ body: import("zod").ZodObject<{
873
+ email: import("zod").ZodString;
874
+ redirectTo: import("zod").ZodOptional<import("zod").ZodString>;
875
+ }, import("better-auth").$strip>;
876
+ metadata: {
877
+ openapi: {
878
+ description: string;
879
+ responses: {
880
+ "200": {
881
+ description: string;
882
+ content: {
883
+ "application/json": {
884
+ schema: {
885
+ type: "object";
886
+ properties: {
887
+ status: {
888
+ type: string;
889
+ };
890
+ message: {
891
+ type: string;
892
+ };
893
+ };
894
+ };
895
+ };
896
+ };
897
+ };
898
+ };
899
+ };
900
+ };
901
+ } & {
902
+ use: any[];
903
+ };
904
+ path: "/forget-password";
905
+ };
906
+ resetPassword: {
907
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
908
+ body: {
909
+ newPassword: string;
910
+ token?: string | undefined;
911
+ };
912
+ } & {
913
+ method?: "POST" | undefined;
914
+ } & {
915
+ query?: {
916
+ token?: string | undefined;
917
+ } | undefined;
918
+ } & {
919
+ params?: Record<string, any>;
920
+ } & {
921
+ request?: Request;
922
+ } & {
923
+ headers?: HeadersInit;
924
+ } & {
925
+ asResponse?: boolean;
926
+ returnHeaders?: boolean;
927
+ use?: import("better-call").Middleware[];
928
+ path?: string;
929
+ } & {
930
+ asResponse?: AsResponse | undefined;
931
+ returnHeaders?: ReturnHeaders | undefined;
932
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
933
+ headers: Headers;
934
+ response: {
935
+ status: boolean;
936
+ };
937
+ } : {
938
+ status: boolean;
939
+ }>;
940
+ options: {
941
+ method: "POST";
942
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
943
+ token: import("zod").ZodOptional<import("zod").ZodString>;
944
+ }, import("better-auth").$strip>>;
945
+ body: import("zod").ZodObject<{
946
+ newPassword: import("zod").ZodString;
947
+ token: import("zod").ZodOptional<import("zod").ZodString>;
948
+ }, import("better-auth").$strip>;
949
+ metadata: {
950
+ openapi: {
951
+ description: string;
952
+ responses: {
953
+ "200": {
954
+ description: string;
955
+ content: {
956
+ "application/json": {
957
+ schema: {
958
+ type: "object";
959
+ properties: {
960
+ status: {
961
+ type: string;
962
+ };
963
+ };
964
+ };
965
+ };
966
+ };
967
+ };
968
+ };
969
+ };
970
+ };
971
+ } & {
972
+ use: any[];
973
+ };
974
+ path: "/reset-password";
975
+ };
976
+ verifyEmail: {
977
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
978
+ body?: undefined;
979
+ } & {
980
+ method?: "GET" | undefined;
981
+ } & {
982
+ query: {
983
+ token: string;
984
+ callbackURL?: string | undefined;
985
+ };
986
+ } & {
987
+ params?: Record<string, any>;
988
+ } & {
989
+ request?: Request;
990
+ } & {
991
+ headers?: HeadersInit;
992
+ } & {
993
+ asResponse?: boolean;
994
+ returnHeaders?: boolean;
995
+ use?: import("better-call").Middleware[];
996
+ path?: string;
997
+ } & {
998
+ asResponse?: AsResponse | undefined;
999
+ returnHeaders?: ReturnHeaders | undefined;
1000
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1001
+ headers: Headers;
1002
+ response: void | {
1003
+ status: boolean;
1004
+ user: {
1005
+ id: any;
1006
+ email: any;
1007
+ name: any;
1008
+ image: any;
1009
+ emailVerified: any;
1010
+ createdAt: any;
1011
+ updatedAt: any;
1012
+ };
1013
+ } | {
1014
+ status: boolean;
1015
+ user: null;
1016
+ };
1017
+ } : void | {
1018
+ status: boolean;
1019
+ user: {
1020
+ id: any;
1021
+ email: any;
1022
+ name: any;
1023
+ image: any;
1024
+ emailVerified: any;
1025
+ createdAt: any;
1026
+ updatedAt: any;
1027
+ };
1028
+ } | {
1029
+ status: boolean;
1030
+ user: null;
1031
+ }>;
1032
+ options: {
1033
+ method: "GET";
1034
+ query: import("zod").ZodObject<{
1035
+ token: import("zod").ZodString;
1036
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1037
+ }, import("better-auth").$strip>;
1038
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
1039
+ metadata: {
1040
+ openapi: {
1041
+ description: string;
1042
+ parameters: ({
1043
+ name: string;
1044
+ in: "query";
1045
+ description: string;
1046
+ required: true;
1047
+ schema: {
1048
+ type: "string";
1049
+ };
1050
+ } | {
1051
+ name: string;
1052
+ in: "query";
1053
+ description: string;
1054
+ required: false;
1055
+ schema: {
1056
+ type: "string";
1057
+ };
1058
+ })[];
1059
+ responses: {
1060
+ "200": {
1061
+ description: string;
1062
+ content: {
1063
+ "application/json": {
1064
+ schema: {
1065
+ type: "object";
1066
+ properties: {
1067
+ user: {
1068
+ type: string;
1069
+ properties: {
1070
+ id: {
1071
+ type: string;
1072
+ description: string;
1073
+ };
1074
+ email: {
1075
+ type: string;
1076
+ description: string;
1077
+ };
1078
+ name: {
1079
+ type: string;
1080
+ description: string;
1081
+ };
1082
+ image: {
1083
+ type: string;
1084
+ description: string;
1085
+ };
1086
+ emailVerified: {
1087
+ type: string;
1088
+ description: string;
1089
+ };
1090
+ createdAt: {
1091
+ type: string;
1092
+ description: string;
1093
+ };
1094
+ updatedAt: {
1095
+ type: string;
1096
+ description: string;
1097
+ };
1098
+ };
1099
+ required: string[];
1100
+ };
1101
+ status: {
1102
+ type: string;
1103
+ description: string;
1104
+ };
1105
+ };
1106
+ required: string[];
1107
+ };
1108
+ };
1109
+ };
1110
+ };
1111
+ };
1112
+ };
1113
+ };
1114
+ } & {
1115
+ use: any[];
1116
+ };
1117
+ path: "/verify-email";
1118
+ };
1119
+ sendVerificationEmail: {
1120
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1121
+ body: {
1122
+ email: string;
1123
+ callbackURL?: string | undefined;
1124
+ };
1125
+ } & {
1126
+ method?: "POST" | undefined;
1127
+ } & {
1128
+ query?: Record<string, any> | undefined;
1129
+ } & {
1130
+ params?: Record<string, any>;
1131
+ } & {
1132
+ request?: Request;
1133
+ } & {
1134
+ headers?: HeadersInit;
1135
+ } & {
1136
+ asResponse?: boolean;
1137
+ returnHeaders?: boolean;
1138
+ use?: import("better-call").Middleware[];
1139
+ path?: string;
1140
+ } & {
1141
+ asResponse?: AsResponse | undefined;
1142
+ returnHeaders?: ReturnHeaders | undefined;
1143
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1144
+ headers: Headers;
1145
+ response: {
1146
+ status: boolean;
1147
+ };
1148
+ } : {
1149
+ status: boolean;
1150
+ }>;
1151
+ options: {
1152
+ method: "POST";
1153
+ body: import("zod").ZodObject<{
1154
+ email: zod.ZodEmail;
1155
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1156
+ }, import("better-auth").$strip>;
1157
+ metadata: {
1158
+ openapi: {
1159
+ description: string;
1160
+ requestBody: {
1161
+ content: {
1162
+ "application/json": {
1163
+ schema: {
1164
+ type: "object";
1165
+ properties: {
1166
+ email: {
1167
+ type: string;
1168
+ description: string;
1169
+ example: string;
1170
+ };
1171
+ callbackURL: {
1172
+ type: string;
1173
+ description: string;
1174
+ example: string;
1175
+ nullable: boolean;
1176
+ };
1177
+ };
1178
+ required: string[];
1179
+ };
1180
+ };
1181
+ };
1182
+ };
1183
+ responses: {
1184
+ "200": {
1185
+ description: string;
1186
+ content: {
1187
+ "application/json": {
1188
+ schema: {
1189
+ type: "object";
1190
+ properties: {
1191
+ status: {
1192
+ type: string;
1193
+ description: string;
1194
+ example: boolean;
1195
+ };
1196
+ };
1197
+ };
1198
+ };
1199
+ };
1200
+ };
1201
+ "400": {
1202
+ description: string;
1203
+ content: {
1204
+ "application/json": {
1205
+ schema: {
1206
+ type: "object";
1207
+ properties: {
1208
+ message: {
1209
+ type: string;
1210
+ description: string;
1211
+ example: string;
1212
+ };
1213
+ };
1214
+ };
1215
+ };
1216
+ };
1217
+ };
1218
+ };
1219
+ };
1220
+ };
1221
+ } & {
1222
+ use: any[];
1223
+ };
1224
+ path: "/send-verification-email";
1225
+ };
1226
+ changeEmail: {
1227
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1228
+ body: {
1229
+ newEmail: string;
1230
+ callbackURL?: string | undefined;
1231
+ };
1232
+ } & {
1233
+ method?: "POST" | undefined;
1234
+ } & {
1235
+ query?: Record<string, any> | undefined;
1236
+ } & {
1237
+ params?: Record<string, any>;
1238
+ } & {
1239
+ request?: Request;
1240
+ } & {
1241
+ headers?: HeadersInit;
1242
+ } & {
1243
+ asResponse?: boolean;
1244
+ returnHeaders?: boolean;
1245
+ use?: import("better-call").Middleware[];
1246
+ path?: string;
1247
+ } & {
1248
+ asResponse?: AsResponse | undefined;
1249
+ returnHeaders?: ReturnHeaders | undefined;
1250
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1251
+ headers: Headers;
1252
+ response: {
1253
+ status: boolean;
1254
+ };
1255
+ } : {
1256
+ status: boolean;
1257
+ }>;
1258
+ options: {
1259
+ method: "POST";
1260
+ body: import("zod").ZodObject<{
1261
+ newEmail: zod.ZodEmail;
1262
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1263
+ }, import("better-auth").$strip>;
1264
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1265
+ session: {
1266
+ session: Record<string, any> & {
1267
+ id: string;
1268
+ userId: string;
1269
+ expiresAt: Date;
1270
+ createdAt: Date;
1271
+ updatedAt: Date;
1272
+ token: string;
1273
+ ipAddress?: string | null | undefined;
1274
+ userAgent?: string | null | undefined;
1275
+ };
1276
+ user: Record<string, any> & {
1277
+ id: string;
1278
+ email: string;
1279
+ emailVerified: boolean;
1280
+ name: string;
1281
+ createdAt: Date;
1282
+ updatedAt: Date;
1283
+ image?: string | null | undefined;
1284
+ };
1285
+ };
1286
+ }>)[];
1287
+ metadata: {
1288
+ openapi: {
1289
+ responses: {
1290
+ "200": {
1291
+ description: string;
1292
+ content: {
1293
+ "application/json": {
1294
+ schema: {
1295
+ type: "object";
1296
+ properties: {
1297
+ status: {
1298
+ type: string;
1299
+ description: string;
1300
+ };
1301
+ message: {
1302
+ type: string;
1303
+ enum: string[];
1304
+ description: string;
1305
+ nullable: boolean;
1306
+ };
1307
+ };
1308
+ required: string[];
1309
+ };
1310
+ };
1311
+ };
1312
+ };
1313
+ };
1314
+ };
1315
+ };
1316
+ } & {
1317
+ use: any[];
1318
+ };
1319
+ path: "/change-email";
1320
+ };
1321
+ changePassword: {
1322
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1323
+ body: {
1324
+ newPassword: string;
1325
+ currentPassword: string;
1326
+ revokeOtherSessions?: boolean | undefined;
1327
+ };
1328
+ } & {
1329
+ method?: "POST" | undefined;
1330
+ } & {
1331
+ query?: Record<string, any> | undefined;
1332
+ } & {
1333
+ params?: Record<string, any>;
1334
+ } & {
1335
+ request?: Request;
1336
+ } & {
1337
+ headers?: HeadersInit;
1338
+ } & {
1339
+ asResponse?: boolean;
1340
+ returnHeaders?: boolean;
1341
+ use?: import("better-call").Middleware[];
1342
+ path?: string;
1343
+ } & {
1344
+ asResponse?: AsResponse | undefined;
1345
+ returnHeaders?: ReturnHeaders | undefined;
1346
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1347
+ headers: Headers;
1348
+ response: {
1349
+ token: string | null;
1350
+ user: {
1351
+ id: string;
1352
+ email: string;
1353
+ name: string;
1354
+ image: string | null | undefined;
1355
+ emailVerified: boolean;
1356
+ createdAt: Date;
1357
+ updatedAt: Date;
1358
+ };
1359
+ };
1360
+ } : {
1361
+ token: string | null;
1362
+ user: {
1363
+ id: string;
1364
+ email: string;
1365
+ name: string;
1366
+ image: string | null | undefined;
1367
+ emailVerified: boolean;
1368
+ createdAt: Date;
1369
+ updatedAt: Date;
1370
+ };
1371
+ }>;
1372
+ options: {
1373
+ method: "POST";
1374
+ body: import("zod").ZodObject<{
1375
+ newPassword: import("zod").ZodString;
1376
+ currentPassword: import("zod").ZodString;
1377
+ revokeOtherSessions: import("zod").ZodOptional<import("zod").ZodBoolean>;
1378
+ }, import("better-auth").$strip>;
1379
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1380
+ session: {
1381
+ session: Record<string, any> & {
1382
+ id: string;
1383
+ userId: string;
1384
+ expiresAt: Date;
1385
+ createdAt: Date;
1386
+ updatedAt: Date;
1387
+ token: string;
1388
+ ipAddress?: string | null | undefined;
1389
+ userAgent?: string | null | undefined;
1390
+ };
1391
+ user: Record<string, any> & {
1392
+ id: string;
1393
+ email: string;
1394
+ emailVerified: boolean;
1395
+ name: string;
1396
+ createdAt: Date;
1397
+ updatedAt: Date;
1398
+ image?: string | null | undefined;
1399
+ };
1400
+ };
1401
+ }>)[];
1402
+ metadata: {
1403
+ openapi: {
1404
+ description: string;
1405
+ responses: {
1406
+ "200": {
1407
+ description: string;
1408
+ content: {
1409
+ "application/json": {
1410
+ schema: {
1411
+ type: "object";
1412
+ properties: {
1413
+ token: {
1414
+ type: string;
1415
+ nullable: boolean;
1416
+ description: string;
1417
+ };
1418
+ user: {
1419
+ type: string;
1420
+ properties: {
1421
+ id: {
1422
+ type: string;
1423
+ description: string;
1424
+ };
1425
+ email: {
1426
+ type: string;
1427
+ format: string;
1428
+ description: string;
1429
+ };
1430
+ name: {
1431
+ type: string;
1432
+ description: string;
1433
+ };
1434
+ image: {
1435
+ type: string;
1436
+ format: string;
1437
+ nullable: boolean;
1438
+ description: string;
1439
+ };
1440
+ emailVerified: {
1441
+ type: string;
1442
+ description: string;
1443
+ };
1444
+ createdAt: {
1445
+ type: string;
1446
+ format: string;
1447
+ description: string;
1448
+ };
1449
+ updatedAt: {
1450
+ type: string;
1451
+ format: string;
1452
+ description: string;
1453
+ };
1454
+ };
1455
+ required: string[];
1456
+ };
1457
+ };
1458
+ required: string[];
1459
+ };
1460
+ };
1461
+ };
1462
+ };
1463
+ };
1464
+ };
1465
+ };
1466
+ } & {
1467
+ use: any[];
1468
+ };
1469
+ path: "/change-password";
1470
+ };
1471
+ setPassword: {
1472
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1473
+ body: {
1474
+ newPassword: string;
1475
+ };
1476
+ } & {
1477
+ method?: "POST" | undefined;
1478
+ } & {
1479
+ query?: Record<string, any> | undefined;
1480
+ } & {
1481
+ params?: Record<string, any>;
1482
+ } & {
1483
+ request?: Request;
1484
+ } & {
1485
+ headers?: HeadersInit;
1486
+ } & {
1487
+ asResponse?: boolean;
1488
+ returnHeaders?: boolean;
1489
+ use?: import("better-call").Middleware[];
1490
+ path?: string;
1491
+ } & {
1492
+ asResponse?: AsResponse | undefined;
1493
+ returnHeaders?: ReturnHeaders | undefined;
1494
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1495
+ headers: Headers;
1496
+ response: {
1497
+ status: boolean;
1498
+ };
1499
+ } : {
1500
+ status: boolean;
1501
+ }>;
1502
+ options: {
1503
+ method: "POST";
1504
+ body: import("zod").ZodObject<{
1505
+ newPassword: import("zod").ZodString;
1506
+ }, import("better-auth").$strip>;
1507
+ metadata: {
1508
+ SERVER_ONLY: true;
1509
+ };
1510
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1511
+ session: {
1512
+ session: Record<string, any> & {
1513
+ id: string;
1514
+ userId: string;
1515
+ expiresAt: Date;
1516
+ createdAt: Date;
1517
+ updatedAt: Date;
1518
+ token: string;
1519
+ ipAddress?: string | null | undefined;
1520
+ userAgent?: string | null | undefined;
1521
+ };
1522
+ user: Record<string, any> & {
1523
+ id: string;
1524
+ email: string;
1525
+ emailVerified: boolean;
1526
+ name: string;
1527
+ createdAt: Date;
1528
+ updatedAt: Date;
1529
+ image?: string | null | undefined;
1530
+ };
1531
+ };
1532
+ }>)[];
1533
+ } & {
1534
+ use: any[];
1535
+ };
1536
+ path: "/set-password";
1537
+ };
1538
+ updateUser: {
1539
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1540
+ body: Partial<{}> & {
1541
+ name?: string;
1542
+ image?: string;
1543
+ };
1544
+ } & {
1545
+ method?: "POST" | undefined;
1546
+ } & {
1547
+ query?: Record<string, any> | undefined;
1548
+ } & {
1549
+ params?: Record<string, any>;
1550
+ } & {
1551
+ request?: Request;
1552
+ } & {
1553
+ headers?: HeadersInit;
1554
+ } & {
1555
+ asResponse?: boolean;
1556
+ returnHeaders?: boolean;
1557
+ use?: import("better-call").Middleware[];
1558
+ path?: string;
1559
+ } & {
1560
+ asResponse?: AsResponse | undefined;
1561
+ returnHeaders?: ReturnHeaders | undefined;
1562
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1563
+ headers: Headers;
1564
+ response: {
1565
+ status: boolean;
1566
+ };
1567
+ } : {
1568
+ status: boolean;
1569
+ }>;
1570
+ options: {
1571
+ method: "POST";
1572
+ body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
1573
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1574
+ session: {
1575
+ session: Record<string, any> & {
1576
+ id: string;
1577
+ userId: string;
1578
+ expiresAt: Date;
1579
+ createdAt: Date;
1580
+ updatedAt: Date;
1581
+ token: string;
1582
+ ipAddress?: string | null | undefined;
1583
+ userAgent?: string | null | undefined;
1584
+ };
1585
+ user: Record<string, any> & {
1586
+ id: string;
1587
+ email: string;
1588
+ emailVerified: boolean;
1589
+ name: string;
1590
+ createdAt: Date;
1591
+ updatedAt: Date;
1592
+ image?: string | null | undefined;
1593
+ };
1594
+ };
1595
+ }>)[];
1596
+ metadata: {
1597
+ $Infer: {
1598
+ body: Partial<{}> & {
1599
+ name?: string;
1600
+ image?: string;
1601
+ };
1602
+ };
1603
+ openapi: {
1604
+ description: string;
1605
+ requestBody: {
1606
+ content: {
1607
+ "application/json": {
1608
+ schema: {
1609
+ type: "object";
1610
+ properties: {
1611
+ name: {
1612
+ type: string;
1613
+ description: string;
1614
+ };
1615
+ image: {
1616
+ type: string;
1617
+ description: string;
1618
+ };
1619
+ };
1620
+ };
1621
+ };
1622
+ };
1623
+ };
1624
+ responses: {
1625
+ "200": {
1626
+ description: string;
1627
+ content: {
1628
+ "application/json": {
1629
+ schema: {
1630
+ type: "object";
1631
+ properties: {
1632
+ status: {
1633
+ type: string;
1634
+ description: string;
1635
+ };
1636
+ };
1637
+ };
1638
+ };
1639
+ };
1640
+ };
1641
+ };
1642
+ };
1643
+ };
1644
+ } & {
1645
+ use: any[];
1646
+ };
1647
+ path: "/update-user";
1648
+ };
1649
+ deleteUser: {
1650
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1651
+ body: {
1652
+ callbackURL?: string | undefined;
1653
+ password?: string | undefined;
1654
+ token?: string | undefined;
1655
+ };
1656
+ } & {
1657
+ method?: "POST" | undefined;
1658
+ } & {
1659
+ query?: Record<string, any> | undefined;
1660
+ } & {
1661
+ params?: Record<string, any>;
1662
+ } & {
1663
+ request?: Request;
1664
+ } & {
1665
+ headers?: HeadersInit;
1666
+ } & {
1667
+ asResponse?: boolean;
1668
+ returnHeaders?: boolean;
1669
+ use?: import("better-call").Middleware[];
1670
+ path?: string;
1671
+ } & {
1672
+ asResponse?: AsResponse | undefined;
1673
+ returnHeaders?: ReturnHeaders | undefined;
1674
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1675
+ headers: Headers;
1676
+ response: {
1677
+ success: boolean;
1678
+ message: string;
1679
+ };
1680
+ } : {
1681
+ success: boolean;
1682
+ message: string;
1683
+ }>;
1684
+ options: {
1685
+ method: "POST";
1686
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1687
+ session: {
1688
+ session: Record<string, any> & {
1689
+ id: string;
1690
+ userId: string;
1691
+ expiresAt: Date;
1692
+ createdAt: Date;
1693
+ updatedAt: Date;
1694
+ token: string;
1695
+ ipAddress?: string | null | undefined;
1696
+ userAgent?: string | null | undefined;
1697
+ };
1698
+ user: Record<string, any> & {
1699
+ id: string;
1700
+ email: string;
1701
+ emailVerified: boolean;
1702
+ name: string;
1703
+ createdAt: Date;
1704
+ updatedAt: Date;
1705
+ image?: string | null | undefined;
1706
+ };
1707
+ };
1708
+ }>)[];
1709
+ body: import("zod").ZodObject<{
1710
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1711
+ password: import("zod").ZodOptional<import("zod").ZodString>;
1712
+ token: import("zod").ZodOptional<import("zod").ZodString>;
1713
+ }, import("better-auth").$strip>;
1714
+ metadata: {
1715
+ openapi: {
1716
+ description: string;
1717
+ responses: {
1718
+ "200": {
1719
+ description: string;
1720
+ content: {
1721
+ "application/json": {
1722
+ schema: {
1723
+ type: "object";
1724
+ properties: {
1725
+ success: {
1726
+ type: string;
1727
+ description: string;
1728
+ };
1729
+ message: {
1730
+ type: string;
1731
+ enum: string[];
1732
+ description: string;
1733
+ };
1734
+ };
1735
+ required: string[];
1736
+ };
1737
+ };
1738
+ };
1739
+ };
1740
+ };
1741
+ };
1742
+ };
1743
+ } & {
1744
+ use: any[];
1745
+ };
1746
+ path: "/delete-user";
1747
+ };
1748
+ forgetPasswordCallback: {
1749
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1750
+ body?: undefined;
1751
+ } & {
1752
+ method?: "GET" | undefined;
1753
+ } & {
1754
+ query: {
1755
+ callbackURL: string;
1756
+ };
1757
+ } & {
1758
+ params: {
1759
+ token: string;
1760
+ };
1761
+ } & {
1762
+ request?: Request;
1763
+ } & {
1764
+ headers?: HeadersInit;
1765
+ } & {
1766
+ asResponse?: boolean;
1767
+ returnHeaders?: boolean;
1768
+ use?: import("better-call").Middleware[];
1769
+ path?: string;
1770
+ } & {
1771
+ asResponse?: AsResponse | undefined;
1772
+ returnHeaders?: ReturnHeaders | undefined;
1773
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1774
+ headers: Headers;
1775
+ response: never;
1776
+ } : never>;
1777
+ options: {
1778
+ method: "GET";
1779
+ query: import("zod").ZodObject<{
1780
+ callbackURL: import("zod").ZodString;
1781
+ }, import("better-auth").$strip>;
1782
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
1783
+ metadata: {
1784
+ openapi: {
1785
+ description: string;
1786
+ responses: {
1787
+ "200": {
1788
+ description: string;
1789
+ content: {
1790
+ "application/json": {
1791
+ schema: {
1792
+ type: "object";
1793
+ properties: {
1794
+ token: {
1795
+ type: string;
1796
+ };
1797
+ };
1798
+ };
1799
+ };
1800
+ };
1801
+ };
1802
+ };
1803
+ };
1804
+ };
1805
+ } & {
1806
+ use: any[];
1807
+ };
1808
+ path: "/reset-password/:token";
1809
+ };
1810
+ requestPasswordReset: {
1811
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1812
+ body: {
1813
+ email: string;
1814
+ redirectTo?: string | undefined;
1815
+ };
1816
+ } & {
1817
+ method?: "POST" | undefined;
1818
+ } & {
1819
+ query?: Record<string, any> | undefined;
1820
+ } & {
1821
+ params?: Record<string, any>;
1822
+ } & {
1823
+ request?: Request;
1824
+ } & {
1825
+ headers?: HeadersInit;
1826
+ } & {
1827
+ asResponse?: boolean;
1828
+ returnHeaders?: boolean;
1829
+ use?: import("better-call").Middleware[];
1830
+ path?: string;
1831
+ } & {
1832
+ asResponse?: AsResponse | undefined;
1833
+ returnHeaders?: ReturnHeaders | undefined;
1834
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1835
+ headers: Headers;
1836
+ response: {
1837
+ status: boolean;
1838
+ };
1839
+ } : {
1840
+ status: boolean;
1841
+ }>;
1842
+ options: {
1843
+ method: "POST";
1844
+ body: import("zod").ZodObject<{
1845
+ email: zod.ZodEmail;
1846
+ redirectTo: import("zod").ZodOptional<import("zod").ZodString>;
1847
+ }, import("better-auth").$strip>;
1848
+ metadata: {
1849
+ openapi: {
1850
+ description: string;
1851
+ responses: {
1852
+ "200": {
1853
+ description: string;
1854
+ content: {
1855
+ "application/json": {
1856
+ schema: {
1857
+ type: "object";
1858
+ properties: {
1859
+ status: {
1860
+ type: string;
1861
+ };
1862
+ message: {
1863
+ type: string;
1864
+ };
1865
+ };
1866
+ };
1867
+ };
1868
+ };
1869
+ };
1870
+ };
1871
+ };
1872
+ };
1873
+ } & {
1874
+ use: any[];
1875
+ };
1876
+ path: "/request-password-reset";
1877
+ };
1878
+ requestPasswordResetCallback: {
1879
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1880
+ body?: undefined;
1881
+ } & {
1882
+ method?: "GET" | undefined;
1883
+ } & {
1884
+ query: {
1885
+ callbackURL: string;
1886
+ };
1887
+ } & {
1888
+ params: {
1889
+ token: string;
1890
+ };
1891
+ } & {
1892
+ request?: Request;
1893
+ } & {
1894
+ headers?: HeadersInit;
1895
+ } & {
1896
+ asResponse?: boolean;
1897
+ returnHeaders?: boolean;
1898
+ use?: import("better-call").Middleware[];
1899
+ path?: string;
1900
+ } & {
1901
+ asResponse?: AsResponse | undefined;
1902
+ returnHeaders?: ReturnHeaders | undefined;
1903
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1904
+ headers: Headers;
1905
+ response: never;
1906
+ } : never>;
1907
+ options: {
1908
+ method: "GET";
1909
+ query: import("zod").ZodObject<{
1910
+ callbackURL: import("zod").ZodString;
1911
+ }, import("better-auth").$strip>;
1912
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
1913
+ metadata: {
1914
+ openapi: {
1915
+ description: string;
1916
+ responses: {
1917
+ "200": {
1918
+ description: string;
1919
+ content: {
1920
+ "application/json": {
1921
+ schema: {
1922
+ type: "object";
1923
+ properties: {
1924
+ token: {
1925
+ type: string;
1926
+ };
1927
+ };
1928
+ };
1929
+ };
1930
+ };
1931
+ };
1932
+ };
1933
+ };
1934
+ };
1935
+ } & {
1936
+ use: any[];
1937
+ };
1938
+ path: "/reset-password/:token";
1939
+ };
1940
+ listSessions: {
1941
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
1942
+ body?: undefined;
1943
+ } & {
1944
+ method?: "GET" | undefined;
1945
+ } & {
1946
+ query?: Record<string, any> | undefined;
1947
+ } & {
1948
+ params?: Record<string, any>;
1949
+ } & {
1950
+ request?: Request;
1951
+ } & {
1952
+ headers: HeadersInit;
1953
+ } & {
1954
+ asResponse?: boolean;
1955
+ returnHeaders?: boolean;
1956
+ use?: import("better-call").Middleware[];
1957
+ path?: string;
1958
+ } & {
1959
+ asResponse?: AsResponse | undefined;
1960
+ returnHeaders?: ReturnHeaders | undefined;
1961
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1962
+ headers: Headers;
1963
+ response: import("better-auth").Prettify<{
1964
+ id: string;
1965
+ userId: string;
1966
+ expiresAt: Date;
1967
+ createdAt: Date;
1968
+ updatedAt: Date;
1969
+ token: string;
1970
+ ipAddress?: string | null | undefined | undefined;
1971
+ userAgent?: string | null | undefined | undefined;
1972
+ }>[];
1973
+ } : import("better-auth").Prettify<{
1974
+ id: string;
1975
+ userId: string;
1976
+ expiresAt: Date;
1977
+ createdAt: Date;
1978
+ updatedAt: Date;
1979
+ token: string;
1980
+ ipAddress?: string | null | undefined | undefined;
1981
+ userAgent?: string | null | undefined | undefined;
1982
+ }>[]>;
1983
+ options: {
1984
+ method: "GET";
1985
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1986
+ session: {
1987
+ session: Record<string, any> & {
1988
+ id: string;
1989
+ userId: string;
1990
+ expiresAt: Date;
1991
+ createdAt: Date;
1992
+ updatedAt: Date;
1993
+ token: string;
1994
+ ipAddress?: string | null | undefined;
1995
+ userAgent?: string | null | undefined;
1996
+ };
1997
+ user: Record<string, any> & {
1998
+ id: string;
1999
+ email: string;
2000
+ emailVerified: boolean;
2001
+ name: string;
2002
+ createdAt: Date;
2003
+ updatedAt: Date;
2004
+ image?: string | null | undefined;
2005
+ };
2006
+ };
2007
+ }>)[];
2008
+ requireHeaders: true;
2009
+ metadata: {
2010
+ openapi: {
2011
+ description: string;
2012
+ responses: {
2013
+ "200": {
2014
+ description: string;
2015
+ content: {
2016
+ "application/json": {
2017
+ schema: {
2018
+ type: "array";
2019
+ items: {
2020
+ $ref: string;
2021
+ };
2022
+ };
2023
+ };
2024
+ };
2025
+ };
2026
+ };
2027
+ };
2028
+ };
2029
+ } & {
2030
+ use: any[];
2031
+ };
2032
+ path: "/list-sessions";
2033
+ };
2034
+ revokeSession: {
2035
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2036
+ body: {
2037
+ token: string;
2038
+ };
2039
+ } & {
2040
+ method?: "POST" | undefined;
2041
+ } & {
2042
+ query?: Record<string, any> | undefined;
2043
+ } & {
2044
+ params?: Record<string, any>;
2045
+ } & {
2046
+ request?: Request;
2047
+ } & {
2048
+ headers: HeadersInit;
2049
+ } & {
2050
+ asResponse?: boolean;
2051
+ returnHeaders?: boolean;
2052
+ use?: import("better-call").Middleware[];
2053
+ path?: string;
2054
+ } & {
2055
+ asResponse?: AsResponse | undefined;
2056
+ returnHeaders?: ReturnHeaders | undefined;
2057
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2058
+ headers: Headers;
2059
+ response: {
2060
+ status: boolean;
2061
+ };
2062
+ } : {
2063
+ status: boolean;
2064
+ }>;
2065
+ options: {
2066
+ method: "POST";
2067
+ body: import("zod").ZodObject<{
2068
+ token: import("zod").ZodString;
2069
+ }, import("better-auth").$strip>;
2070
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2071
+ session: {
2072
+ session: Record<string, any> & {
2073
+ id: string;
2074
+ userId: string;
2075
+ expiresAt: Date;
2076
+ createdAt: Date;
2077
+ updatedAt: Date;
2078
+ token: string;
2079
+ ipAddress?: string | null | undefined;
2080
+ userAgent?: string | null | undefined;
2081
+ };
2082
+ user: Record<string, any> & {
2083
+ id: string;
2084
+ email: string;
2085
+ emailVerified: boolean;
2086
+ name: string;
2087
+ createdAt: Date;
2088
+ updatedAt: Date;
2089
+ image?: string | null | undefined;
2090
+ };
2091
+ };
2092
+ }>)[];
2093
+ requireHeaders: true;
2094
+ metadata: {
2095
+ openapi: {
2096
+ description: string;
2097
+ requestBody: {
2098
+ content: {
2099
+ "application/json": {
2100
+ schema: {
2101
+ type: "object";
2102
+ properties: {
2103
+ token: {
2104
+ type: string;
2105
+ description: string;
2106
+ };
2107
+ };
2108
+ required: string[];
2109
+ };
2110
+ };
2111
+ };
2112
+ };
2113
+ responses: {
2114
+ "200": {
2115
+ description: string;
2116
+ content: {
2117
+ "application/json": {
2118
+ schema: {
2119
+ type: "object";
2120
+ properties: {
2121
+ status: {
2122
+ type: string;
2123
+ description: string;
2124
+ };
2125
+ };
2126
+ required: string[];
2127
+ };
2128
+ };
2129
+ };
2130
+ };
2131
+ };
2132
+ };
2133
+ };
2134
+ } & {
2135
+ use: any[];
2136
+ };
2137
+ path: "/revoke-session";
2138
+ };
2139
+ revokeSessions: {
2140
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2141
+ body?: undefined;
2142
+ } & {
2143
+ method?: "POST" | undefined;
2144
+ } & {
2145
+ query?: Record<string, any> | undefined;
2146
+ } & {
2147
+ params?: Record<string, any>;
2148
+ } & {
2149
+ request?: Request;
2150
+ } & {
2151
+ headers: HeadersInit;
2152
+ } & {
2153
+ asResponse?: boolean;
2154
+ returnHeaders?: boolean;
2155
+ use?: import("better-call").Middleware[];
2156
+ path?: string;
2157
+ } & {
2158
+ asResponse?: AsResponse | undefined;
2159
+ returnHeaders?: ReturnHeaders | undefined;
2160
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2161
+ headers: Headers;
2162
+ response: {
2163
+ status: boolean;
2164
+ };
2165
+ } : {
2166
+ status: boolean;
2167
+ }>;
2168
+ options: {
2169
+ method: "POST";
2170
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2171
+ session: {
2172
+ session: Record<string, any> & {
2173
+ id: string;
2174
+ userId: string;
2175
+ expiresAt: Date;
2176
+ createdAt: Date;
2177
+ updatedAt: Date;
2178
+ token: string;
2179
+ ipAddress?: string | null | undefined;
2180
+ userAgent?: string | null | undefined;
2181
+ };
2182
+ user: Record<string, any> & {
2183
+ id: string;
2184
+ email: string;
2185
+ emailVerified: boolean;
2186
+ name: string;
2187
+ createdAt: Date;
2188
+ updatedAt: Date;
2189
+ image?: string | null | undefined;
2190
+ };
2191
+ };
2192
+ }>)[];
2193
+ requireHeaders: true;
2194
+ metadata: {
2195
+ openapi: {
2196
+ description: string;
2197
+ responses: {
2198
+ "200": {
2199
+ description: string;
2200
+ content: {
2201
+ "application/json": {
2202
+ schema: {
2203
+ type: "object";
2204
+ properties: {
2205
+ status: {
2206
+ type: string;
2207
+ description: string;
2208
+ };
2209
+ };
2210
+ required: string[];
2211
+ };
2212
+ };
2213
+ };
2214
+ };
2215
+ };
2216
+ };
2217
+ };
2218
+ } & {
2219
+ use: any[];
2220
+ };
2221
+ path: "/revoke-sessions";
2222
+ };
2223
+ revokeOtherSessions: {
2224
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2225
+ body?: undefined;
2226
+ } & {
2227
+ method?: "POST" | undefined;
2228
+ } & {
2229
+ query?: Record<string, any> | undefined;
2230
+ } & {
2231
+ params?: Record<string, any>;
2232
+ } & {
2233
+ request?: Request;
2234
+ } & {
2235
+ headers: HeadersInit;
2236
+ } & {
2237
+ asResponse?: boolean;
2238
+ returnHeaders?: boolean;
2239
+ use?: import("better-call").Middleware[];
2240
+ path?: string;
2241
+ } & {
2242
+ asResponse?: AsResponse | undefined;
2243
+ returnHeaders?: ReturnHeaders | undefined;
2244
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2245
+ headers: Headers;
2246
+ response: {
2247
+ status: boolean;
2248
+ };
2249
+ } : {
2250
+ status: boolean;
2251
+ }>;
2252
+ options: {
2253
+ method: "POST";
2254
+ requireHeaders: true;
2255
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2256
+ session: {
2257
+ session: Record<string, any> & {
2258
+ id: string;
2259
+ userId: string;
2260
+ expiresAt: Date;
2261
+ createdAt: Date;
2262
+ updatedAt: Date;
2263
+ token: string;
2264
+ ipAddress?: string | null | undefined;
2265
+ userAgent?: string | null | undefined;
2266
+ };
2267
+ user: Record<string, any> & {
2268
+ id: string;
2269
+ email: string;
2270
+ emailVerified: boolean;
2271
+ name: string;
2272
+ createdAt: Date;
2273
+ updatedAt: Date;
2274
+ image?: string | null | undefined;
2275
+ };
2276
+ };
2277
+ }>)[];
2278
+ metadata: {
2279
+ openapi: {
2280
+ description: string;
2281
+ responses: {
2282
+ "200": {
2283
+ description: string;
2284
+ content: {
2285
+ "application/json": {
2286
+ schema: {
2287
+ type: "object";
2288
+ properties: {
2289
+ status: {
2290
+ type: string;
2291
+ description: string;
2292
+ };
2293
+ };
2294
+ required: string[];
2295
+ };
2296
+ };
2297
+ };
2298
+ };
2299
+ };
2300
+ };
2301
+ };
2302
+ } & {
2303
+ use: any[];
2304
+ };
2305
+ path: "/revoke-other-sessions";
2306
+ };
2307
+ linkSocialAccount: {
2308
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2309
+ body: {
2310
+ provider: unknown;
2311
+ callbackURL?: string | undefined;
2312
+ idToken?: {
2313
+ token: string;
2314
+ nonce?: string | undefined;
2315
+ accessToken?: string | undefined;
2316
+ refreshToken?: string | undefined;
2317
+ scopes?: string[] | undefined;
2318
+ } | undefined;
2319
+ requestSignUp?: boolean | undefined;
2320
+ scopes?: string[] | undefined;
2321
+ errorCallbackURL?: string | undefined;
2322
+ disableRedirect?: boolean | undefined;
2323
+ };
2324
+ } & {
2325
+ method?: "POST" | undefined;
2326
+ } & {
2327
+ query?: Record<string, any> | undefined;
2328
+ } & {
2329
+ params?: Record<string, any>;
2330
+ } & {
2331
+ request?: Request;
2332
+ } & {
2333
+ headers: HeadersInit;
2334
+ } & {
2335
+ asResponse?: boolean;
2336
+ returnHeaders?: boolean;
2337
+ use?: import("better-call").Middleware[];
2338
+ path?: string;
2339
+ } & {
2340
+ asResponse?: AsResponse | undefined;
2341
+ returnHeaders?: ReturnHeaders | undefined;
2342
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2343
+ headers: Headers;
2344
+ response: {
2345
+ url: string;
2346
+ redirect: boolean;
2347
+ };
2348
+ } : {
2349
+ url: string;
2350
+ redirect: boolean;
2351
+ }>;
2352
+ options: {
2353
+ method: "POST";
2354
+ requireHeaders: true;
2355
+ body: import("zod").ZodObject<{
2356
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2357
+ provider: import("zod").ZodType<"apple" | (string & {}) | "discord" | "facebook" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "notion", unknown, import("better-auth").$ZodTypeInternals<"apple" | (string & {}) | "discord" | "facebook" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "notion", unknown>>;
2358
+ idToken: import("zod").ZodOptional<import("zod").ZodObject<{
2359
+ token: import("zod").ZodString;
2360
+ nonce: import("zod").ZodOptional<import("zod").ZodString>;
2361
+ accessToken: import("zod").ZodOptional<import("zod").ZodString>;
2362
+ refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
2363
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
2364
+ }, import("better-auth").$strip>>;
2365
+ requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
2366
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
2367
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2368
+ disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
2369
+ }, import("better-auth").$strip>;
2370
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2371
+ session: {
2372
+ session: Record<string, any> & {
2373
+ id: string;
2374
+ userId: string;
2375
+ expiresAt: Date;
2376
+ createdAt: Date;
2377
+ updatedAt: Date;
2378
+ token: string;
2379
+ ipAddress?: string | null | undefined;
2380
+ userAgent?: string | null | undefined;
2381
+ };
2382
+ user: Record<string, any> & {
2383
+ id: string;
2384
+ email: string;
2385
+ emailVerified: boolean;
2386
+ name: string;
2387
+ createdAt: Date;
2388
+ updatedAt: Date;
2389
+ image?: string | null | undefined;
2390
+ };
2391
+ };
2392
+ }>)[];
2393
+ metadata: {
2394
+ openapi: {
2395
+ description: string;
2396
+ responses: {
2397
+ "200": {
2398
+ description: string;
2399
+ content: {
2400
+ "application/json": {
2401
+ schema: {
2402
+ type: "object";
2403
+ properties: {
2404
+ url: {
2405
+ type: string;
2406
+ description: string;
2407
+ };
2408
+ redirect: {
2409
+ type: string;
2410
+ description: string;
2411
+ };
2412
+ status: {
2413
+ type: string;
2414
+ };
2415
+ };
2416
+ required: string[];
2417
+ };
2418
+ };
2419
+ };
2420
+ };
2421
+ };
2422
+ };
2423
+ };
2424
+ } & {
2425
+ use: any[];
2426
+ };
2427
+ path: "/link-social";
2428
+ };
2429
+ listUserAccounts: {
2430
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
2431
+ body?: undefined;
2432
+ } & {
2433
+ method?: "GET" | undefined;
2434
+ } & {
2435
+ query?: Record<string, any> | undefined;
2436
+ } & {
2437
+ params?: Record<string, any>;
2438
+ } & {
2439
+ request?: Request;
2440
+ } & {
2441
+ headers?: HeadersInit;
2442
+ } & {
2443
+ asResponse?: boolean;
2444
+ returnHeaders?: boolean;
2445
+ use?: import("better-call").Middleware[];
2446
+ path?: string;
2447
+ } & {
2448
+ asResponse?: AsResponse | undefined;
2449
+ returnHeaders?: ReturnHeaders | undefined;
2450
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2451
+ headers: Headers;
2452
+ response: {
2453
+ id: string;
2454
+ provider: string;
2455
+ createdAt: Date;
2456
+ updatedAt: Date;
2457
+ accountId: string;
2458
+ scopes: string[];
2459
+ }[];
2460
+ } : {
2461
+ id: string;
2462
+ provider: string;
2463
+ createdAt: Date;
2464
+ updatedAt: Date;
2465
+ accountId: string;
2466
+ scopes: string[];
2467
+ }[]>;
2468
+ options: {
2469
+ method: "GET";
2470
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2471
+ session: {
2472
+ session: Record<string, any> & {
2473
+ id: string;
2474
+ userId: string;
2475
+ expiresAt: Date;
2476
+ createdAt: Date;
2477
+ updatedAt: Date;
2478
+ token: string;
2479
+ ipAddress?: string | null | undefined;
2480
+ userAgent?: string | null | undefined;
2481
+ };
2482
+ user: Record<string, any> & {
2483
+ id: string;
2484
+ email: string;
2485
+ emailVerified: boolean;
2486
+ name: string;
2487
+ createdAt: Date;
2488
+ updatedAt: Date;
2489
+ image?: string | null | undefined;
2490
+ };
2491
+ };
2492
+ }>)[];
2493
+ metadata: {
2494
+ openapi: {
2495
+ description: string;
2496
+ responses: {
2497
+ "200": {
2498
+ description: string;
2499
+ content: {
2500
+ "application/json": {
2501
+ schema: {
2502
+ type: "array";
2503
+ items: {
2504
+ type: string;
2505
+ properties: {
2506
+ id: {
2507
+ type: string;
2508
+ };
2509
+ provider: {
2510
+ type: string;
2511
+ };
2512
+ createdAt: {
2513
+ type: string;
2514
+ format: string;
2515
+ };
2516
+ updatedAt: {
2517
+ type: string;
2518
+ format: string;
2519
+ };
2520
+ };
2521
+ accountId: {
2522
+ type: string;
2523
+ };
2524
+ scopes: {
2525
+ type: string;
2526
+ items: {
2527
+ type: string;
2528
+ };
2529
+ };
2530
+ };
2531
+ required: string[];
2532
+ };
2533
+ };
2534
+ };
2535
+ };
2536
+ };
2537
+ };
2538
+ };
2539
+ } & {
2540
+ use: any[];
2541
+ };
2542
+ path: "/list-accounts";
2543
+ };
2544
+ deleteUserCallback: {
2545
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2546
+ body?: undefined;
2547
+ } & {
2548
+ method?: "GET" | undefined;
2549
+ } & {
2550
+ query: {
2551
+ token: string;
2552
+ callbackURL?: string | undefined;
2553
+ };
2554
+ } & {
2555
+ params?: Record<string, any>;
2556
+ } & {
2557
+ request?: Request;
2558
+ } & {
2559
+ headers?: HeadersInit;
2560
+ } & {
2561
+ asResponse?: boolean;
2562
+ returnHeaders?: boolean;
2563
+ use?: import("better-call").Middleware[];
2564
+ path?: string;
2565
+ } & {
2566
+ asResponse?: AsResponse | undefined;
2567
+ returnHeaders?: ReturnHeaders | undefined;
2568
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2569
+ headers: Headers;
2570
+ response: {
2571
+ success: boolean;
2572
+ message: string;
2573
+ };
2574
+ } : {
2575
+ success: boolean;
2576
+ message: string;
2577
+ }>;
2578
+ options: {
2579
+ method: "GET";
2580
+ query: import("zod").ZodObject<{
2581
+ token: import("zod").ZodString;
2582
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2583
+ }, import("better-auth").$strip>;
2584
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
2585
+ metadata: {
2586
+ openapi: {
2587
+ description: string;
2588
+ responses: {
2589
+ "200": {
2590
+ description: string;
2591
+ content: {
2592
+ "application/json": {
2593
+ schema: {
2594
+ type: "object";
2595
+ properties: {
2596
+ success: {
2597
+ type: string;
2598
+ description: string;
2599
+ };
2600
+ message: {
2601
+ type: string;
2602
+ enum: string[];
2603
+ description: string;
2604
+ };
2605
+ };
2606
+ required: string[];
2607
+ };
2608
+ };
2609
+ };
2610
+ };
2611
+ };
2612
+ };
2613
+ };
2614
+ } & {
2615
+ use: any[];
2616
+ };
2617
+ path: "/delete-user/callback";
2618
+ };
2619
+ unlinkAccount: {
2620
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2621
+ body: {
2622
+ providerId: string;
2623
+ accountId?: string | undefined;
2624
+ };
2625
+ } & {
2626
+ method?: "POST" | undefined;
2627
+ } & {
2628
+ query?: Record<string, any> | undefined;
2629
+ } & {
2630
+ params?: Record<string, any>;
2631
+ } & {
2632
+ request?: Request;
2633
+ } & {
2634
+ headers?: HeadersInit;
2635
+ } & {
2636
+ asResponse?: boolean;
2637
+ returnHeaders?: boolean;
2638
+ use?: import("better-call").Middleware[];
2639
+ path?: string;
2640
+ } & {
2641
+ asResponse?: AsResponse | undefined;
2642
+ returnHeaders?: ReturnHeaders | undefined;
2643
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2644
+ headers: Headers;
2645
+ response: {
2646
+ status: boolean;
2647
+ };
2648
+ } : {
2649
+ status: boolean;
2650
+ }>;
2651
+ options: {
2652
+ method: "POST";
2653
+ body: import("zod").ZodObject<{
2654
+ providerId: import("zod").ZodString;
2655
+ accountId: import("zod").ZodOptional<import("zod").ZodString>;
2656
+ }, import("better-auth").$strip>;
2657
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2658
+ session: {
2659
+ session: Record<string, any> & {
2660
+ id: string;
2661
+ userId: string;
2662
+ expiresAt: Date;
2663
+ createdAt: Date;
2664
+ updatedAt: Date;
2665
+ token: string;
2666
+ ipAddress?: string | null | undefined;
2667
+ userAgent?: string | null | undefined;
2668
+ };
2669
+ user: Record<string, any> & {
2670
+ id: string;
2671
+ email: string;
2672
+ emailVerified: boolean;
2673
+ name: string;
2674
+ createdAt: Date;
2675
+ updatedAt: Date;
2676
+ image?: string | null | undefined;
2677
+ };
2678
+ };
2679
+ }>)[];
2680
+ metadata: {
2681
+ openapi: {
2682
+ description: string;
2683
+ responses: {
2684
+ "200": {
2685
+ description: string;
2686
+ content: {
2687
+ "application/json": {
2688
+ schema: {
2689
+ type: "object";
2690
+ properties: {
2691
+ status: {
2692
+ type: string;
2693
+ };
2694
+ };
2695
+ };
2696
+ };
2697
+ };
2698
+ };
2699
+ };
2700
+ };
2701
+ };
2702
+ } & {
2703
+ use: any[];
2704
+ };
2705
+ path: "/unlink-account";
2706
+ };
2707
+ refreshToken: {
2708
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2709
+ body: {
2710
+ providerId: string;
2711
+ accountId?: string | undefined;
2712
+ userId?: string | undefined;
2713
+ };
2714
+ } & {
2715
+ method?: "POST" | undefined;
2716
+ } & {
2717
+ query?: Record<string, any> | undefined;
2718
+ } & {
2719
+ params?: Record<string, any>;
2720
+ } & {
2721
+ request?: Request;
2722
+ } & {
2723
+ headers?: HeadersInit;
2724
+ } & {
2725
+ asResponse?: boolean;
2726
+ returnHeaders?: boolean;
2727
+ use?: import("better-call").Middleware[];
2728
+ path?: string;
2729
+ } & {
2730
+ asResponse?: AsResponse | undefined;
2731
+ returnHeaders?: ReturnHeaders | undefined;
2732
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2733
+ headers: Headers;
2734
+ response: import("better-auth").OAuth2Tokens;
2735
+ } : import("better-auth").OAuth2Tokens>;
2736
+ options: {
2737
+ method: "POST";
2738
+ body: import("zod").ZodObject<{
2739
+ providerId: import("zod").ZodString;
2740
+ accountId: import("zod").ZodOptional<import("zod").ZodString>;
2741
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
2742
+ }, import("better-auth").$strip>;
2743
+ metadata: {
2744
+ openapi: {
2745
+ description: string;
2746
+ responses: {
2747
+ 200: {
2748
+ description: string;
2749
+ content: {
2750
+ "application/json": {
2751
+ schema: {
2752
+ type: "object";
2753
+ properties: {
2754
+ tokenType: {
2755
+ type: string;
2756
+ };
2757
+ idToken: {
2758
+ type: string;
2759
+ };
2760
+ accessToken: {
2761
+ type: string;
2762
+ };
2763
+ refreshToken: {
2764
+ type: string;
2765
+ };
2766
+ accessTokenExpiresAt: {
2767
+ type: string;
2768
+ format: string;
2769
+ };
2770
+ refreshTokenExpiresAt: {
2771
+ type: string;
2772
+ format: string;
2773
+ };
2774
+ };
2775
+ };
2776
+ };
2777
+ };
2778
+ };
2779
+ 400: {
2780
+ description: string;
2781
+ };
2782
+ };
2783
+ };
2784
+ };
2785
+ } & {
2786
+ use: any[];
2787
+ };
2788
+ path: "/refresh-token";
2789
+ };
2790
+ getAccessToken: {
2791
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2792
+ body: {
2793
+ providerId: string;
2794
+ accountId?: string | undefined;
2795
+ userId?: string | undefined;
2796
+ };
2797
+ } & {
2798
+ method?: "POST" | undefined;
2799
+ } & {
2800
+ query?: Record<string, any> | undefined;
2801
+ } & {
2802
+ params?: Record<string, any>;
2803
+ } & {
2804
+ request?: Request;
2805
+ } & {
2806
+ headers?: HeadersInit;
2807
+ } & {
2808
+ asResponse?: boolean;
2809
+ returnHeaders?: boolean;
2810
+ use?: import("better-call").Middleware[];
2811
+ path?: string;
2812
+ } & {
2813
+ asResponse?: AsResponse | undefined;
2814
+ returnHeaders?: ReturnHeaders | undefined;
2815
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2816
+ headers: Headers;
2817
+ response: {
2818
+ accessToken: string;
2819
+ accessTokenExpiresAt: Date | undefined;
2820
+ scopes: string[];
2821
+ idToken: string | undefined;
2822
+ };
2823
+ } : {
2824
+ accessToken: string;
2825
+ accessTokenExpiresAt: Date | undefined;
2826
+ scopes: string[];
2827
+ idToken: string | undefined;
2828
+ }>;
2829
+ options: {
2830
+ method: "POST";
2831
+ body: import("zod").ZodObject<{
2832
+ providerId: import("zod").ZodString;
2833
+ accountId: import("zod").ZodOptional<import("zod").ZodString>;
2834
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
2835
+ }, import("better-auth").$strip>;
2836
+ metadata: {
2837
+ openapi: {
2838
+ description: string;
2839
+ responses: {
2840
+ 200: {
2841
+ description: string;
2842
+ content: {
2843
+ "application/json": {
2844
+ schema: {
2845
+ type: "object";
2846
+ properties: {
2847
+ tokenType: {
2848
+ type: string;
2849
+ };
2850
+ idToken: {
2851
+ type: string;
2852
+ };
2853
+ accessToken: {
2854
+ type: string;
2855
+ };
2856
+ refreshToken: {
2857
+ type: string;
2858
+ };
2859
+ accessTokenExpiresAt: {
2860
+ type: string;
2861
+ format: string;
2862
+ };
2863
+ refreshTokenExpiresAt: {
2864
+ type: string;
2865
+ format: string;
2866
+ };
2867
+ };
2868
+ };
2869
+ };
2870
+ };
2871
+ };
2872
+ 400: {
2873
+ description: string;
2874
+ };
2875
+ };
2876
+ };
2877
+ };
2878
+ } & {
2879
+ use: any[];
2880
+ };
2881
+ path: "/get-access-token";
2882
+ };
2883
+ accountInfo: {
2884
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
2885
+ body: {
2886
+ accountId: string;
2887
+ };
2888
+ } & {
2889
+ method?: "POST" | undefined;
2890
+ } & {
2891
+ query?: Record<string, any> | undefined;
2892
+ } & {
2893
+ params?: Record<string, any>;
2894
+ } & {
2895
+ request?: Request;
2896
+ } & {
2897
+ headers?: HeadersInit;
2898
+ } & {
2899
+ asResponse?: boolean;
2900
+ returnHeaders?: boolean;
2901
+ use?: import("better-call").Middleware[];
2902
+ path?: string;
2903
+ } & {
2904
+ asResponse?: AsResponse | undefined;
2905
+ returnHeaders?: ReturnHeaders | undefined;
2906
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
2907
+ headers: Headers;
2908
+ response: {
2909
+ user: {
2910
+ id: string | number;
2911
+ name?: string;
2912
+ email?: string | null;
2913
+ image?: string;
2914
+ emailVerified: boolean;
2915
+ };
2916
+ data: Record<string, any>;
2917
+ } | null;
2918
+ } : {
2919
+ user: {
2920
+ id: string | number;
2921
+ name?: string;
2922
+ email?: string | null;
2923
+ image?: string;
2924
+ emailVerified: boolean;
2925
+ };
2926
+ data: Record<string, any>;
2927
+ } | null>;
2928
+ options: {
2929
+ method: "POST";
2930
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2931
+ session: {
2932
+ session: Record<string, any> & {
2933
+ id: string;
2934
+ userId: string;
2935
+ expiresAt: Date;
2936
+ createdAt: Date;
2937
+ updatedAt: Date;
2938
+ token: string;
2939
+ ipAddress?: string | null | undefined;
2940
+ userAgent?: string | null | undefined;
2941
+ };
2942
+ user: Record<string, any> & {
2943
+ id: string;
2944
+ email: string;
2945
+ emailVerified: boolean;
2946
+ name: string;
2947
+ createdAt: Date;
2948
+ updatedAt: Date;
2949
+ image?: string | null | undefined;
2950
+ };
2951
+ };
2952
+ }>)[];
2953
+ metadata: {
2954
+ openapi: {
2955
+ description: string;
2956
+ responses: {
2957
+ "200": {
2958
+ description: string;
2959
+ content: {
2960
+ "application/json": {
2961
+ schema: {
2962
+ type: "object";
2963
+ properties: {
2964
+ user: {
2965
+ type: string;
2966
+ properties: {
2967
+ id: {
2968
+ type: string;
2969
+ };
2970
+ name: {
2971
+ type: string;
2972
+ };
2973
+ email: {
2974
+ type: string;
2975
+ };
2976
+ image: {
2977
+ type: string;
2978
+ };
2979
+ emailVerified: {
2980
+ type: string;
2981
+ };
2982
+ };
2983
+ required: string[];
2984
+ };
2985
+ data: {
2986
+ type: string;
2987
+ properties: {};
2988
+ additionalProperties: boolean;
2989
+ };
2990
+ };
2991
+ required: string[];
2992
+ additionalProperties: boolean;
2993
+ };
2994
+ };
2995
+ };
2996
+ };
2997
+ };
2998
+ };
2999
+ };
3000
+ body: import("zod").ZodObject<{
3001
+ accountId: import("zod").ZodString;
3002
+ }, import("better-auth").$strip>;
3003
+ } & {
3004
+ use: any[];
3005
+ };
3006
+ path: "/account-info";
3007
+ };
3008
+ }>;
3009
+ options: BetterAuthOptions;
3010
+ $context: Promise<import("better-auth").AuthContext>;
3011
+ $Infer: {
3012
+ Session: {
3013
+ session: {
3014
+ id: string;
3015
+ userId: string;
3016
+ expiresAt: Date;
3017
+ createdAt: Date;
3018
+ updatedAt: Date;
3019
+ token: string;
3020
+ ipAddress?: string | null | undefined;
3021
+ userAgent?: string | null | undefined;
3022
+ };
3023
+ user: {
3024
+ id: string;
3025
+ email: string;
3026
+ emailVerified: boolean;
3027
+ name: string;
3028
+ createdAt: Date;
3029
+ updatedAt: Date;
3030
+ image?: string | null | undefined;
3031
+ };
3032
+ };
3033
+ };
3034
+ $ERROR_CODES: {
3035
+ USER_NOT_FOUND: string;
3036
+ FAILED_TO_CREATE_USER: string;
3037
+ FAILED_TO_CREATE_SESSION: string;
3038
+ FAILED_TO_UPDATE_USER: string;
3039
+ FAILED_TO_GET_SESSION: string;
3040
+ INVALID_PASSWORD: string;
3041
+ INVALID_EMAIL: string;
3042
+ INVALID_EMAIL_OR_PASSWORD: string;
3043
+ SOCIAL_ACCOUNT_ALREADY_LINKED: string;
3044
+ PROVIDER_NOT_FOUND: string;
3045
+ INVALID_TOKEN: string;
3046
+ ID_TOKEN_NOT_SUPPORTED: string;
3047
+ FAILED_TO_GET_USER_INFO: string;
3048
+ USER_EMAIL_NOT_FOUND: string;
3049
+ EMAIL_NOT_VERIFIED: string;
3050
+ PASSWORD_TOO_SHORT: string;
3051
+ PASSWORD_TOO_LONG: string;
3052
+ USER_ALREADY_EXISTS: string;
3053
+ EMAIL_CAN_NOT_BE_UPDATED: string;
3054
+ CREDENTIAL_ACCOUNT_NOT_FOUND: string;
3055
+ SESSION_EXPIRED: string;
3056
+ FAILED_TO_UNLINK_LAST_ACCOUNT: string;
3057
+ ACCOUNT_NOT_FOUND: string;
3058
+ USER_ALREADY_HAS_PASSWORD: string;
3059
+ };
3060
+ };
3061
+ export { config as auth };
3062
+ export declare const indexFields: {
3063
+ account: (string | string[])[];
3064
+ rateLimit: string[];
3065
+ session: (string | string[])[];
3066
+ verification: string[];
3067
+ user: (string | string[])[];
3068
+ passkey: string[];
3069
+ apikey: string[];
3070
+ member: string[][];
3071
+ invitation: string[][];
3072
+ oauthConsent: string[][];
3073
+ ssoProvider: string[];
3074
+ subscription: string[];
3075
+ };
3076
+ export declare const inactiveFields: {
3077
+ user: {
3078
+ teamId: {
3079
+ fieldName: string;
3080
+ type: string;
3081
+ required: boolean;
3082
+ };
3083
+ };
3084
+ };
3085
+ //# sourceMappingURL=auth.d.ts.map