@antasphere/chassis-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (798) hide show
  1. package/LICENSE +82 -0
  2. package/dist/accounts/deletion.d.ts +163 -0
  3. package/dist/accounts/deletion.d.ts.map +1 -0
  4. package/dist/accounts/deletion.js +360 -0
  5. package/dist/accounts/deletion.js.map +1 -0
  6. package/dist/accounts/erasure-log.d.ts +66 -0
  7. package/dist/accounts/erasure-log.d.ts.map +1 -0
  8. package/dist/accounts/erasure-log.js +117 -0
  9. package/dist/accounts/erasure-log.js.map +1 -0
  10. package/dist/accounts/index.d.ts +6 -0
  11. package/dist/accounts/index.d.ts.map +1 -0
  12. package/dist/accounts/index.js +6 -0
  13. package/dist/accounts/index.js.map +1 -0
  14. package/dist/accounts/mint-refusal.d.ts +47 -0
  15. package/dist/accounts/mint-refusal.d.ts.map +1 -0
  16. package/dist/accounts/mint-refusal.js +59 -0
  17. package/dist/accounts/mint-refusal.js.map +1 -0
  18. package/dist/accounts/signup-duplicate.d.ts +14 -0
  19. package/dist/accounts/signup-duplicate.d.ts.map +1 -0
  20. package/dist/accounts/signup-duplicate.js +25 -0
  21. package/dist/accounts/signup-duplicate.js.map +1 -0
  22. package/dist/accounts/superadmin.d.ts +27 -0
  23. package/dist/accounts/superadmin.d.ts.map +1 -0
  24. package/dist/accounts/superadmin.js +46 -0
  25. package/dist/accounts/superadmin.js.map +1 -0
  26. package/dist/api/apikeys.d.ts +14 -0
  27. package/dist/api/apikeys.d.ts.map +1 -0
  28. package/dist/api/apikeys.js +124 -0
  29. package/dist/api/apikeys.js.map +1 -0
  30. package/dist/api/audit.d.ts +4 -0
  31. package/dist/api/audit.d.ts.map +1 -0
  32. package/dist/api/audit.js +75 -0
  33. package/dist/api/audit.js.map +1 -0
  34. package/dist/api/break-glass.d.ts +48 -0
  35. package/dist/api/break-glass.d.ts.map +1 -0
  36. package/dist/api/break-glass.js +217 -0
  37. package/dist/api/break-glass.js.map +1 -0
  38. package/dist/api/cli-auth.d.ts +84 -0
  39. package/dist/api/cli-auth.d.ts.map +1 -0
  40. package/dist/api/cli-auth.js +177 -0
  41. package/dist/api/cli-auth.js.map +1 -0
  42. package/dist/api/create-api.d.ts +123 -0
  43. package/dist/api/create-api.d.ts.map +1 -0
  44. package/dist/api/create-api.js +1165 -0
  45. package/dist/api/create-api.js.map +1 -0
  46. package/dist/api/demo-passes.d.ts +45 -0
  47. package/dist/api/demo-passes.d.ts.map +1 -0
  48. package/dist/api/demo-passes.js +143 -0
  49. package/dist/api/demo-passes.js.map +1 -0
  50. package/dist/api/errors.d.ts +5 -0
  51. package/dist/api/errors.d.ts.map +1 -0
  52. package/dist/api/errors.js +5 -0
  53. package/dist/api/errors.js.map +1 -0
  54. package/dist/api/export.d.ts +63 -0
  55. package/dist/api/export.d.ts.map +1 -0
  56. package/dist/api/export.js +393 -0
  57. package/dist/api/export.js.map +1 -0
  58. package/dist/api/files.d.ts +40 -0
  59. package/dist/api/files.d.ts.map +1 -0
  60. package/dist/api/files.js +150 -0
  61. package/dist/api/files.js.map +1 -0
  62. package/dist/api/index.d.ts +17 -0
  63. package/dist/api/index.d.ts.map +1 -0
  64. package/dist/api/index.js +17 -0
  65. package/dist/api/index.js.map +1 -0
  66. package/dist/api/invitations.d.ts +50 -0
  67. package/dist/api/invitations.d.ts.map +1 -0
  68. package/dist/api/invitations.js +313 -0
  69. package/dist/api/invitations.js.map +1 -0
  70. package/dist/api/members.d.ts +25 -0
  71. package/dist/api/members.d.ts.map +1 -0
  72. package/dist/api/members.js +522 -0
  73. package/dist/api/members.js.map +1 -0
  74. package/dist/api/onboarding.d.ts +26 -0
  75. package/dist/api/onboarding.d.ts.map +1 -0
  76. package/dist/api/onboarding.js +23 -0
  77. package/dist/api/onboarding.js.map +1 -0
  78. package/dist/api/openapi-doc.d.ts +21 -0
  79. package/dist/api/openapi-doc.d.ts.map +1 -0
  80. package/dist/api/openapi-doc.js +25 -0
  81. package/dist/api/openapi-doc.js.map +1 -0
  82. package/dist/api/projects.d.ts +24 -0
  83. package/dist/api/projects.d.ts.map +1 -0
  84. package/dist/api/projects.js +624 -0
  85. package/dist/api/projects.js.map +1 -0
  86. package/dist/api/scope-routes.d.ts +12 -0
  87. package/dist/api/scope-routes.d.ts.map +1 -0
  88. package/dist/api/scope-routes.js +2 -0
  89. package/dist/api/scope-routes.js.map +1 -0
  90. package/dist/api/sso-connect.d.ts +70 -0
  91. package/dist/api/sso-connect.d.ts.map +1 -0
  92. package/dist/api/sso-connect.js +164 -0
  93. package/dist/api/sso-connect.js.map +1 -0
  94. package/dist/api/sso-logout.d.ts +41 -0
  95. package/dist/api/sso-logout.d.ts.map +1 -0
  96. package/dist/api/sso-logout.js +34 -0
  97. package/dist/api/sso-logout.js.map +1 -0
  98. package/dist/api/teams.d.ts +43 -0
  99. package/dist/api/teams.d.ts.map +1 -0
  100. package/dist/api/teams.js +447 -0
  101. package/dist/api/teams.js.map +1 -0
  102. package/dist/api/workspaces.d.ts +114 -0
  103. package/dist/api/workspaces.d.ts.map +1 -0
  104. package/dist/api/workspaces.js +462 -0
  105. package/dist/api/workspaces.js.map +1 -0
  106. package/dist/apikeys/index.d.ts +3 -0
  107. package/dist/apikeys/index.d.ts.map +1 -0
  108. package/dist/apikeys/index.js +3 -0
  109. package/dist/apikeys/index.js.map +1 -0
  110. package/dist/apikeys/peppers.d.ts +53 -0
  111. package/dist/apikeys/peppers.d.ts.map +1 -0
  112. package/dist/apikeys/peppers.js +97 -0
  113. package/dist/apikeys/peppers.js.map +1 -0
  114. package/dist/apikeys/service.d.ts +56 -0
  115. package/dist/apikeys/service.d.ts.map +1 -0
  116. package/dist/apikeys/service.js +196 -0
  117. package/dist/apikeys/service.js.map +1 -0
  118. package/dist/app.d.ts +65 -0
  119. package/dist/app.d.ts.map +1 -0
  120. package/dist/app.js +142 -0
  121. package/dist/app.js.map +1 -0
  122. package/dist/audit/filters.d.ts +38 -0
  123. package/dist/audit/filters.d.ts.map +1 -0
  124. package/dist/audit/filters.js +97 -0
  125. package/dist/audit/filters.js.map +1 -0
  126. package/dist/audit/index.d.ts +3 -0
  127. package/dist/audit/index.d.ts.map +1 -0
  128. package/dist/audit/index.js +3 -0
  129. package/dist/audit/index.js.map +1 -0
  130. package/dist/audit/service.d.ts +65 -0
  131. package/dist/audit/service.d.ts.map +1 -0
  132. package/dist/audit/service.js +103 -0
  133. package/dist/audit/service.js.map +1 -0
  134. package/dist/boot.d.ts +8 -0
  135. package/dist/boot.d.ts.map +1 -0
  136. package/dist/boot.js +822 -0
  137. package/dist/boot.js.map +1 -0
  138. package/dist/constant-time.d.ts +3 -0
  139. package/dist/constant-time.d.ts.map +1 -0
  140. package/dist/constant-time.js +10 -0
  141. package/dist/constant-time.js.map +1 -0
  142. package/dist/email/driver.d.ts +16 -0
  143. package/dist/email/driver.d.ts.map +1 -0
  144. package/dist/email/driver.js +136 -0
  145. package/dist/email/driver.js.map +1 -0
  146. package/dist/email/index.d.ts +4 -0
  147. package/dist/email/index.d.ts.map +1 -0
  148. package/dist/email/index.js +4 -0
  149. package/dist/email/index.js.map +1 -0
  150. package/dist/email/shell.d.ts +72 -0
  151. package/dist/email/shell.d.ts.map +1 -0
  152. package/dist/email/shell.js +146 -0
  153. package/dist/email/shell.js.map +1 -0
  154. package/dist/email/templates.d.ts +83 -0
  155. package/dist/email/templates.d.ts.map +1 -0
  156. package/dist/email/templates.js +96 -0
  157. package/dist/email/templates.js.map +1 -0
  158. package/dist/entitlements/check.d.ts +140 -0
  159. package/dist/entitlements/check.d.ts.map +1 -0
  160. package/dist/entitlements/check.js +276 -0
  161. package/dist/entitlements/check.js.map +1 -0
  162. package/dist/entitlements/clock-skew.d.ts +27 -0
  163. package/dist/entitlements/clock-skew.d.ts.map +1 -0
  164. package/dist/entitlements/clock-skew.js +58 -0
  165. package/dist/entitlements/clock-skew.js.map +1 -0
  166. package/dist/entitlements/gate.d.ts +113 -0
  167. package/dist/entitlements/gate.d.ts.map +1 -0
  168. package/dist/entitlements/gate.js +430 -0
  169. package/dist/entitlements/gate.js.map +1 -0
  170. package/dist/entitlements/hub-machine-token.d.ts +83 -0
  171. package/dist/entitlements/hub-machine-token.d.ts.map +1 -0
  172. package/dist/entitlements/hub-machine-token.js +175 -0
  173. package/dist/entitlements/hub-machine-token.js.map +1 -0
  174. package/dist/entitlements/hub-subject.d.ts +32 -0
  175. package/dist/entitlements/hub-subject.d.ts.map +1 -0
  176. package/dist/entitlements/hub-subject.js +68 -0
  177. package/dist/entitlements/hub-subject.js.map +1 -0
  178. package/dist/entitlements/index.d.ts +9 -0
  179. package/dist/entitlements/index.d.ts.map +1 -0
  180. package/dist/entitlements/index.js +9 -0
  181. package/dist/entitlements/index.js.map +1 -0
  182. package/dist/entitlements/poster.d.ts +81 -0
  183. package/dist/entitlements/poster.d.ts.map +1 -0
  184. package/dist/entitlements/poster.js +169 -0
  185. package/dist/entitlements/poster.js.map +1 -0
  186. package/dist/entitlements/profiles.d.ts +121 -0
  187. package/dist/entitlements/profiles.d.ts.map +1 -0
  188. package/dist/entitlements/profiles.js +212 -0
  189. package/dist/entitlements/profiles.js.map +1 -0
  190. package/dist/entitlements/slot.d.ts +33 -0
  191. package/dist/entitlements/slot.d.ts.map +1 -0
  192. package/dist/entitlements/slot.js +75 -0
  193. package/dist/entitlements/slot.js.map +1 -0
  194. package/dist/env.d.ts +293 -0
  195. package/dist/env.d.ts.map +1 -0
  196. package/dist/env.js +383 -0
  197. package/dist/env.js.map +1 -0
  198. package/dist/files/http.d.ts +23 -0
  199. package/dist/files/http.d.ts.map +1 -0
  200. package/dist/files/http.js +66 -0
  201. package/dist/files/http.js.map +1 -0
  202. package/dist/files/index.d.ts +5 -0
  203. package/dist/files/index.d.ts.map +1 -0
  204. package/dist/files/index.js +5 -0
  205. package/dist/files/index.js.map +1 -0
  206. package/dist/files/serve.d.ts +43 -0
  207. package/dist/files/serve.d.ts.map +1 -0
  208. package/dist/files/serve.js +71 -0
  209. package/dist/files/serve.js.map +1 -0
  210. package/dist/files/service.d.ts +69 -0
  211. package/dist/files/service.d.ts.map +1 -0
  212. package/dist/files/service.js +188 -0
  213. package/dist/files/service.js.map +1 -0
  214. package/dist/files/spool.d.ts +21 -0
  215. package/dist/files/spool.d.ts.map +1 -0
  216. package/dist/files/spool.js +47 -0
  217. package/dist/files/spool.js.map +1 -0
  218. package/dist/identity/better-auth.d.ts +3927 -0
  219. package/dist/identity/better-auth.d.ts.map +1 -0
  220. package/dist/identity/better-auth.js +896 -0
  221. package/dist/identity/better-auth.js.map +1 -0
  222. package/dist/identity/demo-pass-plugin.d.ts +29 -0
  223. package/dist/identity/demo-pass-plugin.d.ts.map +1 -0
  224. package/dist/identity/demo-pass-plugin.js +88 -0
  225. package/dist/identity/demo-pass-plugin.js.map +1 -0
  226. package/dist/identity/demo-pass-rules.d.ts +84 -0
  227. package/dist/identity/demo-pass-rules.d.ts.map +1 -0
  228. package/dist/identity/demo-pass-rules.js +223 -0
  229. package/dist/identity/demo-pass-rules.js.map +1 -0
  230. package/dist/identity/demo-pass.d.ts +159 -0
  231. package/dist/identity/demo-pass.d.ts.map +1 -0
  232. package/dist/identity/demo-pass.js +319 -0
  233. package/dist/identity/demo-pass.js.map +1 -0
  234. package/dist/identity/hub-grant.d.ts +182 -0
  235. package/dist/identity/hub-grant.d.ts.map +1 -0
  236. package/dist/identity/hub-grant.js +594 -0
  237. package/dist/identity/hub-grant.js.map +1 -0
  238. package/dist/identity/hub-jwt.d.ts +22 -0
  239. package/dist/identity/hub-jwt.d.ts.map +1 -0
  240. package/dist/identity/hub-jwt.js +77 -0
  241. package/dist/identity/hub-jwt.js.map +1 -0
  242. package/dist/identity/hub-live-gate.d.ts +17 -0
  243. package/dist/identity/hub-live-gate.d.ts.map +1 -0
  244. package/dist/identity/hub-live-gate.js +146 -0
  245. package/dist/identity/hub-live-gate.js.map +1 -0
  246. package/dist/identity/hub-logout.d.ts +88 -0
  247. package/dist/identity/hub-logout.d.ts.map +1 -0
  248. package/dist/identity/hub-logout.js +158 -0
  249. package/dist/identity/hub-logout.js.map +1 -0
  250. package/dist/identity/hub-projection.d.ts +103 -0
  251. package/dist/identity/hub-projection.d.ts.map +1 -0
  252. package/dist/identity/hub-projection.js +130 -0
  253. package/dist/identity/hub-projection.js.map +1 -0
  254. package/dist/identity/hub-reconcile.d.ts +151 -0
  255. package/dist/identity/hub-reconcile.d.ts.map +1 -0
  256. package/dist/identity/hub-reconcile.js +400 -0
  257. package/dist/identity/hub-reconcile.js.map +1 -0
  258. package/dist/identity/hub-sso.d.ts +363 -0
  259. package/dist/identity/hub-sso.d.ts.map +1 -0
  260. package/dist/identity/hub-sso.js +536 -0
  261. package/dist/identity/hub-sso.js.map +1 -0
  262. package/dist/identity/hub-user-client.d.ts +222 -0
  263. package/dist/identity/hub-user-client.d.ts.map +1 -0
  264. package/dist/identity/hub-user-client.js +406 -0
  265. package/dist/identity/hub-user-client.js.map +1 -0
  266. package/dist/identity/index.d.ts +13 -0
  267. package/dist/identity/index.d.ts.map +1 -0
  268. package/dist/identity/index.js +13 -0
  269. package/dist/identity/index.js.map +1 -0
  270. package/dist/identity/oauth-jwt.d.ts +32 -0
  271. package/dist/identity/oauth-jwt.d.ts.map +1 -0
  272. package/dist/identity/oauth-jwt.js +122 -0
  273. package/dist/identity/oauth-jwt.js.map +1 -0
  274. package/dist/identity/resolve-membership.d.ts +28 -0
  275. package/dist/identity/resolve-membership.d.ts.map +1 -0
  276. package/dist/identity/resolve-membership.js +69 -0
  277. package/dist/identity/resolve-membership.js.map +1 -0
  278. package/dist/identity/signing-key.d.ts +49 -0
  279. package/dist/identity/signing-key.d.ts.map +1 -0
  280. package/dist/identity/signing-key.js +144 -0
  281. package/dist/identity/signing-key.js.map +1 -0
  282. package/dist/index.d.ts +21 -0
  283. package/dist/index.d.ts.map +1 -0
  284. package/dist/index.js +11 -0
  285. package/dist/index.js.map +1 -0
  286. package/dist/invitations/index.d.ts +2 -0
  287. package/dist/invitations/index.d.ts.map +1 -0
  288. package/dist/invitations/index.js +2 -0
  289. package/dist/invitations/index.js.map +1 -0
  290. package/dist/invitations/service.d.ts +36 -0
  291. package/dist/invitations/service.d.ts.map +1 -0
  292. package/dist/invitations/service.js +122 -0
  293. package/dist/invitations/service.js.map +1 -0
  294. package/dist/jobs/index.d.ts +3 -0
  295. package/dist/jobs/index.d.ts.map +1 -0
  296. package/dist/jobs/index.js +3 -0
  297. package/dist/jobs/index.js.map +1 -0
  298. package/dist/jobs/pgboss.d.ts +119 -0
  299. package/dist/jobs/pgboss.d.ts.map +1 -0
  300. package/dist/jobs/pgboss.js +521 -0
  301. package/dist/jobs/pgboss.js.map +1 -0
  302. package/dist/jobs/timers.d.ts +127 -0
  303. package/dist/jobs/timers.d.ts.map +1 -0
  304. package/dist/jobs/timers.js +228 -0
  305. package/dist/jobs/timers.js.map +1 -0
  306. package/dist/logger.d.ts +17 -0
  307. package/dist/logger.d.ts.map +1 -0
  308. package/dist/logger.js +64 -0
  309. package/dist/logger.js.map +1 -0
  310. package/dist/mcp/errors.d.ts +37 -0
  311. package/dist/mcp/errors.d.ts.map +1 -0
  312. package/dist/mcp/errors.js +77 -0
  313. package/dist/mcp/errors.js.map +1 -0
  314. package/dist/mcp/http.d.ts +35 -0
  315. package/dist/mcp/http.d.ts.map +1 -0
  316. package/dist/mcp/http.js +80 -0
  317. package/dist/mcp/http.js.map +1 -0
  318. package/dist/mcp/index.d.ts +8 -0
  319. package/dist/mcp/index.d.ts.map +1 -0
  320. package/dist/mcp/index.js +8 -0
  321. package/dist/mcp/index.js.map +1 -0
  322. package/dist/mcp/inputs.d.ts +19 -0
  323. package/dist/mcp/inputs.d.ts.map +1 -0
  324. package/dist/mcp/inputs.js +28 -0
  325. package/dist/mcp/inputs.js.map +1 -0
  326. package/dist/mcp/projects.d.ts +31 -0
  327. package/dist/mcp/projects.d.ts.map +1 -0
  328. package/dist/mcp/projects.js +315 -0
  329. package/dist/mcp/projects.js.map +1 -0
  330. package/dist/mcp/server.d.ts +52 -0
  331. package/dist/mcp/server.d.ts.map +1 -0
  332. package/dist/mcp/server.js +93 -0
  333. package/dist/mcp/server.js.map +1 -0
  334. package/dist/mcp/teams.d.ts +7 -0
  335. package/dist/mcp/teams.d.ts.map +1 -0
  336. package/dist/mcp/teams.js +62 -0
  337. package/dist/mcp/teams.js.map +1 -0
  338. package/dist/mcp/tool-kit.d.ts +67 -0
  339. package/dist/mcp/tool-kit.d.ts.map +1 -0
  340. package/dist/mcp/tool-kit.js +74 -0
  341. package/dist/mcp/tool-kit.js.map +1 -0
  342. package/dist/members/removal.d.ts +95 -0
  343. package/dist/members/removal.d.ts.map +1 -0
  344. package/dist/members/removal.js +143 -0
  345. package/dist/members/removal.js.map +1 -0
  346. package/dist/middleware/auth-body.d.ts +25 -0
  347. package/dist/middleware/auth-body.d.ts.map +1 -0
  348. package/dist/middleware/auth-body.js +55 -0
  349. package/dist/middleware/auth-body.js.map +1 -0
  350. package/dist/middleware/auth-context.d.ts +170 -0
  351. package/dist/middleware/auth-context.d.ts.map +1 -0
  352. package/dist/middleware/auth-context.js +251 -0
  353. package/dist/middleware/auth-context.js.map +1 -0
  354. package/dist/middleware/body-cap.d.ts +17 -0
  355. package/dist/middleware/body-cap.d.ts.map +1 -0
  356. package/dist/middleware/body-cap.js +31 -0
  357. package/dist/middleware/body-cap.js.map +1 -0
  358. package/dist/middleware/body-refusal.d.ts +20 -0
  359. package/dist/middleware/body-refusal.d.ts.map +1 -0
  360. package/dist/middleware/body-refusal.js +5 -0
  361. package/dist/middleware/body-refusal.js.map +1 -0
  362. package/dist/middleware/cross-site.d.ts +61 -0
  363. package/dist/middleware/cross-site.d.ts.map +1 -0
  364. package/dist/middleware/cross-site.js +59 -0
  365. package/dist/middleware/cross-site.js.map +1 -0
  366. package/dist/middleware/hub-managed.d.ts +45 -0
  367. package/dist/middleware/hub-managed.d.ts.map +1 -0
  368. package/dist/middleware/hub-managed.js +56 -0
  369. package/dist/middleware/hub-managed.js.map +1 -0
  370. package/dist/middleware/idempotency.d.ts +14 -0
  371. package/dist/middleware/idempotency.d.ts.map +1 -0
  372. package/dist/middleware/idempotency.js +222 -0
  373. package/dist/middleware/idempotency.js.map +1 -0
  374. package/dist/middleware/index.d.ts +12 -0
  375. package/dist/middleware/index.d.ts.map +1 -0
  376. package/dist/middleware/index.js +12 -0
  377. package/dist/middleware/index.js.map +1 -0
  378. package/dist/middleware/json-depth.d.ts +32 -0
  379. package/dist/middleware/json-depth.d.ts.map +1 -0
  380. package/dist/middleware/json-depth.js +80 -0
  381. package/dist/middleware/json-depth.js.map +1 -0
  382. package/dist/middleware/no-store.d.ts +21 -0
  383. package/dist/middleware/no-store.d.ts.map +1 -0
  384. package/dist/middleware/no-store.js +32 -0
  385. package/dist/middleware/no-store.js.map +1 -0
  386. package/dist/middleware/oauth-public.d.ts +16 -0
  387. package/dist/middleware/oauth-public.d.ts.map +1 -0
  388. package/dist/middleware/oauth-public.js +50 -0
  389. package/dist/middleware/oauth-public.js.map +1 -0
  390. package/dist/middleware/rate-limit.d.ts +182 -0
  391. package/dist/middleware/rate-limit.d.ts.map +1 -0
  392. package/dist/middleware/rate-limit.js +277 -0
  393. package/dist/middleware/rate-limit.js.map +1 -0
  394. package/dist/middleware/request-id.d.ts +10 -0
  395. package/dist/middleware/request-id.d.ts.map +1 -0
  396. package/dist/middleware/request-id.js +42 -0
  397. package/dist/middleware/request-id.js.map +1 -0
  398. package/dist/middleware/scopes.d.ts +33 -0
  399. package/dist/middleware/scopes.d.ts.map +1 -0
  400. package/dist/middleware/scopes.js +139 -0
  401. package/dist/middleware/scopes.js.map +1 -0
  402. package/dist/middleware/security-headers.d.ts +53 -0
  403. package/dist/middleware/security-headers.d.ts.map +1 -0
  404. package/dist/middleware/security-headers.js +96 -0
  405. package/dist/middleware/security-headers.js.map +1 -0
  406. package/dist/observability/index.d.ts +3 -0
  407. package/dist/observability/index.d.ts.map +1 -0
  408. package/dist/observability/index.js +3 -0
  409. package/dist/observability/index.js.map +1 -0
  410. package/dist/observability/metrics.d.ts +17 -0
  411. package/dist/observability/metrics.d.ts.map +1 -0
  412. package/dist/observability/metrics.js +82 -0
  413. package/dist/observability/metrics.js.map +1 -0
  414. package/dist/observability/otel.d.ts +20 -0
  415. package/dist/observability/otel.d.ts.map +1 -0
  416. package/dist/observability/otel.js +54 -0
  417. package/dist/observability/otel.js.map +1 -0
  418. package/dist/pagination.d.ts +57 -0
  419. package/dist/pagination.d.ts.map +1 -0
  420. package/dist/pagination.js +90 -0
  421. package/dist/pagination.js.map +1 -0
  422. package/dist/platform/edition.d.ts +57 -0
  423. package/dist/platform/edition.d.ts.map +1 -0
  424. package/dist/platform/edition.js +90 -0
  425. package/dist/platform/edition.js.map +1 -0
  426. package/dist/platform/entitlements.d.ts +26 -0
  427. package/dist/platform/entitlements.d.ts.map +1 -0
  428. package/dist/platform/entitlements.js +28 -0
  429. package/dist/platform/entitlements.js.map +1 -0
  430. package/dist/platform/events.d.ts +87 -0
  431. package/dist/platform/events.d.ts.map +1 -0
  432. package/dist/platform/events.js +32 -0
  433. package/dist/platform/events.js.map +1 -0
  434. package/dist/platform/index.d.ts +8 -0
  435. package/dist/platform/index.d.ts.map +1 -0
  436. package/dist/platform/index.js +8 -0
  437. package/dist/platform/index.js.map +1 -0
  438. package/dist/platform/local-identity.d.ts +39 -0
  439. package/dist/platform/local-identity.d.ts.map +1 -0
  440. package/dist/platform/local-identity.js +87 -0
  441. package/dist/platform/local-identity.js.map +1 -0
  442. package/dist/platform/registry.d.ts +23 -0
  443. package/dist/platform/registry.d.ts.map +1 -0
  444. package/dist/platform/registry.js +5 -0
  445. package/dist/platform/registry.js.map +1 -0
  446. package/dist/platform/usage.d.ts +11 -0
  447. package/dist/platform/usage.d.ts.map +1 -0
  448. package/dist/platform/usage.js +12 -0
  449. package/dist/platform/usage.js.map +1 -0
  450. package/dist/platform/workspaces.d.ts +25 -0
  451. package/dist/platform/workspaces.d.ts.map +1 -0
  452. package/dist/platform/workspaces.js +44 -0
  453. package/dist/platform/workspaces.js.map +1 -0
  454. package/dist/projects/access.d.ts +40 -0
  455. package/dist/projects/access.d.ts.map +1 -0
  456. package/dist/projects/access.js +133 -0
  457. package/dist/projects/access.js.map +1 -0
  458. package/dist/projects/index.d.ts +2 -0
  459. package/dist/projects/index.d.ts.map +1 -0
  460. package/dist/projects/index.js +2 -0
  461. package/dist/projects/index.js.map +1 -0
  462. package/dist/route-label.d.ts +23 -0
  463. package/dist/route-label.d.ts.map +1 -0
  464. package/dist/route-label.js +29 -0
  465. package/dist/route-label.js.map +1 -0
  466. package/dist/routes/health.d.ts +30 -0
  467. package/dist/routes/health.d.ts.map +1 -0
  468. package/dist/routes/health.js +54 -0
  469. package/dist/routes/health.js.map +1 -0
  470. package/dist/routes/index.d.ts +3 -0
  471. package/dist/routes/index.d.ts.map +1 -0
  472. package/dist/routes/index.js +3 -0
  473. package/dist/routes/index.js.map +1 -0
  474. package/dist/routes/wellknown.d.ts +11 -0
  475. package/dist/routes/wellknown.d.ts.map +1 -0
  476. package/dist/routes/wellknown.js +45 -0
  477. package/dist/routes/wellknown.js.map +1 -0
  478. package/dist/secret.d.ts +30 -0
  479. package/dist/secret.d.ts.map +1 -0
  480. package/dist/secret.js +97 -0
  481. package/dist/secret.js.map +1 -0
  482. package/dist/setup-transport.d.ts +23 -0
  483. package/dist/setup-transport.d.ts.map +1 -0
  484. package/dist/setup-transport.js +52 -0
  485. package/dist/setup-transport.js.map +1 -0
  486. package/dist/state.d.ts +21 -0
  487. package/dist/state.d.ts.map +1 -0
  488. package/dist/state.js +4 -0
  489. package/dist/state.js.map +1 -0
  490. package/dist/storage/driver.d.ts +38 -0
  491. package/dist/storage/driver.d.ts.map +1 -0
  492. package/dist/storage/driver.js +14 -0
  493. package/dist/storage/driver.js.map +1 -0
  494. package/dist/storage/factory.d.ts +4 -0
  495. package/dist/storage/factory.d.ts.map +1 -0
  496. package/dist/storage/factory.js +20 -0
  497. package/dist/storage/factory.js.map +1 -0
  498. package/dist/storage/index.d.ts +4 -0
  499. package/dist/storage/index.d.ts.map +1 -0
  500. package/dist/storage/index.js +4 -0
  501. package/dist/storage/index.js.map +1 -0
  502. package/dist/storage/local.d.ts +21 -0
  503. package/dist/storage/local.d.ts.map +1 -0
  504. package/dist/storage/local.js +88 -0
  505. package/dist/storage/local.js.map +1 -0
  506. package/dist/storage/s3.d.ts +29 -0
  507. package/dist/storage/s3.d.ts.map +1 -0
  508. package/dist/storage/s3.js +82 -0
  509. package/dist/storage/s3.js.map +1 -0
  510. package/dist/testing/fake-hub.d.ts +425 -0
  511. package/dist/testing/fake-hub.d.ts.map +1 -0
  512. package/dist/testing/fake-hub.js +1074 -0
  513. package/dist/testing/fake-hub.js.map +1 -0
  514. package/dist/testing/helpers.d.ts +124 -0
  515. package/dist/testing/helpers.d.ts.map +1 -0
  516. package/dist/testing/helpers.js +174 -0
  517. package/dist/testing/helpers.js.map +1 -0
  518. package/dist/testing/index.d.ts +12 -0
  519. package/dist/testing/index.d.ts.map +1 -0
  520. package/dist/testing/index.js +12 -0
  521. package/dist/testing/index.js.map +1 -0
  522. package/dist/testing/setup-origins.d.ts +21 -0
  523. package/dist/testing/setup-origins.d.ts.map +1 -0
  524. package/dist/testing/setup-origins.js +57 -0
  525. package/dist/testing/setup-origins.js.map +1 -0
  526. package/dist/testing/sso-helpers.d.ts +43 -0
  527. package/dist/testing/sso-helpers.d.ts.map +1 -0
  528. package/dist/testing/sso-helpers.js +159 -0
  529. package/dist/testing/sso-helpers.js.map +1 -0
  530. package/dist/tool-definition.d.ts +382 -0
  531. package/dist/tool-definition.d.ts.map +1 -0
  532. package/dist/tool-definition.js +46 -0
  533. package/dist/tool-definition.js.map +1 -0
  534. package/dist/util/index.d.ts +8 -0
  535. package/dist/util/index.d.ts.map +1 -0
  536. package/dist/util/index.js +8 -0
  537. package/dist/util/index.js.map +1 -0
  538. package/package.json +161 -0
  539. package/src/accounts/deletion.ts +389 -0
  540. package/src/accounts/erasure-log.ts +140 -0
  541. package/src/accounts/index.ts +5 -0
  542. package/src/accounts/mint-refusal.ts +67 -0
  543. package/src/accounts/signup-duplicate.ts +21 -0
  544. package/src/accounts/superadmin.ts +46 -0
  545. package/src/api/apikeys.ts +147 -0
  546. package/src/api/audit.ts +83 -0
  547. package/src/api/break-glass.ts +294 -0
  548. package/src/api/cli-auth.ts +308 -0
  549. package/src/api/create-api.ts +1403 -0
  550. package/src/api/demo-passes.ts +207 -0
  551. package/src/api/errors.ts +13 -0
  552. package/src/api/export.ts +482 -0
  553. package/src/api/files.ts +200 -0
  554. package/src/api/index.ts +29 -0
  555. package/src/api/invitations.ts +396 -0
  556. package/src/api/members.ts +617 -0
  557. package/src/api/onboarding.ts +50 -0
  558. package/src/api/openapi-doc.ts +34 -0
  559. package/src/api/projects.ts +788 -0
  560. package/src/api/scope-routes.ts +12 -0
  561. package/src/api/sso-connect.ts +246 -0
  562. package/src/api/sso-logout.ts +76 -0
  563. package/src/api/teams.ts +575 -0
  564. package/src/api/workspaces.ts +649 -0
  565. package/src/apikeys/index.ts +2 -0
  566. package/src/apikeys/peppers.ts +118 -0
  567. package/src/apikeys/service.ts +223 -0
  568. package/src/app.ts +228 -0
  569. package/src/audit/filters.ts +101 -0
  570. package/src/audit/index.ts +9 -0
  571. package/src/audit/service.ts +154 -0
  572. package/src/boot.ts +953 -0
  573. package/src/constant-time.ts +9 -0
  574. package/src/email/driver.ts +139 -0
  575. package/src/email/index.ts +26 -0
  576. package/src/email/shell.ts +201 -0
  577. package/src/email/templates.ts +184 -0
  578. package/src/entitlements/check.ts +435 -0
  579. package/src/entitlements/clock-skew.ts +58 -0
  580. package/src/entitlements/gate.ts +636 -0
  581. package/src/entitlements/hub-machine-token.ts +205 -0
  582. package/src/entitlements/hub-subject.ts +77 -0
  583. package/src/entitlements/index.ts +37 -0
  584. package/src/entitlements/poster.ts +265 -0
  585. package/src/entitlements/profiles.ts +303 -0
  586. package/src/entitlements/slot.ts +105 -0
  587. package/src/env.ts +456 -0
  588. package/src/files/http.ts +77 -0
  589. package/src/files/index.ts +4 -0
  590. package/src/files/serve.ts +115 -0
  591. package/src/files/service.ts +209 -0
  592. package/src/files/spool.ts +58 -0
  593. package/src/identity/better-auth.ts +1103 -0
  594. package/src/identity/demo-pass-plugin.ts +121 -0
  595. package/src/identity/demo-pass-rules.ts +229 -0
  596. package/src/identity/demo-pass.ts +390 -0
  597. package/src/identity/hub-grant.ts +704 -0
  598. package/src/identity/hub-jwt.ts +78 -0
  599. package/src/identity/hub-live-gate.ts +167 -0
  600. package/src/identity/hub-logout.ts +174 -0
  601. package/src/identity/hub-projection.ts +251 -0
  602. package/src/identity/hub-reconcile.ts +572 -0
  603. package/src/identity/hub-sso.ts +696 -0
  604. package/src/identity/hub-user-client.ts +554 -0
  605. package/src/identity/index.ts +56 -0
  606. package/src/identity/oauth-jwt.ts +128 -0
  607. package/src/identity/resolve-membership.ts +104 -0
  608. package/src/identity/signing-key.ts +164 -0
  609. package/src/index.ts +65 -0
  610. package/src/invitations/index.ts +1 -0
  611. package/src/invitations/service.ts +171 -0
  612. package/src/jobs/index.ts +25 -0
  613. package/src/jobs/pgboss.ts +594 -0
  614. package/src/jobs/timers.ts +287 -0
  615. package/src/logger.ts +67 -0
  616. package/src/mcp/errors.ts +111 -0
  617. package/src/mcp/http.ts +129 -0
  618. package/src/mcp/index.ts +28 -0
  619. package/src/mcp/inputs.ts +33 -0
  620. package/src/mcp/projects.ts +480 -0
  621. package/src/mcp/server.ts +174 -0
  622. package/src/mcp/teams.ts +97 -0
  623. package/src/mcp/tool-kit.ts +148 -0
  624. package/src/members/removal.ts +216 -0
  625. package/src/middleware/auth-body.ts +58 -0
  626. package/src/middleware/auth-context.ts +384 -0
  627. package/src/middleware/body-cap.ts +33 -0
  628. package/src/middleware/body-refusal.ts +23 -0
  629. package/src/middleware/cross-site.ts +122 -0
  630. package/src/middleware/hub-managed.ts +61 -0
  631. package/src/middleware/idempotency.ts +264 -0
  632. package/src/middleware/index.ts +33 -0
  633. package/src/middleware/json-depth.ts +74 -0
  634. package/src/middleware/no-store.ts +30 -0
  635. package/src/middleware/oauth-public.ts +54 -0
  636. package/src/middleware/rate-limit.ts +432 -0
  637. package/src/middleware/request-id.ts +54 -0
  638. package/src/middleware/scopes.ts +150 -0
  639. package/src/middleware/security-headers.ts +129 -0
  640. package/src/observability/index.ts +2 -0
  641. package/src/observability/metrics.ts +102 -0
  642. package/src/observability/otel.ts +79 -0
  643. package/src/pagination.ts +118 -0
  644. package/src/platform/edition.ts +140 -0
  645. package/src/platform/entitlements.ts +47 -0
  646. package/src/platform/events.ts +71 -0
  647. package/src/platform/index.ts +7 -0
  648. package/src/platform/local-identity.ts +90 -0
  649. package/src/platform/registry.ts +28 -0
  650. package/src/platform/usage.ts +13 -0
  651. package/src/platform/workspaces.ts +41 -0
  652. package/src/projects/access.ts +160 -0
  653. package/src/projects/index.ts +7 -0
  654. package/src/route-label.ts +29 -0
  655. package/src/routes/health.ts +79 -0
  656. package/src/routes/index.ts +2 -0
  657. package/src/routes/wellknown.ts +67 -0
  658. package/src/secret.ts +115 -0
  659. package/src/setup-transport.ts +46 -0
  660. package/src/state.ts +23 -0
  661. package/src/storage/driver.ts +48 -0
  662. package/src/storage/factory.ts +34 -0
  663. package/src/storage/index.ts +3 -0
  664. package/src/storage/local.ts +93 -0
  665. package/src/storage/s3.ts +109 -0
  666. package/src/testing/fake-hub.ts +1316 -0
  667. package/src/testing/helpers.ts +254 -0
  668. package/src/testing/index.ts +11 -0
  669. package/src/testing/setup-origins.ts +58 -0
  670. package/src/testing/sso-helpers.ts +178 -0
  671. package/src/tool-definition.ts +463 -0
  672. package/src/util/index.ts +17 -0
  673. package/test/fixtures/onboarding-backfill.sql +13 -0
  674. package/test/fixtures/operator-user-id-backfill.sql +18 -0
  675. package/test/host/dr-lib.sh +253 -0
  676. package/test/host/drizzle/0000_chassis_baseline.sql +438 -0
  677. package/test/host/drizzle/0001_last_owner_guard.sql +42 -0
  678. package/test/host/drizzle/meta/0000_snapshot.json +3566 -0
  679. package/test/host/drizzle/meta/_journal.json +20 -0
  680. package/test/host/drizzle.config.ts +17 -0
  681. package/test/host/identity.ts +41 -0
  682. package/test/host/minimal-host.ts +35 -0
  683. package/test/host/minimal-tool.ts +123 -0
  684. package/test/integration/account-oracle-uniformity.test.ts +284 -0
  685. package/test/integration/account-recovery.test.ts +236 -0
  686. package/test/integration/account.test.ts +120 -0
  687. package/test/integration/api-quota.test.ts +208 -0
  688. package/test/integration/apikey-expiry.test.ts +178 -0
  689. package/test/integration/apikey-pepper-rotation.test.ts +190 -0
  690. package/test/integration/boot-posture.test.ts +169 -0
  691. package/test/integration/break-glass.test.ts +484 -0
  692. package/test/integration/cloud-lifecycle.test.ts +233 -0
  693. package/test/integration/credential-boundaries.test.ts +195 -0
  694. package/test/integration/default-workspace.test.ts +414 -0
  695. package/test/integration/demo-pass-rules.test.ts +332 -0
  696. package/test/integration/demo-pass.test.ts +1222 -0
  697. package/test/integration/dr-verify-real-dump.test.ts +154 -0
  698. package/test/integration/edition.test.ts +868 -0
  699. package/test/integration/email-change.test.ts +394 -0
  700. package/test/integration/empty-tool.test.ts +267 -0
  701. package/test/integration/entitlements-null-hook.test.ts +187 -0
  702. package/test/integration/entitlements.test.ts +693 -0
  703. package/test/integration/export-entries.test.ts +321 -0
  704. package/test/integration/files.test.ts +320 -0
  705. package/test/integration/first-boot-claim.test.ts +131 -0
  706. package/test/integration/gdpr.test.ts +532 -0
  707. package/test/integration/helpers.ts +29 -0
  708. package/test/integration/hub-grant.test.ts +505 -0
  709. package/test/integration/hub-live-gate.test.ts +612 -0
  710. package/test/integration/hub-managed-membership.test.ts +559 -0
  711. package/test/integration/hub-org-selector.test.ts +281 -0
  712. package/test/integration/hub-reconcile.test.ts +646 -0
  713. package/test/integration/hub-sso.test.ts +704 -0
  714. package/test/integration/hub-teams.test.ts +771 -0
  715. package/test/integration/idempotency.test.ts +261 -0
  716. package/test/integration/invite-verification.test.ts +210 -0
  717. package/test/integration/last-owner-race.test.ts +263 -0
  718. package/test/integration/m9-fixes.test.ts +290 -0
  719. package/test/integration/mcp-projects.test.ts +463 -0
  720. package/test/integration/member-removal-race.test.ts +466 -0
  721. package/test/integration/member-removal.test.ts +794 -0
  722. package/test/integration/oauth-mcp.test.ts +477 -0
  723. package/test/integration/oauth-workspace.test.ts +371 -0
  724. package/test/integration/observability.test.ts +183 -0
  725. package/test/integration/onboarding.test.ts +268 -0
  726. package/test/integration/orphan-purge.test.ts +451 -0
  727. package/test/integration/pagination.test.ts +344 -0
  728. package/test/integration/platform-core.test.ts +305 -0
  729. package/test/integration/platform.test.ts +246 -0
  730. package/test/integration/pool-survives-restart.test.ts +80 -0
  731. package/test/integration/projects-cloud.test.ts +193 -0
  732. package/test/integration/projects.test.ts +1310 -0
  733. package/test/integration/security-fixes.test.ts +190 -0
  734. package/test/integration/setup-transport.test.ts +118 -0
  735. package/test/integration/signin-wall.test.ts +103 -0
  736. package/test/integration/signing-key-rotation.test.ts +349 -0
  737. package/test/integration/sso-helpers.ts +15 -0
  738. package/test/integration/sso-logout.test.ts +283 -0
  739. package/test/integration/teams-cloud.test.ts +194 -0
  740. package/test/integration/teams.test.ts +551 -0
  741. package/test/integration/timers.test.ts +377 -0
  742. package/test/integration/two-factor.test.ts +301 -0
  743. package/test/integration/usage-window.test.ts +161 -0
  744. package/test/integration/workspace-create-cloud.test.ts +523 -0
  745. package/test/integration/workspace-create.test.ts +510 -0
  746. package/test/integration/workspace-scoping.test.ts +530 -0
  747. package/test/integration/zz-adv-replay-owner.test.ts +205 -0
  748. package/test/unit/apikey-peppers.test.ts +110 -0
  749. package/test/unit/apikey-prefix.test.ts +34 -0
  750. package/test/unit/audit-filters.test.ts +135 -0
  751. package/test/unit/auth-origins.test.ts +92 -0
  752. package/test/unit/body-cap.test.ts +84 -0
  753. package/test/unit/clock-skew.test.ts +68 -0
  754. package/test/unit/cross-site.test.ts +166 -0
  755. package/test/unit/declared-credits.test.ts +13 -0
  756. package/test/unit/demo-pass-rules.test.ts +192 -0
  757. package/test/unit/email-driver.test.ts +127 -0
  758. package/test/unit/end-pool.test.ts +181 -0
  759. package/test/unit/entitlement-check.test.ts +492 -0
  760. package/test/unit/entitlement-gate.test.ts +1333 -0
  761. package/test/unit/entitlement-profiles.test.ts +289 -0
  762. package/test/unit/erasure-log.test.ts +72 -0
  763. package/test/unit/error-mapping.test.ts +89 -0
  764. package/test/unit/export-entries.test.ts +85 -0
  765. package/test/unit/export-sanitize.test.ts +27 -0
  766. package/test/unit/files-head-route.test.ts +155 -0
  767. package/test/unit/files-http.test.ts +97 -0
  768. package/test/unit/head-rewrite.test.ts +72 -0
  769. package/test/unit/hub-create-org.test.ts +181 -0
  770. package/test/unit/hub-jwt.test.ts +93 -0
  771. package/test/unit/hub-sso-params.test.ts +39 -0
  772. package/test/unit/hub-subject.test.ts +83 -0
  773. package/test/unit/idempotency-crypto.test.ts +45 -0
  774. package/test/unit/json-depth.test.ts +88 -0
  775. package/test/unit/logger-redaction.test.ts +66 -0
  776. package/test/unit/mcp-errors.test.ts +110 -0
  777. package/test/unit/mcp-inputs.test.ts +106 -0
  778. package/test/unit/mcp-project-hints.test.ts +26 -0
  779. package/test/unit/no-store.test.ts +49 -0
  780. package/test/unit/no-tool-migration-filename.test.ts +70 -0
  781. package/test/unit/observability.test.ts +64 -0
  782. package/test/unit/openapi-doc.test.ts +93 -0
  783. package/test/unit/rate-limit-consume-on.test.ts +76 -0
  784. package/test/unit/rate-limit.test.ts +39 -0
  785. package/test/unit/readyz-storage.test.ts +157 -0
  786. package/test/unit/request-quota.test.ts +146 -0
  787. package/test/unit/scopes.test.ts +66 -0
  788. package/test/unit/security-headers.test.ts +131 -0
  789. package/test/unit/serve-content-type.test.ts +74 -0
  790. package/test/unit/setup-transport.test.ts +29 -0
  791. package/test/unit/storage-local.test.ts +53 -0
  792. package/test/unit/superadmin.test.ts +32 -0
  793. package/test/unit/timers.test.ts +287 -0
  794. package/test/unit/tool-definition-guards.test.ts +166 -0
  795. package/test/unit/tool-entitlements-guard.test.ts +168 -0
  796. package/test/unit/usage-poster.test.ts +542 -0
  797. package/test/unit/usage-window.test.ts +48 -0
  798. package/test/unit/workspace-create-audit.test.ts +48 -0
@@ -0,0 +1,3927 @@
1
+ import { type Db } from '@antasphere/chassis-db';
2
+ import type { Env } from '../env.js';
3
+ import { type HubSsoService } from './hub-sso.js';
4
+ import { type DemoPassPluginDeps } from './demo-pass-plugin.js';
5
+ /**
6
+ * The only file that touches better-auth's constructor. Everything else goes
7
+ * through the identity module's exports or the IdentityProvider seam, so a
8
+ * Better Auth upgrade (or replacement) stays contained.
9
+ *
10
+ * Password login is the self-host default (no SMTP dependency). Email OTP
11
+ * auto-enables when an email driver is configured; Google when client
12
+ * credentials are set. The twoFactor plugin offers OPT-IN per-user TOTP +
13
+ * backup codes (ADR 009) — password and email-OTP sign-ins by an enrolled
14
+ * user require the second factor; machine credentials never see one. The
15
+ * jwt + oauthProvider plugins make every instance an OAuth 2.1 authorization
16
+ * server for its own bundled /mcp endpoint (M6): RS256 access JWTs (15 min),
17
+ * rotating refresh tokens, PKCE + dynamic client registration, issuance
18
+ * gated on a LIVE active workspace membership.
19
+ */
20
+ /** Credential events audited on Better-Auth-native routes. */
21
+ export type AccountEvent = 'password_reset' | 'password_change' | 'email_change_request' | 'email_change' | 'two_factor_enroll' | 'two_factor_disable';
22
+ export interface CreateAuthOptions {
23
+ db: Db;
24
+ env: Pick<Env, 'PUBLIC_BASE_URL' | 'GOOGLE_CLIENT_ID' | 'GOOGLE_CLIENT_SECRET' | 'OAUTH_DYNAMIC_CLIENT_REGISTRATION' | 'SUPERADMIN_EMAILS'>;
25
+ authSecret: string;
26
+ /**
27
+ * The tool's OAuth scope list, in the ORDER it is published (discovery
28
+ * `scopes_supported`, the consent screen, client registration defaults).
29
+ * The chassis spells no scope name: the tool defines the list and hands it
30
+ * in; the well-known documents read the same array from the tool.
31
+ */
32
+ oauthScopes: readonly string[];
33
+ /**
34
+ * Origins that are NEVER trusted, serving origin or not (PRDCT-1352): each
35
+ * is filtered out of `trustedOrigins` and refused outright by the sign-in
36
+ * Origin lock. Empty = nothing installed. A tool with a viewer passes its
37
+ * viewer origin (author-controlled script runs there).
38
+ */
39
+ untrustedOrigins: readonly string[];
40
+ /** When provided (an email driver delivers), the email-OTP login auto-enables. */
41
+ sendOtp?: (params: {
42
+ email: string;
43
+ otp: string;
44
+ type: string;
45
+ }) => Promise<void>;
46
+ /**
47
+ * When provided (an email driver delivers), self-serve password reset
48
+ * auto-enables — POST /request-password-reset mails a link. Without it that
49
+ * endpoint stays closed (400) and only the admin-generated reset link works.
50
+ * On EDITION=cloud it is IGNORED: the whole reset surface refuses there
51
+ * (D1 hub-only posture — see isPasswordResetPath and the before-hook).
52
+ */
53
+ sendResetPassword?: (params: {
54
+ email: string;
55
+ url: string;
56
+ token: string;
57
+ }) => Promise<void>;
58
+ /**
59
+ * Confirmation mail to the OLD address when a VERIFIED user requests an
60
+ * email change (the two-leg flow). Unverified users — the template's common
61
+ * case — skip straight to the verification mail below.
62
+ */
63
+ sendChangeEmailConfirmation?: (params: {
64
+ email: string;
65
+ newEmail: string;
66
+ url: string;
67
+ token: string;
68
+ }) => Promise<void>;
69
+ /**
70
+ * Verification mail to the NEW address — the final leg of every self-serve
71
+ * email change. When provided (an email driver delivers), POST /change-email
72
+ * opens; without it the endpoint answers 400 BEFORE any email lookup (no
73
+ * enumeration oracle) and only the admin-generated change link works.
74
+ */
75
+ sendVerificationEmail?: (params: {
76
+ email: string;
77
+ url: string;
78
+ token: string;
79
+ }) => Promise<void>;
80
+ /**
81
+ * Audit hook for credential events on Better-Auth-native routes (which
82
+ * bypass the /api/v1 audit middleware). Fired best-effort by the caller.
83
+ */
84
+ onAccountEvent?: (event: AccountEvent, userId: string) => Promise<void>;
85
+ /**
86
+ * Fired from Better Auth's databaseHooks.user.create.after — the ONE seam
87
+ * every account entrance passes through (setup, invitation accept, the
88
+ * collaborator claim endpoint, any future SSO JIT), so a `user.created`
89
+ * event is trustworthy by construction instead of depending on each call
90
+ * site remembering to emit. Boot wires this to the platform event bus.
91
+ */
92
+ onUserCreated?: (user: {
93
+ id: string;
94
+ email: string;
95
+ }) => void;
96
+ /**
97
+ * Self-service account deletion guard, run by POST /delete-user BEFORE the
98
+ * row cascade. Boot wires the AccountDeletionService here and translates
99
+ * LastOwnerError into an APIError('BAD_REQUEST') so the route answers 400.
100
+ */
101
+ beforeUserDelete?: (userId: string) => Promise<void>;
102
+ /** Completion hook, run AFTER the cascade (the audit row's system actor). */
103
+ afterUserDelete?: (user: {
104
+ id: string;
105
+ email: string;
106
+ }) => Promise<void>;
107
+ /**
108
+ * The cloud edition's hub SSO binding (internal/federation.md, ADR 015).
109
+ * Present ONLY when the instance boots EDITION=cloud: registers the
110
+ * `antasphere` genericOAuth relying party, the D9 trusted-link config,
111
+ * and the per-login callback after-hook (JIT projection + re-sync). An
112
+ * oss boot passes nothing and carries zero SSO surface at runtime.
113
+ */
114
+ hubSso?: HubSsoService | undefined;
115
+ /**
116
+ * Demo sign-in (identity/demo-pass-plugin.ts): handed in by boot only while
117
+ * DEMO_SIGN_IN is on. The redeem endpoint is registered only then, and
118
+ * only on the self-hosted edition.
119
+ */
120
+ demoPass?: DemoPassPluginDeps | undefined;
121
+ }
122
+ export declare const AUTH_BASE_PATH = "/api/v1/auth";
123
+ /**
124
+ * The canonical OAuth resource identifier (JWT `aud`, RFC 8707) — the bundled
125
+ * MCP endpoint. Derived from PUBLIC_BASE_URL at boot, never from its own env
126
+ * var: AS and resource live on one origin, so the byte-identical-URL footgun
127
+ * of the split dashboard+MCP deployment cannot exist here.
128
+ */
129
+ export declare function mcpResourceUrl(publicBaseUrl: string): string;
130
+ export type Auth = ReturnType<typeof createAuth>;
131
+ /**
132
+ * Better Auth `trustedOrigins` (PRDCT-1352): the configured public origin plus
133
+ * the origin the request was served on (localhost, previews, any domain behind
134
+ * a TLS-terminating proxy) — MINUS the viewer origin, which is author-
135
+ * controlled script's origin and is never trusted, serving origin or
136
+ * not. The host gate keeps the auth surface off that hostname; this is the
137
+ * second lock behind it. Exported pure so a unit test can pin the exclusion.
138
+ */
139
+ export declare function trustedOriginsFor(publicBaseUrl: string, untrustedOrigins: readonly string[]): (request?: Request) => string[];
140
+ /**
141
+ * The sign-in Origin lock (M9 login-CSRF hardening + PRDCT-1352): a sign-in
142
+ * that presents an Origin must present a trusted one — the serving origin or
143
+ * Better Auth's own trusted list — and the viewer origin is refused OUTRIGHT,
144
+ * even as the serving origin: author script must never mint a session on the
145
+ * hostname it runs on. Exported pure so a unit test can pin both arms.
146
+ */
147
+ export declare function signInOriginRefused(input: {
148
+ origin: string;
149
+ servingOrigin: string | null;
150
+ untrustedOrigins: readonly string[];
151
+ isTrustedOrigin: (origin: string) => boolean;
152
+ }): boolean;
153
+ export declare function createAuth({ db, env, authSecret, oauthScopes, untrustedOrigins, sendOtp, sendResetPassword, sendChangeEmailConfirmation, sendVerificationEmail, onAccountEvent, onUserCreated, beforeUserDelete, afterUserDelete, hubSso, demoPass }: CreateAuthOptions): import("better-auth").Auth<{
154
+ database: (options: import("@better-auth/core").BetterAuthOptions) => import("@better-auth/core/db/adapter").DBAdapter<import("@better-auth/core").BetterAuthOptions>;
155
+ user: {
156
+ changeEmail: {
157
+ sendChangeEmailConfirmation?: ({ user, newEmail, url, token }: {
158
+ user: {
159
+ email: string;
160
+ };
161
+ newEmail: string;
162
+ url: string;
163
+ token: string;
164
+ }) => Promise<void>;
165
+ enabled: true;
166
+ };
167
+ deleteUser: {
168
+ enabled: true;
169
+ beforeDelete: (user: {
170
+ id: string;
171
+ }) => Promise<void>;
172
+ afterDelete: (user: {
173
+ id: string;
174
+ email: string;
175
+ }) => Promise<void>;
176
+ };
177
+ };
178
+ emailVerification: {
179
+ afterEmailVerification: (user: {
180
+ id: string;
181
+ }) => Promise<void>;
182
+ sendVerificationEmail?: ({ user, url, token }: {
183
+ user: {
184
+ email: string;
185
+ };
186
+ url: string;
187
+ token: string;
188
+ }) => Promise<void>;
189
+ expiresIn: number;
190
+ };
191
+ emailAndPassword: {
192
+ resetPasswordTokenExpiresIn?: number;
193
+ sendResetPassword?: ({ user, url, token }: {
194
+ user: {
195
+ email: string;
196
+ };
197
+ url: string;
198
+ token: string;
199
+ }) => Promise<void>;
200
+ enabled: true;
201
+ minPasswordLength: number;
202
+ revokeSessionsOnPasswordReset: true;
203
+ onPasswordReset: ({ user }: {
204
+ user: {
205
+ id: string;
206
+ };
207
+ }) => Promise<void>;
208
+ };
209
+ hooks: {
210
+ before: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
211
+ after: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
212
+ twoFactorRedirect: boolean;
213
+ twoFactorMethods: string[];
214
+ } | undefined>;
215
+ };
216
+ databaseHooks: {
217
+ user: {
218
+ create: {
219
+ after: (user: {
220
+ id: string;
221
+ email: string;
222
+ }) => Promise<void>;
223
+ };
224
+ };
225
+ };
226
+ session: {
227
+ expiresIn: number;
228
+ disableSessionRefresh: true;
229
+ updateAge?: never;
230
+ } | {
231
+ expiresIn: number;
232
+ updateAge: number;
233
+ disableSessionRefresh?: never;
234
+ };
235
+ advanced: {
236
+ useSecureCookies: boolean;
237
+ };
238
+ rateLimit: {
239
+ window: number;
240
+ max: number;
241
+ customRules: {
242
+ '/sign-in/oauth2': {
243
+ window: number;
244
+ max: number;
245
+ };
246
+ };
247
+ };
248
+ trustedOrigins: (request?: Request) => string[];
249
+ onAPIError?: {
250
+ errorURL: string;
251
+ };
252
+ plugins: [...(import("better-auth").BetterAuthPlugin | {
253
+ id: "generic-oauth";
254
+ version: string;
255
+ init: (ctx: import("better-auth").AuthContext) => {
256
+ context: {
257
+ socialProviders: import("better-auth").OAuthProvider<Record<string, any>, Partial<import("better-auth").ProviderOptions<any>>>[];
258
+ };
259
+ };
260
+ endpoints: {
261
+ signInWithOAuth2: import("better-auth").StrictEndpoint<"/sign-in/oauth2", {
262
+ method: "POST";
263
+ body: import("better-auth").ZodObject<{
264
+ providerId: import("better-auth").ZodString;
265
+ callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
266
+ errorCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
267
+ newUserCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
268
+ disableRedirect: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
269
+ scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
270
+ requestSignUp: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
271
+ additionalData: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
272
+ }, import("zod/v4/core").$strip>;
273
+ metadata: {
274
+ openapi: {
275
+ description: string;
276
+ responses: {
277
+ 200: {
278
+ description: string;
279
+ content: {
280
+ "application/json": {
281
+ schema: {
282
+ type: "object";
283
+ properties: {
284
+ url: {
285
+ type: string;
286
+ };
287
+ redirect: {
288
+ type: string;
289
+ };
290
+ };
291
+ };
292
+ };
293
+ };
294
+ };
295
+ };
296
+ };
297
+ };
298
+ }, {
299
+ url: string;
300
+ redirect: boolean;
301
+ }>;
302
+ oAuth2Callback: import("better-auth").StrictEndpoint<"/oauth2/callback/:providerId", {
303
+ method: "GET";
304
+ query: import("better-auth").ZodObject<{
305
+ code: import("better-auth").ZodOptional<import("better-auth").ZodString>;
306
+ error: import("better-auth").ZodOptional<import("better-auth").ZodString>;
307
+ error_description: import("better-auth").ZodOptional<import("better-auth").ZodString>;
308
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
309
+ iss: import("better-auth").ZodOptional<import("better-auth").ZodString>;
310
+ }, import("zod/v4/core").$strip>;
311
+ metadata: {
312
+ allowedMediaTypes: string[];
313
+ openapi: {
314
+ description: string;
315
+ responses: {
316
+ 200: {
317
+ description: string;
318
+ content: {
319
+ "application/json": {
320
+ schema: {
321
+ type: "object";
322
+ properties: {
323
+ url: {
324
+ type: string;
325
+ };
326
+ };
327
+ };
328
+ };
329
+ };
330
+ };
331
+ };
332
+ };
333
+ scope: "server";
334
+ };
335
+ }, never>;
336
+ oAuth2LinkAccount: import("better-auth").StrictEndpoint<"/oauth2/link", {
337
+ method: "POST";
338
+ body: import("better-auth").ZodObject<{
339
+ providerId: import("better-auth").ZodString;
340
+ callbackURL: import("better-auth").ZodString;
341
+ scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
342
+ errorCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
343
+ }, import("zod/v4/core").$strip>;
344
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
345
+ session: {
346
+ session: Record<string, any> & {
347
+ id: string;
348
+ createdAt: Date;
349
+ updatedAt: Date;
350
+ userId: string;
351
+ expiresAt: Date;
352
+ token: string;
353
+ ipAddress?: string | null | undefined;
354
+ userAgent?: string | null | undefined;
355
+ };
356
+ user: Record<string, any> & {
357
+ id: string;
358
+ createdAt: Date;
359
+ updatedAt: Date;
360
+ email: string;
361
+ emailVerified: boolean;
362
+ name: string;
363
+ image?: string | null | undefined;
364
+ };
365
+ };
366
+ }>)[];
367
+ metadata: {
368
+ openapi: {
369
+ description: string;
370
+ responses: {
371
+ "200": {
372
+ description: string;
373
+ content: {
374
+ "application/json": {
375
+ schema: {
376
+ type: "object";
377
+ properties: {
378
+ url: {
379
+ type: string;
380
+ format: string;
381
+ description: string;
382
+ };
383
+ redirect: {
384
+ type: string;
385
+ description: string;
386
+ enum: boolean[];
387
+ };
388
+ };
389
+ required: string[];
390
+ };
391
+ };
392
+ };
393
+ };
394
+ };
395
+ };
396
+ };
397
+ }, {
398
+ url: string;
399
+ redirect: boolean;
400
+ }>;
401
+ };
402
+ options: import("better-auth/plugins").GenericOAuthOptions;
403
+ $ERROR_CODES: {
404
+ INVALID_OAUTH_CONFIGURATION: import("better-auth").RawError<"INVALID_OAUTH_CONFIGURATION">;
405
+ TOKEN_URL_NOT_FOUND: import("better-auth").RawError<"TOKEN_URL_NOT_FOUND">;
406
+ PROVIDER_CONFIG_NOT_FOUND: import("better-auth").RawError<"PROVIDER_CONFIG_NOT_FOUND">;
407
+ PROVIDER_ID_REQUIRED: import("better-auth").RawError<"PROVIDER_ID_REQUIRED">;
408
+ INVALID_OAUTH_CONFIG: import("better-auth").RawError<"INVALID_OAUTH_CONFIG">;
409
+ SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
410
+ ISSUER_MISMATCH: import("better-auth").RawError<"ISSUER_MISMATCH">;
411
+ ISSUER_MISSING: import("better-auth").RawError<"ISSUER_MISSING">;
412
+ };
413
+ } | {
414
+ id: "email-otp";
415
+ version: string;
416
+ init(ctx: import("better-auth").AuthContext): {
417
+ options: {
418
+ emailVerification: {
419
+ sendVerificationEmail(data: {
420
+ user: import("better-auth").User;
421
+ url: string;
422
+ token: string;
423
+ }, request: Request | undefined): Promise<void>;
424
+ };
425
+ };
426
+ } | undefined;
427
+ endpoints: {
428
+ sendVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/send-verification-otp", {
429
+ method: "POST";
430
+ body: import("better-auth").ZodObject<{
431
+ email: import("better-auth").ZodString;
432
+ type: import("better-auth").ZodEnum<{
433
+ "sign-in": "sign-in";
434
+ "change-email": "change-email";
435
+ "email-verification": "email-verification";
436
+ "forget-password": "forget-password";
437
+ }>;
438
+ }, import("zod/v4/core").$strip>;
439
+ metadata: {
440
+ openapi: {
441
+ operationId: string;
442
+ description: string;
443
+ responses: {
444
+ 200: {
445
+ description: string;
446
+ content: {
447
+ "application/json": {
448
+ schema: {
449
+ type: "object";
450
+ properties: {
451
+ success: {
452
+ type: string;
453
+ };
454
+ };
455
+ };
456
+ };
457
+ };
458
+ };
459
+ };
460
+ };
461
+ };
462
+ }, {
463
+ success: boolean;
464
+ }>;
465
+ createVerificationOTP: import("better-auth").StrictEndpoint<string, {
466
+ method: "POST";
467
+ body: import("better-auth").ZodObject<{
468
+ email: import("better-auth").ZodString;
469
+ type: import("better-auth").ZodEnum<{
470
+ "sign-in": "sign-in";
471
+ "change-email": "change-email";
472
+ "email-verification": "email-verification";
473
+ "forget-password": "forget-password";
474
+ }>;
475
+ }, import("zod/v4/core").$strip>;
476
+ metadata: {
477
+ openapi: {
478
+ operationId: string;
479
+ description: string;
480
+ responses: {
481
+ 200: {
482
+ description: string;
483
+ content: {
484
+ "application/json": {
485
+ schema: {
486
+ type: "string";
487
+ };
488
+ };
489
+ };
490
+ };
491
+ };
492
+ };
493
+ };
494
+ }, string>;
495
+ getVerificationOTP: import("better-auth").StrictEndpoint<string, {
496
+ method: "GET";
497
+ query: import("better-auth").ZodObject<{
498
+ email: import("better-auth").ZodString;
499
+ type: import("better-auth").ZodEnum<{
500
+ "sign-in": "sign-in";
501
+ "change-email": "change-email";
502
+ "email-verification": "email-verification";
503
+ "forget-password": "forget-password";
504
+ }>;
505
+ }, import("zod/v4/core").$strip>;
506
+ metadata: {
507
+ openapi: {
508
+ operationId: string;
509
+ description: string;
510
+ responses: {
511
+ "200": {
512
+ description: string;
513
+ content: {
514
+ "application/json": {
515
+ schema: {
516
+ type: "object";
517
+ properties: {
518
+ otp: {
519
+ type: string;
520
+ nullable: boolean;
521
+ description: string;
522
+ };
523
+ };
524
+ required: string[];
525
+ };
526
+ };
527
+ };
528
+ };
529
+ };
530
+ };
531
+ };
532
+ }, {
533
+ otp: null;
534
+ } | {
535
+ otp: string;
536
+ }>;
537
+ checkVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/check-verification-otp", {
538
+ method: "POST";
539
+ body: import("better-auth").ZodObject<{
540
+ email: import("better-auth").ZodString;
541
+ type: import("better-auth").ZodEnum<{
542
+ "sign-in": "sign-in";
543
+ "change-email": "change-email";
544
+ "email-verification": "email-verification";
545
+ "forget-password": "forget-password";
546
+ }>;
547
+ otp: import("better-auth").ZodString;
548
+ }, import("zod/v4/core").$strip>;
549
+ metadata: {
550
+ openapi: {
551
+ operationId: string;
552
+ description: string;
553
+ responses: {
554
+ 200: {
555
+ description: string;
556
+ content: {
557
+ "application/json": {
558
+ schema: {
559
+ type: "object";
560
+ properties: {
561
+ success: {
562
+ type: string;
563
+ };
564
+ };
565
+ };
566
+ };
567
+ };
568
+ };
569
+ };
570
+ };
571
+ };
572
+ }, {
573
+ success: boolean;
574
+ }>;
575
+ verifyEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/verify-email", {
576
+ method: "POST";
577
+ body: import("better-auth").ZodObject<{
578
+ email: import("better-auth").ZodString;
579
+ otp: import("better-auth").ZodString;
580
+ }, import("zod/v4/core").$strip>;
581
+ metadata: {
582
+ openapi: {
583
+ description: string;
584
+ responses: {
585
+ 200: {
586
+ description: string;
587
+ content: {
588
+ "application/json": {
589
+ schema: {
590
+ type: "object";
591
+ properties: {
592
+ status: {
593
+ type: string;
594
+ description: string;
595
+ enum: boolean[];
596
+ };
597
+ token: {
598
+ type: string;
599
+ nullable: boolean;
600
+ description: string;
601
+ };
602
+ user: {
603
+ $ref: string;
604
+ };
605
+ };
606
+ required: string[];
607
+ };
608
+ };
609
+ };
610
+ };
611
+ };
612
+ };
613
+ };
614
+ }, {
615
+ status: boolean;
616
+ token: string;
617
+ user: {
618
+ id: string;
619
+ createdAt: Date;
620
+ updatedAt: Date;
621
+ email: string;
622
+ emailVerified: boolean;
623
+ name: string;
624
+ image?: string | null | undefined;
625
+ } & Record<string, any>;
626
+ } | {
627
+ status: boolean;
628
+ token: null;
629
+ user: {
630
+ id: string;
631
+ createdAt: Date;
632
+ updatedAt: Date;
633
+ email: string;
634
+ emailVerified: boolean;
635
+ name: string;
636
+ image?: string | null | undefined;
637
+ } & Record<string, any>;
638
+ }>;
639
+ signInEmailOTP: import("better-auth").StrictEndpoint<"/sign-in/email-otp", {
640
+ method: "POST";
641
+ body: import("better-auth").ZodIntersection<import("better-auth").ZodObject<{
642
+ email: import("better-auth").ZodString;
643
+ otp: import("better-auth").ZodString;
644
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
645
+ image: import("better-auth").ZodOptional<import("better-auth").ZodString>;
646
+ }, import("zod/v4/core").$strip>, import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
647
+ metadata: {
648
+ openapi: {
649
+ operationId: string;
650
+ description: string;
651
+ responses: {
652
+ 200: {
653
+ description: string;
654
+ content: {
655
+ "application/json": {
656
+ schema: {
657
+ type: "object";
658
+ properties: {
659
+ token: {
660
+ type: string;
661
+ description: string;
662
+ };
663
+ user: {
664
+ $ref: string;
665
+ };
666
+ };
667
+ required: string[];
668
+ };
669
+ };
670
+ };
671
+ };
672
+ };
673
+ };
674
+ };
675
+ }, {
676
+ token: string;
677
+ user: {
678
+ id: string;
679
+ createdAt: Date;
680
+ updatedAt: Date;
681
+ email: string;
682
+ emailVerified: boolean;
683
+ name: string;
684
+ image?: string | null | undefined;
685
+ };
686
+ }>;
687
+ requestPasswordResetEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/request-password-reset", {
688
+ method: "POST";
689
+ body: import("better-auth").ZodObject<{
690
+ email: import("better-auth").ZodString;
691
+ }, import("zod/v4/core").$strip>;
692
+ metadata: {
693
+ openapi: {
694
+ operationId: string;
695
+ description: string;
696
+ responses: {
697
+ 200: {
698
+ description: string;
699
+ content: {
700
+ "application/json": {
701
+ schema: {
702
+ type: "object";
703
+ properties: {
704
+ success: {
705
+ type: string;
706
+ description: string;
707
+ };
708
+ };
709
+ };
710
+ };
711
+ };
712
+ };
713
+ };
714
+ };
715
+ };
716
+ }, {
717
+ success: boolean;
718
+ }>;
719
+ forgetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/forget-password/email-otp", {
720
+ method: "POST";
721
+ body: import("better-auth").ZodObject<{
722
+ email: import("better-auth").ZodString;
723
+ }, import("zod/v4/core").$strip>;
724
+ metadata: {
725
+ openapi: {
726
+ operationId: string;
727
+ description: string;
728
+ responses: {
729
+ 200: {
730
+ description: string;
731
+ content: {
732
+ "application/json": {
733
+ schema: {
734
+ type: "object";
735
+ properties: {
736
+ success: {
737
+ type: string;
738
+ description: string;
739
+ };
740
+ };
741
+ };
742
+ };
743
+ };
744
+ };
745
+ };
746
+ };
747
+ };
748
+ }, {
749
+ success: boolean;
750
+ }>;
751
+ resetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/reset-password", {
752
+ method: "POST";
753
+ body: import("better-auth").ZodObject<{
754
+ email: import("better-auth").ZodString;
755
+ otp: import("better-auth").ZodString;
756
+ password: import("better-auth").ZodString;
757
+ }, import("zod/v4/core").$strip>;
758
+ metadata: {
759
+ openapi: {
760
+ operationId: string;
761
+ description: string;
762
+ responses: {
763
+ 200: {
764
+ description: string;
765
+ content: {
766
+ "application/json": {
767
+ schema: {
768
+ type: "object";
769
+ properties: {
770
+ success: {
771
+ type: string;
772
+ };
773
+ };
774
+ };
775
+ };
776
+ };
777
+ };
778
+ };
779
+ };
780
+ };
781
+ }, {
782
+ success: boolean;
783
+ }>;
784
+ requestEmailChangeEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/request-email-change", {
785
+ method: "POST";
786
+ body: import("better-auth").ZodObject<{
787
+ newEmail: import("better-auth").ZodString;
788
+ otp: import("better-auth").ZodOptional<import("better-auth").ZodString>;
789
+ }, import("zod/v4/core").$strip>;
790
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
791
+ session: {
792
+ session: Record<string, any> & {
793
+ id: string;
794
+ createdAt: Date;
795
+ updatedAt: Date;
796
+ userId: string;
797
+ expiresAt: Date;
798
+ token: string;
799
+ ipAddress?: string | null | undefined;
800
+ userAgent?: string | null | undefined;
801
+ };
802
+ user: Record<string, any> & {
803
+ id: string;
804
+ createdAt: Date;
805
+ updatedAt: Date;
806
+ email: string;
807
+ emailVerified: boolean;
808
+ name: string;
809
+ image?: string | null | undefined;
810
+ };
811
+ };
812
+ }>)[];
813
+ metadata: {
814
+ openapi: {
815
+ operationId: string;
816
+ description: string;
817
+ responses: {
818
+ 200: {
819
+ description: string;
820
+ content: {
821
+ "application/json": {
822
+ schema: {
823
+ type: "object";
824
+ properties: {
825
+ success: {
826
+ type: string;
827
+ };
828
+ };
829
+ };
830
+ };
831
+ };
832
+ };
833
+ };
834
+ };
835
+ };
836
+ }, {
837
+ success: boolean;
838
+ }>;
839
+ changeEmailEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/change-email", {
840
+ method: "POST";
841
+ body: import("better-auth").ZodObject<{
842
+ newEmail: import("better-auth").ZodString;
843
+ otp: import("better-auth").ZodString;
844
+ }, import("zod/v4/core").$strip>;
845
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
846
+ session: {
847
+ session: Record<string, any> & {
848
+ id: string;
849
+ createdAt: Date;
850
+ updatedAt: Date;
851
+ userId: string;
852
+ expiresAt: Date;
853
+ token: string;
854
+ ipAddress?: string | null | undefined;
855
+ userAgent?: string | null | undefined;
856
+ };
857
+ user: Record<string, any> & {
858
+ id: string;
859
+ createdAt: Date;
860
+ updatedAt: Date;
861
+ email: string;
862
+ emailVerified: boolean;
863
+ name: string;
864
+ image?: string | null | undefined;
865
+ };
866
+ };
867
+ }>)[];
868
+ metadata: {
869
+ openapi: {
870
+ operationId: string;
871
+ description: string;
872
+ responses: {
873
+ 200: {
874
+ description: string;
875
+ content: {
876
+ "application/json": {
877
+ schema: {
878
+ type: "object";
879
+ properties: {
880
+ success: {
881
+ type: string;
882
+ };
883
+ };
884
+ };
885
+ };
886
+ };
887
+ };
888
+ };
889
+ };
890
+ };
891
+ }, {
892
+ success: boolean;
893
+ }>;
894
+ };
895
+ hooks: {
896
+ after: {
897
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
898
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
899
+ }[];
900
+ };
901
+ rateLimit: ({
902
+ pathMatcher(path: string): path is "/email-otp/send-verification-otp";
903
+ window: number;
904
+ max: number;
905
+ } | {
906
+ pathMatcher(path: string): path is "/email-otp/check-verification-otp";
907
+ window: number;
908
+ max: number;
909
+ } | {
910
+ pathMatcher(path: string): path is "/email-otp/verify-email";
911
+ window: number;
912
+ max: number;
913
+ } | {
914
+ pathMatcher(path: string): path is "/sign-in/email-otp";
915
+ window: number;
916
+ max: number;
917
+ } | {
918
+ pathMatcher(path: string): path is "/email-otp/request-password-reset";
919
+ window: number;
920
+ max: number;
921
+ } | {
922
+ pathMatcher(path: string): path is "/email-otp/reset-password";
923
+ window: number;
924
+ max: number;
925
+ } | {
926
+ pathMatcher(path: string): path is "/forget-password/email-otp";
927
+ window: number;
928
+ max: number;
929
+ } | {
930
+ pathMatcher(path: string): path is "/email-otp/request-email-change";
931
+ window: number;
932
+ max: number;
933
+ } | {
934
+ pathMatcher(path: string): path is "/email-otp/change-email";
935
+ window: number;
936
+ max: number;
937
+ })[];
938
+ options: import("better-auth/plugins").EmailOTPOptions;
939
+ $ERROR_CODES: {
940
+ OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
941
+ INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
942
+ TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
943
+ };
944
+ })[], {
945
+ id: "two-factor";
946
+ version: string;
947
+ endpoints: {
948
+ enableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/enable", {
949
+ method: "POST";
950
+ body: import("better-auth").ZodObject<{
951
+ password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
952
+ issuer: import("better-auth").ZodOptional<import("better-auth").ZodString>;
953
+ }, import("zod/v4/core").$strip> | import("better-auth").ZodObject<{
954
+ password: import("better-auth").ZodString;
955
+ issuer: import("better-auth").ZodOptional<import("better-auth").ZodString>;
956
+ }, import("zod/v4/core").$strip>;
957
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
958
+ session: {
959
+ session: Record<string, any> & {
960
+ id: string;
961
+ createdAt: Date;
962
+ updatedAt: Date;
963
+ userId: string;
964
+ expiresAt: Date;
965
+ token: string;
966
+ ipAddress?: string | null | undefined;
967
+ userAgent?: string | null | undefined;
968
+ };
969
+ user: Record<string, any> & {
970
+ id: string;
971
+ createdAt: Date;
972
+ updatedAt: Date;
973
+ email: string;
974
+ emailVerified: boolean;
975
+ name: string;
976
+ image?: string | null | undefined;
977
+ };
978
+ };
979
+ }>)[];
980
+ metadata: {
981
+ openapi: {
982
+ summary: string;
983
+ description: string;
984
+ responses: {
985
+ 200: {
986
+ description: string;
987
+ content: {
988
+ "application/json": {
989
+ schema: {
990
+ type: "object";
991
+ properties: {
992
+ totpURI: {
993
+ type: string;
994
+ description: string;
995
+ };
996
+ backupCodes: {
997
+ type: string;
998
+ items: {
999
+ type: string;
1000
+ };
1001
+ description: string;
1002
+ };
1003
+ };
1004
+ };
1005
+ };
1006
+ };
1007
+ };
1008
+ };
1009
+ };
1010
+ };
1011
+ }, {
1012
+ totpURI: string;
1013
+ backupCodes: string[];
1014
+ }>;
1015
+ disableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/disable", {
1016
+ method: "POST";
1017
+ body: import("better-auth").ZodObject<{
1018
+ password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1019
+ }, import("zod/v4/core").$strip> | import("better-auth").ZodObject<{
1020
+ password: import("better-auth").ZodString;
1021
+ }, import("zod/v4/core").$strip>;
1022
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1023
+ session: {
1024
+ session: Record<string, any> & {
1025
+ id: string;
1026
+ createdAt: Date;
1027
+ updatedAt: Date;
1028
+ userId: string;
1029
+ expiresAt: Date;
1030
+ token: string;
1031
+ ipAddress?: string | null | undefined;
1032
+ userAgent?: string | null | undefined;
1033
+ };
1034
+ user: Record<string, any> & {
1035
+ id: string;
1036
+ createdAt: Date;
1037
+ updatedAt: Date;
1038
+ email: string;
1039
+ emailVerified: boolean;
1040
+ name: string;
1041
+ image?: string | null | undefined;
1042
+ };
1043
+ };
1044
+ }>)[];
1045
+ metadata: {
1046
+ openapi: {
1047
+ summary: string;
1048
+ description: string;
1049
+ responses: {
1050
+ 200: {
1051
+ description: string;
1052
+ content: {
1053
+ "application/json": {
1054
+ schema: {
1055
+ type: "object";
1056
+ properties: {
1057
+ status: {
1058
+ type: string;
1059
+ };
1060
+ };
1061
+ };
1062
+ };
1063
+ };
1064
+ };
1065
+ };
1066
+ };
1067
+ };
1068
+ }, {
1069
+ status: boolean;
1070
+ }>;
1071
+ verifyBackupCode: import("better-auth").StrictEndpoint<"/two-factor/verify-backup-code", {
1072
+ method: "POST";
1073
+ body: import("better-auth").ZodObject<{
1074
+ code: import("better-auth").ZodString;
1075
+ disableSession: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1076
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1077
+ }, import("zod/v4/core").$strip>;
1078
+ metadata: {
1079
+ openapi: {
1080
+ description: string;
1081
+ responses: {
1082
+ "200": {
1083
+ description: string;
1084
+ content: {
1085
+ "application/json": {
1086
+ schema: {
1087
+ type: "object";
1088
+ properties: {
1089
+ user: {
1090
+ type: string;
1091
+ properties: {
1092
+ id: {
1093
+ type: string;
1094
+ description: string;
1095
+ };
1096
+ email: {
1097
+ type: string;
1098
+ format: string;
1099
+ nullable: boolean;
1100
+ description: string;
1101
+ };
1102
+ emailVerified: {
1103
+ type: string;
1104
+ nullable: boolean;
1105
+ description: string;
1106
+ };
1107
+ name: {
1108
+ type: string;
1109
+ nullable: boolean;
1110
+ description: string;
1111
+ };
1112
+ image: {
1113
+ type: string;
1114
+ format: string;
1115
+ nullable: boolean;
1116
+ description: string;
1117
+ };
1118
+ twoFactorEnabled: {
1119
+ type: string;
1120
+ description: string;
1121
+ };
1122
+ createdAt: {
1123
+ type: string;
1124
+ format: string;
1125
+ description: string;
1126
+ };
1127
+ updatedAt: {
1128
+ type: string;
1129
+ format: string;
1130
+ description: string;
1131
+ };
1132
+ };
1133
+ required: string[];
1134
+ description: string;
1135
+ };
1136
+ session: {
1137
+ type: string;
1138
+ properties: {
1139
+ token: {
1140
+ type: string;
1141
+ description: string;
1142
+ };
1143
+ userId: {
1144
+ type: string;
1145
+ description: string;
1146
+ };
1147
+ createdAt: {
1148
+ type: string;
1149
+ format: string;
1150
+ description: string;
1151
+ };
1152
+ expiresAt: {
1153
+ type: string;
1154
+ format: string;
1155
+ description: string;
1156
+ };
1157
+ };
1158
+ required: string[];
1159
+ description: string;
1160
+ };
1161
+ };
1162
+ required: string[];
1163
+ };
1164
+ };
1165
+ };
1166
+ };
1167
+ };
1168
+ };
1169
+ };
1170
+ }, {
1171
+ token: string | undefined;
1172
+ user: (Record<string, any> & {
1173
+ id: string;
1174
+ createdAt: Date;
1175
+ updatedAt: Date;
1176
+ email: string;
1177
+ emailVerified: boolean;
1178
+ name: string;
1179
+ image?: string | null | undefined;
1180
+ }) | import("better-auth/plugins").UserWithTwoFactor;
1181
+ }>;
1182
+ generateBackupCodes: import("better-auth").StrictEndpoint<"/two-factor/generate-backup-codes", {
1183
+ method: "POST";
1184
+ body: import("better-auth").ZodObject<{
1185
+ password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1186
+ }, import("zod/v4/core").$strip> | import("better-auth").ZodObject<{
1187
+ password: import("better-auth").ZodString;
1188
+ }, import("zod/v4/core").$strip>;
1189
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1190
+ session: {
1191
+ session: Record<string, any> & {
1192
+ id: string;
1193
+ createdAt: Date;
1194
+ updatedAt: Date;
1195
+ userId: string;
1196
+ expiresAt: Date;
1197
+ token: string;
1198
+ ipAddress?: string | null | undefined;
1199
+ userAgent?: string | null | undefined;
1200
+ };
1201
+ user: Record<string, any> & {
1202
+ id: string;
1203
+ createdAt: Date;
1204
+ updatedAt: Date;
1205
+ email: string;
1206
+ emailVerified: boolean;
1207
+ name: string;
1208
+ image?: string | null | undefined;
1209
+ };
1210
+ };
1211
+ }>)[];
1212
+ metadata: {
1213
+ openapi: {
1214
+ description: string;
1215
+ responses: {
1216
+ "200": {
1217
+ description: string;
1218
+ content: {
1219
+ "application/json": {
1220
+ schema: {
1221
+ type: "object";
1222
+ properties: {
1223
+ status: {
1224
+ type: string;
1225
+ description: string;
1226
+ enum: boolean[];
1227
+ };
1228
+ backupCodes: {
1229
+ type: string;
1230
+ items: {
1231
+ type: string;
1232
+ };
1233
+ description: string;
1234
+ };
1235
+ };
1236
+ required: string[];
1237
+ };
1238
+ };
1239
+ };
1240
+ };
1241
+ };
1242
+ };
1243
+ };
1244
+ }, {
1245
+ status: boolean;
1246
+ backupCodes: string[];
1247
+ }>;
1248
+ viewBackupCodes: import("better-auth").StrictEndpoint<string, {
1249
+ method: "POST";
1250
+ body: import("better-auth").ZodObject<{
1251
+ userId: import("better-auth").ZodCoercedString<unknown>;
1252
+ }, import("zod/v4/core").$strip>;
1253
+ }, {
1254
+ status: boolean;
1255
+ backupCodes: string[];
1256
+ }>;
1257
+ sendTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/send-otp", {
1258
+ method: "POST";
1259
+ body: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
1260
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1261
+ }, import("zod/v4/core").$strip>>;
1262
+ metadata: {
1263
+ openapi: {
1264
+ summary: string;
1265
+ description: string;
1266
+ responses: {
1267
+ 200: {
1268
+ description: string;
1269
+ content: {
1270
+ "application/json": {
1271
+ schema: {
1272
+ type: "object";
1273
+ properties: {
1274
+ status: {
1275
+ type: string;
1276
+ };
1277
+ };
1278
+ };
1279
+ };
1280
+ };
1281
+ };
1282
+ };
1283
+ };
1284
+ };
1285
+ }, {
1286
+ status: boolean;
1287
+ }>;
1288
+ verifyTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-otp", {
1289
+ method: "POST";
1290
+ body: import("better-auth").ZodObject<{
1291
+ code: import("better-auth").ZodString;
1292
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1293
+ }, import("zod/v4/core").$strip>;
1294
+ metadata: {
1295
+ openapi: {
1296
+ summary: string;
1297
+ description: string;
1298
+ responses: {
1299
+ "200": {
1300
+ description: string;
1301
+ content: {
1302
+ "application/json": {
1303
+ schema: {
1304
+ type: "object";
1305
+ properties: {
1306
+ token: {
1307
+ type: string;
1308
+ description: string;
1309
+ };
1310
+ user: {
1311
+ type: string;
1312
+ properties: {
1313
+ id: {
1314
+ type: string;
1315
+ description: string;
1316
+ };
1317
+ email: {
1318
+ type: string;
1319
+ format: string;
1320
+ nullable: boolean;
1321
+ description: string;
1322
+ };
1323
+ emailVerified: {
1324
+ type: string;
1325
+ nullable: boolean;
1326
+ description: string;
1327
+ };
1328
+ name: {
1329
+ type: string;
1330
+ nullable: boolean;
1331
+ description: string;
1332
+ };
1333
+ image: {
1334
+ type: string;
1335
+ format: string;
1336
+ nullable: boolean;
1337
+ description: string;
1338
+ };
1339
+ createdAt: {
1340
+ type: string;
1341
+ format: string;
1342
+ description: string;
1343
+ };
1344
+ updatedAt: {
1345
+ type: string;
1346
+ format: string;
1347
+ description: string;
1348
+ };
1349
+ };
1350
+ required: string[];
1351
+ description: string;
1352
+ };
1353
+ };
1354
+ required: string[];
1355
+ };
1356
+ };
1357
+ };
1358
+ };
1359
+ };
1360
+ };
1361
+ };
1362
+ }, {
1363
+ token: string;
1364
+ user: import("better-auth/plugins").UserWithTwoFactor;
1365
+ } | {
1366
+ token: string;
1367
+ user: Record<string, any> & {
1368
+ id: string;
1369
+ createdAt: Date;
1370
+ updatedAt: Date;
1371
+ email: string;
1372
+ emailVerified: boolean;
1373
+ name: string;
1374
+ image?: string | null | undefined;
1375
+ };
1376
+ }>;
1377
+ generateTOTP: import("better-auth").StrictEndpoint<string, {
1378
+ method: "POST";
1379
+ body: import("better-auth").ZodObject<{
1380
+ secret: import("better-auth").ZodString;
1381
+ }, import("zod/v4/core").$strip>;
1382
+ metadata: {
1383
+ openapi: {
1384
+ summary: string;
1385
+ description: string;
1386
+ responses: {
1387
+ 200: {
1388
+ description: string;
1389
+ content: {
1390
+ "application/json": {
1391
+ schema: {
1392
+ type: "object";
1393
+ properties: {
1394
+ code: {
1395
+ type: string;
1396
+ };
1397
+ };
1398
+ };
1399
+ };
1400
+ };
1401
+ };
1402
+ };
1403
+ };
1404
+ };
1405
+ }, {
1406
+ code: string;
1407
+ }>;
1408
+ getTOTPURI: import("better-auth").StrictEndpoint<"/two-factor/get-totp-uri", {
1409
+ method: "POST";
1410
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1411
+ session: {
1412
+ session: Record<string, any> & {
1413
+ id: string;
1414
+ createdAt: Date;
1415
+ updatedAt: Date;
1416
+ userId: string;
1417
+ expiresAt: Date;
1418
+ token: string;
1419
+ ipAddress?: string | null | undefined;
1420
+ userAgent?: string | null | undefined;
1421
+ };
1422
+ user: Record<string, any> & {
1423
+ id: string;
1424
+ createdAt: Date;
1425
+ updatedAt: Date;
1426
+ email: string;
1427
+ emailVerified: boolean;
1428
+ name: string;
1429
+ image?: string | null | undefined;
1430
+ };
1431
+ };
1432
+ }>)[];
1433
+ body: import("better-auth").ZodObject<{
1434
+ password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1435
+ }, import("zod/v4/core").$strip> | import("better-auth").ZodObject<{
1436
+ password: import("better-auth").ZodString;
1437
+ }, import("zod/v4/core").$strip>;
1438
+ metadata: {
1439
+ openapi: {
1440
+ summary: string;
1441
+ description: string;
1442
+ responses: {
1443
+ 200: {
1444
+ description: string;
1445
+ content: {
1446
+ "application/json": {
1447
+ schema: {
1448
+ type: "object";
1449
+ properties: {
1450
+ totpURI: {
1451
+ type: string;
1452
+ };
1453
+ };
1454
+ };
1455
+ };
1456
+ };
1457
+ };
1458
+ };
1459
+ };
1460
+ };
1461
+ }, {
1462
+ totpURI: string;
1463
+ }>;
1464
+ verifyTOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-totp", {
1465
+ method: "POST";
1466
+ body: import("better-auth").ZodObject<{
1467
+ code: import("better-auth").ZodString;
1468
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1469
+ }, import("zod/v4/core").$strip>;
1470
+ metadata: {
1471
+ openapi: {
1472
+ summary: string;
1473
+ description: string;
1474
+ responses: {
1475
+ 200: {
1476
+ description: string;
1477
+ content: {
1478
+ "application/json": {
1479
+ schema: {
1480
+ type: "object";
1481
+ properties: {
1482
+ status: {
1483
+ type: string;
1484
+ };
1485
+ };
1486
+ };
1487
+ };
1488
+ };
1489
+ };
1490
+ };
1491
+ };
1492
+ };
1493
+ }, {
1494
+ token: string;
1495
+ user: import("better-auth/plugins").UserWithTwoFactor;
1496
+ } | {
1497
+ token: string;
1498
+ user: Record<string, any> & {
1499
+ id: string;
1500
+ createdAt: Date;
1501
+ updatedAt: Date;
1502
+ email: string;
1503
+ emailVerified: boolean;
1504
+ name: string;
1505
+ image?: string | null | undefined;
1506
+ };
1507
+ }>;
1508
+ };
1509
+ options: NoInfer<{
1510
+ issuer: string;
1511
+ }>;
1512
+ hooks: {
1513
+ after: {
1514
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1515
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1516
+ twoFactorRedirect: boolean;
1517
+ twoFactorMethods: string[];
1518
+ } | undefined>;
1519
+ }[];
1520
+ };
1521
+ schema: {
1522
+ user: {
1523
+ fields: {
1524
+ twoFactorEnabled: {
1525
+ type: "boolean";
1526
+ required: false;
1527
+ defaultValue: false;
1528
+ input: false;
1529
+ };
1530
+ };
1531
+ };
1532
+ twoFactor: {
1533
+ fields: {
1534
+ secret: {
1535
+ type: "string";
1536
+ required: true;
1537
+ returned: false;
1538
+ index: true;
1539
+ };
1540
+ backupCodes: {
1541
+ type: "string";
1542
+ required: true;
1543
+ returned: false;
1544
+ };
1545
+ userId: {
1546
+ type: "string";
1547
+ required: true;
1548
+ returned: false;
1549
+ references: {
1550
+ model: string;
1551
+ field: string;
1552
+ };
1553
+ index: true;
1554
+ };
1555
+ verified: {
1556
+ type: "boolean";
1557
+ required: false;
1558
+ defaultValue: true;
1559
+ input: false;
1560
+ };
1561
+ failedVerificationCount: {
1562
+ type: "number";
1563
+ required: false;
1564
+ defaultValue: number;
1565
+ input: false;
1566
+ returned: false;
1567
+ };
1568
+ lockedUntil: {
1569
+ type: "date";
1570
+ required: false;
1571
+ input: false;
1572
+ returned: false;
1573
+ };
1574
+ };
1575
+ };
1576
+ };
1577
+ rateLimit: {
1578
+ pathMatcher(path: string): boolean;
1579
+ window: number;
1580
+ max: number;
1581
+ }[];
1582
+ $ERROR_CODES: {
1583
+ OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
1584
+ OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
1585
+ TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
1586
+ TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
1587
+ BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
1588
+ INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
1589
+ INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
1590
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
1591
+ ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
1592
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
1593
+ };
1594
+ }, {
1595
+ id: "jwt";
1596
+ version: string;
1597
+ options: NoInfer<{
1598
+ disableSettingJwtHeader: true;
1599
+ jwks: {
1600
+ keyPairConfig: {
1601
+ alg: "RS256";
1602
+ };
1603
+ };
1604
+ jwt: {
1605
+ issuer: string;
1606
+ };
1607
+ }>;
1608
+ endpoints: {
1609
+ getJwks: import("better-auth").StrictEndpoint<string, {
1610
+ method: "GET";
1611
+ metadata: {
1612
+ openapi: {
1613
+ operationId: string;
1614
+ description: string;
1615
+ responses: {
1616
+ "200": {
1617
+ description: string;
1618
+ content: {
1619
+ "application/json": {
1620
+ schema: {
1621
+ type: "object";
1622
+ properties: {
1623
+ keys: {
1624
+ type: string;
1625
+ description: string;
1626
+ items: {
1627
+ type: string;
1628
+ properties: {
1629
+ kid: {
1630
+ type: string;
1631
+ description: string;
1632
+ };
1633
+ kty: {
1634
+ type: string;
1635
+ description: string;
1636
+ };
1637
+ alg: {
1638
+ type: string;
1639
+ description: string;
1640
+ };
1641
+ use: {
1642
+ type: string;
1643
+ description: string;
1644
+ enum: string[];
1645
+ nullable: boolean;
1646
+ };
1647
+ n: {
1648
+ type: string;
1649
+ description: string;
1650
+ nullable: boolean;
1651
+ };
1652
+ e: {
1653
+ type: string;
1654
+ description: string;
1655
+ nullable: boolean;
1656
+ };
1657
+ crv: {
1658
+ type: string;
1659
+ description: string;
1660
+ nullable: boolean;
1661
+ };
1662
+ x: {
1663
+ type: string;
1664
+ description: string;
1665
+ nullable: boolean;
1666
+ };
1667
+ y: {
1668
+ type: string;
1669
+ description: string;
1670
+ nullable: boolean;
1671
+ };
1672
+ };
1673
+ required: string[];
1674
+ };
1675
+ };
1676
+ };
1677
+ required: string[];
1678
+ };
1679
+ };
1680
+ };
1681
+ };
1682
+ };
1683
+ };
1684
+ };
1685
+ }, import("better-auth").JSONWebKeySet>;
1686
+ getToken: import("better-auth").StrictEndpoint<"/token", {
1687
+ method: "GET";
1688
+ requireHeaders: true;
1689
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1690
+ session: {
1691
+ session: Record<string, any> & {
1692
+ id: string;
1693
+ createdAt: Date;
1694
+ updatedAt: Date;
1695
+ userId: string;
1696
+ expiresAt: Date;
1697
+ token: string;
1698
+ ipAddress?: string | null | undefined;
1699
+ userAgent?: string | null | undefined;
1700
+ };
1701
+ user: Record<string, any> & {
1702
+ id: string;
1703
+ createdAt: Date;
1704
+ updatedAt: Date;
1705
+ email: string;
1706
+ emailVerified: boolean;
1707
+ name: string;
1708
+ image?: string | null | undefined;
1709
+ };
1710
+ };
1711
+ }>)[];
1712
+ metadata: {
1713
+ openapi: {
1714
+ operationId: string;
1715
+ description: string;
1716
+ responses: {
1717
+ 200: {
1718
+ description: string;
1719
+ content: {
1720
+ "application/json": {
1721
+ schema: {
1722
+ type: "object";
1723
+ properties: {
1724
+ token: {
1725
+ type: string;
1726
+ };
1727
+ };
1728
+ };
1729
+ };
1730
+ };
1731
+ };
1732
+ };
1733
+ };
1734
+ };
1735
+ }, {
1736
+ token: string;
1737
+ }>;
1738
+ signJWT: import("better-auth").StrictEndpoint<string, {
1739
+ method: "POST";
1740
+ metadata: {
1741
+ $Infer: {
1742
+ body: {
1743
+ payload: import("better-auth").JWTPayload;
1744
+ overrideOptions?: import("better-auth/plugins").JwtOptions | undefined;
1745
+ };
1746
+ };
1747
+ };
1748
+ body: import("better-auth").ZodObject<{
1749
+ payload: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>;
1750
+ overrideOptions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
1751
+ }, import("zod/v4/core").$strip>;
1752
+ }, {
1753
+ token: string;
1754
+ }>;
1755
+ verifyJWT: import("better-auth").StrictEndpoint<string, {
1756
+ method: "POST";
1757
+ metadata: {
1758
+ $Infer: {
1759
+ body: {
1760
+ token: string;
1761
+ issuer?: string;
1762
+ };
1763
+ response: {
1764
+ payload: {
1765
+ sub: string;
1766
+ aud: string;
1767
+ [key: string]: any;
1768
+ } | null;
1769
+ };
1770
+ };
1771
+ };
1772
+ body: import("better-auth").ZodObject<{
1773
+ token: import("better-auth").ZodString;
1774
+ issuer: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1775
+ }, import("zod/v4/core").$strip>;
1776
+ }, {
1777
+ payload: (import("better-auth").JWTPayload & Required<Pick<import("better-auth").JWTPayload, "sub" | "aud">>) | null;
1778
+ }>;
1779
+ };
1780
+ hooks: {
1781
+ after: {
1782
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1783
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
1784
+ }[];
1785
+ };
1786
+ schema: {
1787
+ jwks: {
1788
+ fields: {
1789
+ publicKey: {
1790
+ type: "string";
1791
+ required: true;
1792
+ };
1793
+ privateKey: {
1794
+ type: "string";
1795
+ required: true;
1796
+ };
1797
+ createdAt: {
1798
+ type: "date";
1799
+ required: true;
1800
+ };
1801
+ expiresAt: {
1802
+ type: "date";
1803
+ required: false;
1804
+ };
1805
+ };
1806
+ };
1807
+ };
1808
+ }, {
1809
+ id: "oauth-provider";
1810
+ version: string;
1811
+ options: NoInfer<{
1812
+ loginPage: string;
1813
+ consentPage: string;
1814
+ scopes: string[];
1815
+ validAudiences: string[];
1816
+ grantTypes: ("refresh_token" | "authorization_code")[];
1817
+ allowDynamicClientRegistration: boolean;
1818
+ allowUnauthenticatedClientRegistration: boolean;
1819
+ clientRegistrationDefaultScopes: string[];
1820
+ clientRegistrationAllowedScopes: string[];
1821
+ accessTokenExpiresIn: number;
1822
+ refreshTokenExpiresIn: number;
1823
+ customAccessTokenClaims: ({ user }: {
1824
+ user?: ({
1825
+ id: string;
1826
+ createdAt: Date;
1827
+ updatedAt: Date;
1828
+ email: string;
1829
+ emailVerified: boolean;
1830
+ name: string;
1831
+ image?: string | null | undefined;
1832
+ } & Record<string, unknown>) | null;
1833
+ referenceId?: string;
1834
+ scopes: import("@better-auth/oauth-provider").Scope[];
1835
+ resource?: string;
1836
+ metadata?: Record<string, any>;
1837
+ }) => Promise<{
1838
+ email: string;
1839
+ }>;
1840
+ postLogin: {
1841
+ page: string;
1842
+ shouldRedirect: () => false;
1843
+ consentReferenceId: () => Promise<undefined>;
1844
+ };
1845
+ silenceWarnings: {
1846
+ oauthAuthServerConfig: true;
1847
+ openidConfig: true;
1848
+ };
1849
+ }>;
1850
+ init: (ctx: import("better-auth").AuthContext) => void;
1851
+ onRequest: (request: Request, ctx: import("better-auth").AuthContext) => Promise<{
1852
+ response: Response;
1853
+ } | {
1854
+ request: Request;
1855
+ } | void>;
1856
+ hooks: {
1857
+ before: {
1858
+ matcher(ctx: import("better-auth").HookEndpointContext): any;
1859
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
1860
+ }[];
1861
+ after: {
1862
+ matcher(ctx: import("better-auth").HookEndpointContext): boolean;
1863
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1864
+ redirect: boolean;
1865
+ url: string;
1866
+ } | undefined>;
1867
+ }[];
1868
+ };
1869
+ endpoints: {
1870
+ getOAuthServerConfig: import("better-call").StrictEndpoint<"/.well-known/oauth-authorization-server", {
1871
+ method: "GET";
1872
+ metadata: {
1873
+ SERVER_ONLY: true;
1874
+ };
1875
+ }, import("@better-auth/oauth-provider").AuthServerMetadata>;
1876
+ getOpenIdConfig: import("better-call").StrictEndpoint<"/.well-known/openid-configuration", {
1877
+ method: "GET";
1878
+ metadata: {
1879
+ SERVER_ONLY: true;
1880
+ };
1881
+ }, Omit<import("@better-auth/oauth-provider").OIDCMetadata, "id_token_signing_alg_values_supported"> & {
1882
+ id_token_signing_alg_values_supported: import("better-auth/plugins").JWSAlgorithms[] | ["HS256"];
1883
+ }>;
1884
+ oauth2Authorize: import("better-call").StrictEndpoint<"/oauth2/authorize", {
1885
+ method: "GET";
1886
+ query: import("better-auth").ZodObject<{
1887
+ response_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1888
+ code: "code";
1889
+ }>>;
1890
+ client_id: import("better-auth").ZodString;
1891
+ redirect_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
1892
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1893
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1894
+ request_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1895
+ code_challenge: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1896
+ code_challenge_method: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1897
+ S256: "S256";
1898
+ }>>;
1899
+ nonce: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1900
+ prompt: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1901
+ none: "none";
1902
+ consent: "consent";
1903
+ login: "login";
1904
+ create: "create";
1905
+ select_account: "select_account";
1906
+ "login consent": "login consent";
1907
+ "select_account consent": "select_account consent";
1908
+ }>>;
1909
+ }, import("zod/v4/core").$strip>;
1910
+ metadata: {
1911
+ openapi: {
1912
+ description: string;
1913
+ parameters: ({
1914
+ name: string;
1915
+ in: "query";
1916
+ required: false;
1917
+ schema: {
1918
+ type: "string";
1919
+ format?: undefined;
1920
+ };
1921
+ description: string;
1922
+ } | {
1923
+ name: string;
1924
+ in: "query";
1925
+ required: true;
1926
+ schema: {
1927
+ type: "string";
1928
+ format?: undefined;
1929
+ };
1930
+ description: string;
1931
+ } | {
1932
+ name: string;
1933
+ in: "query";
1934
+ required: false;
1935
+ schema: {
1936
+ type: "string";
1937
+ format: string;
1938
+ };
1939
+ description: string;
1940
+ })[];
1941
+ responses: {
1942
+ "302": {
1943
+ description: string;
1944
+ headers: {
1945
+ Location: {
1946
+ description: string;
1947
+ schema: {
1948
+ type: string;
1949
+ format: string;
1950
+ };
1951
+ };
1952
+ };
1953
+ };
1954
+ "400": {
1955
+ description: string;
1956
+ content: {
1957
+ "application/json": {
1958
+ schema: {
1959
+ type: "object";
1960
+ properties: {
1961
+ error: {
1962
+ type: string;
1963
+ };
1964
+ error_description: {
1965
+ type: string;
1966
+ };
1967
+ state: {
1968
+ type: string;
1969
+ };
1970
+ };
1971
+ required: string[];
1972
+ };
1973
+ };
1974
+ };
1975
+ };
1976
+ };
1977
+ };
1978
+ };
1979
+ }, {
1980
+ redirect: boolean;
1981
+ url: string;
1982
+ }>;
1983
+ oauth2Consent: import("better-call").StrictEndpoint<"/oauth2/consent", {
1984
+ method: "POST";
1985
+ body: import("better-auth").ZodObject<{
1986
+ accept: import("better-auth").ZodBoolean;
1987
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1988
+ oauth_query: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1989
+ }, import("zod/v4/core").$strip>;
1990
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1991
+ session: {
1992
+ session: Record<string, any> & {
1993
+ id: string;
1994
+ createdAt: Date;
1995
+ updatedAt: Date;
1996
+ userId: string;
1997
+ expiresAt: Date;
1998
+ token: string;
1999
+ ipAddress?: string | null | undefined;
2000
+ userAgent?: string | null | undefined;
2001
+ };
2002
+ user: Record<string, any> & {
2003
+ id: string;
2004
+ createdAt: Date;
2005
+ updatedAt: Date;
2006
+ email: string;
2007
+ emailVerified: boolean;
2008
+ name: string;
2009
+ image?: string | null | undefined;
2010
+ };
2011
+ };
2012
+ }>)[];
2013
+ metadata: {
2014
+ openapi: {
2015
+ description: string;
2016
+ responses: {
2017
+ "200": {
2018
+ description: string;
2019
+ content: {
2020
+ "application/json": {
2021
+ schema: {
2022
+ type: "object";
2023
+ properties: {
2024
+ redirect_uri: {
2025
+ type: string;
2026
+ format: string;
2027
+ description: string;
2028
+ };
2029
+ };
2030
+ required: string[];
2031
+ };
2032
+ };
2033
+ };
2034
+ };
2035
+ };
2036
+ };
2037
+ };
2038
+ }, {
2039
+ redirect: boolean;
2040
+ url: string;
2041
+ } | {
2042
+ redirect: boolean;
2043
+ url: string;
2044
+ }>;
2045
+ oauth2Continue: import("better-call").StrictEndpoint<"/oauth2/continue", {
2046
+ method: "POST";
2047
+ body: import("better-auth").ZodObject<{
2048
+ selected: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2049
+ created: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2050
+ postLogin: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2051
+ oauth_query: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2052
+ }, import("zod/v4/core").$strip>;
2053
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2054
+ session: {
2055
+ session: Record<string, any> & {
2056
+ id: string;
2057
+ createdAt: Date;
2058
+ updatedAt: Date;
2059
+ userId: string;
2060
+ expiresAt: Date;
2061
+ token: string;
2062
+ ipAddress?: string | null | undefined;
2063
+ userAgent?: string | null | undefined;
2064
+ };
2065
+ user: Record<string, any> & {
2066
+ id: string;
2067
+ createdAt: Date;
2068
+ updatedAt: Date;
2069
+ email: string;
2070
+ emailVerified: boolean;
2071
+ name: string;
2072
+ image?: string | null | undefined;
2073
+ };
2074
+ };
2075
+ }>)[];
2076
+ metadata: {
2077
+ openapi: {
2078
+ description: string;
2079
+ responses: {
2080
+ "200": {
2081
+ description: string;
2082
+ content: {
2083
+ "application/json": {
2084
+ schema: {
2085
+ type: "object";
2086
+ properties: {
2087
+ redirect_uri: {
2088
+ type: string;
2089
+ format: string;
2090
+ description: string;
2091
+ };
2092
+ };
2093
+ required: string[];
2094
+ };
2095
+ };
2096
+ };
2097
+ };
2098
+ };
2099
+ };
2100
+ };
2101
+ }, {
2102
+ redirect: boolean;
2103
+ url: string;
2104
+ }>;
2105
+ oauth2Token: import("better-call").StrictEndpoint<"/oauth2/token", {
2106
+ method: "POST";
2107
+ body: import("better-auth").ZodObject<{
2108
+ grant_type: import("better-auth").ZodEnum<{
2109
+ authorization_code: "authorization_code";
2110
+ client_credentials: "client_credentials";
2111
+ refresh_token: "refresh_token";
2112
+ }>;
2113
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2114
+ client_secret: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2115
+ code: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2116
+ code_verifier: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2117
+ redirect_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
2118
+ refresh_token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2119
+ resource: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2120
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2121
+ }, import("zod/v4/core").$strip>;
2122
+ metadata: {
2123
+ allowedMediaTypes: string[];
2124
+ openapi: {
2125
+ description: string;
2126
+ requestBody: {
2127
+ required: boolean;
2128
+ content: {
2129
+ "application/json": {
2130
+ schema: {
2131
+ type: "object";
2132
+ properties: {
2133
+ grant_type: {
2134
+ type: string;
2135
+ enum: string[];
2136
+ description: string;
2137
+ };
2138
+ client_id: {
2139
+ type: string;
2140
+ description: string;
2141
+ };
2142
+ client_secret: {
2143
+ type: string;
2144
+ description: string;
2145
+ };
2146
+ code: {
2147
+ type: string;
2148
+ description: string;
2149
+ };
2150
+ code_verifier: {
2151
+ type: string;
2152
+ description: string;
2153
+ };
2154
+ redirect_uri: {
2155
+ type: string;
2156
+ format: string;
2157
+ description: string;
2158
+ };
2159
+ refresh_token: {
2160
+ type: string;
2161
+ description: string;
2162
+ };
2163
+ resource: {
2164
+ type: string;
2165
+ description: string;
2166
+ };
2167
+ scope: {
2168
+ type: string;
2169
+ description: string;
2170
+ };
2171
+ };
2172
+ required: string[];
2173
+ };
2174
+ };
2175
+ };
2176
+ };
2177
+ responses: {
2178
+ "200": {
2179
+ description: string;
2180
+ content: {
2181
+ "application/json": {
2182
+ schema: {
2183
+ type: "object";
2184
+ properties: {
2185
+ access_token: {
2186
+ type: string;
2187
+ description: string;
2188
+ };
2189
+ token_type: {
2190
+ type: string;
2191
+ description: string;
2192
+ enum: string[];
2193
+ };
2194
+ expires_in: {
2195
+ type: string;
2196
+ description: string;
2197
+ };
2198
+ refresh_token: {
2199
+ type: string;
2200
+ description: string;
2201
+ };
2202
+ scope: {
2203
+ type: string;
2204
+ description: string;
2205
+ };
2206
+ id_token: {
2207
+ type: string;
2208
+ description: string;
2209
+ };
2210
+ };
2211
+ required: string[];
2212
+ };
2213
+ };
2214
+ };
2215
+ };
2216
+ "400": {
2217
+ description: string;
2218
+ content: {
2219
+ "application/json": {
2220
+ schema: {
2221
+ type: "object";
2222
+ properties: {
2223
+ error: {
2224
+ type: string;
2225
+ };
2226
+ error_description: {
2227
+ type: string;
2228
+ };
2229
+ error_uri: {
2230
+ type: string;
2231
+ };
2232
+ };
2233
+ required: string[];
2234
+ };
2235
+ };
2236
+ };
2237
+ };
2238
+ };
2239
+ };
2240
+ };
2241
+ }, {
2242
+ access_token: string;
2243
+ expires_in: number;
2244
+ expires_at: number;
2245
+ token_type: "Bearer";
2246
+ refresh_token: string | undefined;
2247
+ scope: string;
2248
+ id_token: string | undefined;
2249
+ }>;
2250
+ oauth2Introspect: import("better-call").StrictEndpoint<"/oauth2/introspect", {
2251
+ method: "POST";
2252
+ body: import("better-auth").ZodObject<{
2253
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2254
+ client_secret: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2255
+ token: import("better-auth").ZodString;
2256
+ token_type_hint: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2257
+ refresh_token: "refresh_token";
2258
+ access_token: "access_token";
2259
+ }>>;
2260
+ }, import("zod/v4/core").$strip>;
2261
+ metadata: {
2262
+ allowedMediaTypes: string[];
2263
+ openapi: {
2264
+ description: string;
2265
+ requestBody: {
2266
+ required: boolean;
2267
+ content: {
2268
+ "application/json": {
2269
+ schema: {
2270
+ type: "object";
2271
+ properties: {
2272
+ client_id: {
2273
+ type: string;
2274
+ description: string;
2275
+ };
2276
+ client_secret: {
2277
+ type: string;
2278
+ description: string;
2279
+ };
2280
+ token: {
2281
+ type: string;
2282
+ description: string;
2283
+ };
2284
+ token_type_hint: {
2285
+ type: string;
2286
+ enum: string[];
2287
+ description: string;
2288
+ };
2289
+ resource: {
2290
+ type: string;
2291
+ description: string;
2292
+ };
2293
+ };
2294
+ required: string[];
2295
+ };
2296
+ };
2297
+ };
2298
+ };
2299
+ responses: {
2300
+ "200": {
2301
+ description: string;
2302
+ content: {
2303
+ "application/json": {
2304
+ schema: {
2305
+ type: "object";
2306
+ properties: {
2307
+ active: {
2308
+ type: string;
2309
+ description: string;
2310
+ };
2311
+ scope: {
2312
+ type: string;
2313
+ description: string;
2314
+ };
2315
+ client_id: {
2316
+ type: string;
2317
+ description: string;
2318
+ };
2319
+ username: {
2320
+ type: string;
2321
+ description: string;
2322
+ };
2323
+ token_type: {
2324
+ type: string;
2325
+ description: string;
2326
+ };
2327
+ exp: {
2328
+ type: string;
2329
+ description: string;
2330
+ };
2331
+ iat: {
2332
+ type: string;
2333
+ description: string;
2334
+ };
2335
+ nbf: {
2336
+ type: string;
2337
+ description: string;
2338
+ };
2339
+ sub: {
2340
+ type: string;
2341
+ description: string;
2342
+ };
2343
+ aud: {
2344
+ type: string;
2345
+ description: string;
2346
+ };
2347
+ iss: {
2348
+ type: string;
2349
+ description: string;
2350
+ };
2351
+ jti: {
2352
+ type: string;
2353
+ description: string;
2354
+ };
2355
+ };
2356
+ required: string[];
2357
+ };
2358
+ };
2359
+ };
2360
+ };
2361
+ "400": {
2362
+ description: string;
2363
+ content: {
2364
+ "application/json": {
2365
+ schema: {
2366
+ type: "object";
2367
+ properties: {
2368
+ error: {
2369
+ type: string;
2370
+ };
2371
+ error_description: {
2372
+ type: string;
2373
+ };
2374
+ error_uri: {
2375
+ type: string;
2376
+ };
2377
+ };
2378
+ required: string[];
2379
+ };
2380
+ };
2381
+ };
2382
+ };
2383
+ };
2384
+ };
2385
+ };
2386
+ }, import("better-auth").JWTPayload>;
2387
+ oauth2Revoke: import("better-call").StrictEndpoint<"/oauth2/revoke", {
2388
+ method: "POST";
2389
+ body: import("better-auth").ZodObject<{
2390
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2391
+ client_secret: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2392
+ token: import("better-auth").ZodString;
2393
+ token_type_hint: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2394
+ refresh_token: "refresh_token";
2395
+ access_token: "access_token";
2396
+ }>>;
2397
+ }, import("zod/v4/core").$strip>;
2398
+ metadata: {
2399
+ allowedMediaTypes: string[];
2400
+ openapi: {
2401
+ description: string;
2402
+ requestBody: {
2403
+ required: boolean;
2404
+ content: {
2405
+ "application/json": {
2406
+ schema: {
2407
+ type: "object";
2408
+ properties: {
2409
+ client_id: {
2410
+ type: string;
2411
+ description: string;
2412
+ };
2413
+ client_secret: {
2414
+ type: string;
2415
+ description: string;
2416
+ };
2417
+ token: {
2418
+ type: string;
2419
+ description: string;
2420
+ };
2421
+ token_type_hint: {
2422
+ type: string;
2423
+ enum: string[];
2424
+ description: string;
2425
+ };
2426
+ };
2427
+ required: string[];
2428
+ };
2429
+ };
2430
+ };
2431
+ };
2432
+ responses: {
2433
+ "200": {
2434
+ description: string;
2435
+ content: {
2436
+ "application/json": {
2437
+ schema: {
2438
+ type: "object";
2439
+ description: string;
2440
+ };
2441
+ };
2442
+ };
2443
+ };
2444
+ "400": {
2445
+ description: string;
2446
+ content: {
2447
+ "application/json": {
2448
+ schema: {
2449
+ type: "object";
2450
+ properties: {
2451
+ error: {
2452
+ type: string;
2453
+ };
2454
+ error_description: {
2455
+ type: string;
2456
+ };
2457
+ error_uri: {
2458
+ type: string;
2459
+ };
2460
+ };
2461
+ required: string[];
2462
+ };
2463
+ };
2464
+ };
2465
+ };
2466
+ };
2467
+ };
2468
+ };
2469
+ }, null | undefined>;
2470
+ oauth2UserInfo: import("better-call").StrictEndpoint<"/oauth2/userinfo", {
2471
+ method: ("GET" | "POST")[];
2472
+ metadata: {
2473
+ openapi: {
2474
+ description: string;
2475
+ security: ({
2476
+ bearerAuth: never[];
2477
+ OAuth2?: undefined;
2478
+ } | {
2479
+ OAuth2: string[];
2480
+ bearerAuth?: undefined;
2481
+ })[];
2482
+ parameters: {
2483
+ name: string;
2484
+ in: "header";
2485
+ required: false;
2486
+ schema: {
2487
+ type: "string";
2488
+ };
2489
+ description: string;
2490
+ }[];
2491
+ responses: {
2492
+ "200": {
2493
+ description: string;
2494
+ content: {
2495
+ "application/json": {
2496
+ schema: {
2497
+ type: "object";
2498
+ properties: {
2499
+ sub: {
2500
+ type: string;
2501
+ description: string;
2502
+ };
2503
+ email: {
2504
+ type: string;
2505
+ format: string;
2506
+ nullable: boolean;
2507
+ description: string;
2508
+ };
2509
+ name: {
2510
+ type: string;
2511
+ nullable: boolean;
2512
+ description: string;
2513
+ };
2514
+ picture: {
2515
+ type: string;
2516
+ format: string;
2517
+ nullable: boolean;
2518
+ description: string;
2519
+ };
2520
+ given_name: {
2521
+ type: string;
2522
+ nullable: boolean;
2523
+ description: string;
2524
+ };
2525
+ family_name: {
2526
+ type: string;
2527
+ nullable: boolean;
2528
+ description: string;
2529
+ };
2530
+ email_verified: {
2531
+ type: string;
2532
+ nullable: boolean;
2533
+ description: string;
2534
+ };
2535
+ };
2536
+ required: string[];
2537
+ };
2538
+ };
2539
+ };
2540
+ };
2541
+ "401": {
2542
+ description: string;
2543
+ content: {
2544
+ "application/json": {
2545
+ schema: {
2546
+ type: "object";
2547
+ properties: {
2548
+ error: {
2549
+ type: string;
2550
+ };
2551
+ error_description: {
2552
+ type: string;
2553
+ };
2554
+ };
2555
+ required: string[];
2556
+ };
2557
+ };
2558
+ };
2559
+ };
2560
+ "403": {
2561
+ description: string;
2562
+ content: {
2563
+ "application/json": {
2564
+ schema: {
2565
+ type: "object";
2566
+ properties: {
2567
+ error: {
2568
+ type: string;
2569
+ };
2570
+ error_description: {
2571
+ type: string;
2572
+ };
2573
+ };
2574
+ required: string[];
2575
+ };
2576
+ };
2577
+ };
2578
+ };
2579
+ };
2580
+ };
2581
+ };
2582
+ }, {
2583
+ email?: string | undefined;
2584
+ email_verified?: boolean | undefined;
2585
+ name?: string | undefined;
2586
+ picture?: string | undefined;
2587
+ given_name?: string | undefined;
2588
+ family_name?: string | undefined;
2589
+ sub: string;
2590
+ }>;
2591
+ oauth2EndSession: import("better-call").StrictEndpoint<"/oauth2/end-session", {
2592
+ method: "GET";
2593
+ query: import("better-auth").ZodObject<{
2594
+ id_token_hint: import("better-auth").ZodString;
2595
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2596
+ post_logout_redirect_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
2597
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2598
+ }, import("zod/v4/core").$strip>;
2599
+ metadata: {
2600
+ openapi: {
2601
+ description: string;
2602
+ responses: {
2603
+ "200": {
2604
+ description: string;
2605
+ content: {
2606
+ "application/json": {
2607
+ schema: {
2608
+ type: "object";
2609
+ properties: {
2610
+ redirect_uri: {
2611
+ type: string;
2612
+ format: string;
2613
+ description: string;
2614
+ };
2615
+ message: {
2616
+ type: string;
2617
+ description: string;
2618
+ };
2619
+ };
2620
+ };
2621
+ };
2622
+ };
2623
+ };
2624
+ };
2625
+ };
2626
+ };
2627
+ }, {
2628
+ redirect: boolean;
2629
+ url: string;
2630
+ } | undefined>;
2631
+ registerOAuthClient: import("better-call").StrictEndpoint<"/oauth2/register", {
2632
+ method: "POST";
2633
+ body: import("better-auth").ZodObject<{
2634
+ redirect_uris: import("better-auth").ZodArray<import("better-auth").ZodURL>;
2635
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2636
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2637
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2638
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2639
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
2640
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2641
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2642
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2643
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2644
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2645
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
2646
+ token_endpoint_auth_method: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodEnum<{
2647
+ none: "none";
2648
+ client_secret_basic: "client_secret_basic";
2649
+ client_secret_post: "client_secret_post";
2650
+ }>>>;
2651
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
2652
+ authorization_code: "authorization_code";
2653
+ client_credentials: "client_credentials";
2654
+ refresh_token: "refresh_token";
2655
+ }>>>>;
2656
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
2657
+ code: "code";
2658
+ }>>>>;
2659
+ type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2660
+ web: "web";
2661
+ native: "native";
2662
+ "user-agent-based": "user-agent-based";
2663
+ }>>;
2664
+ subject_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2665
+ public: "public";
2666
+ pairwise: "pairwise";
2667
+ }>>;
2668
+ skip_consent: import("better-auth").ZodOptional<import("better-auth").ZodNever>;
2669
+ }, import("zod/v4/core").$strip>;
2670
+ metadata: {
2671
+ openapi: {
2672
+ description: string;
2673
+ responses: {
2674
+ "200": {
2675
+ description: string;
2676
+ content: {
2677
+ "application/json": {
2678
+ schema: {
2679
+ type: "object";
2680
+ properties: {
2681
+ client_id: {
2682
+ type: string;
2683
+ description: string;
2684
+ };
2685
+ client_secret: {
2686
+ type: string;
2687
+ description: string;
2688
+ };
2689
+ client_secret_expires_at: {
2690
+ type: string;
2691
+ description: string;
2692
+ };
2693
+ scope: {
2694
+ type: string;
2695
+ description: string;
2696
+ };
2697
+ user_id: {
2698
+ type: string;
2699
+ description: string;
2700
+ };
2701
+ client_id_issued_at: {
2702
+ type: string;
2703
+ description: string;
2704
+ };
2705
+ client_name: {
2706
+ type: string;
2707
+ description: string;
2708
+ };
2709
+ client_uri: {
2710
+ type: string;
2711
+ description: string;
2712
+ };
2713
+ logo_uri: {
2714
+ type: string;
2715
+ description: string;
2716
+ };
2717
+ contacts: {
2718
+ type: string;
2719
+ items: {
2720
+ type: string;
2721
+ };
2722
+ description: string;
2723
+ };
2724
+ tos_uri: {
2725
+ type: string;
2726
+ description: string;
2727
+ };
2728
+ policy_uri: {
2729
+ type: string;
2730
+ description: string;
2731
+ };
2732
+ software_id: {
2733
+ type: string;
2734
+ description: string;
2735
+ };
2736
+ software_version: {
2737
+ type: string;
2738
+ description: string;
2739
+ };
2740
+ software_statement: {
2741
+ type: string;
2742
+ description: string;
2743
+ };
2744
+ redirect_uris: {
2745
+ type: string;
2746
+ items: {
2747
+ type: string;
2748
+ format: string;
2749
+ };
2750
+ description: string;
2751
+ };
2752
+ post_logout_redirect_uris: {
2753
+ type: string;
2754
+ items: {
2755
+ type: string;
2756
+ format: string;
2757
+ };
2758
+ description: string;
2759
+ };
2760
+ token_endpoint_auth_method: {
2761
+ type: string;
2762
+ description: string;
2763
+ enum: string[];
2764
+ };
2765
+ grant_types: {
2766
+ type: string;
2767
+ items: {
2768
+ type: string;
2769
+ enum: string[];
2770
+ };
2771
+ description: string;
2772
+ };
2773
+ response_types: {
2774
+ type: string;
2775
+ items: {
2776
+ type: string;
2777
+ enum: string[];
2778
+ };
2779
+ description: string;
2780
+ };
2781
+ public: {
2782
+ type: string;
2783
+ description: string;
2784
+ };
2785
+ type: {
2786
+ type: string;
2787
+ description: string;
2788
+ enum: string[];
2789
+ };
2790
+ disabled: {
2791
+ type: string;
2792
+ description: string;
2793
+ };
2794
+ };
2795
+ required: string[];
2796
+ };
2797
+ };
2798
+ };
2799
+ };
2800
+ };
2801
+ };
2802
+ };
2803
+ }, import("@better-auth/oauth-provider").OAuthClient>;
2804
+ adminCreateOAuthClient: import("better-call").StrictEndpoint<"/admin/oauth2/create-client", {
2805
+ method: "POST";
2806
+ body: import("better-auth").ZodObject<{
2807
+ redirect_uris: import("better-auth").ZodArray<import("better-auth").ZodURL>;
2808
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2809
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2810
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2811
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2812
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
2813
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2814
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2815
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2816
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2817
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2818
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
2819
+ token_endpoint_auth_method: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodEnum<{
2820
+ none: "none";
2821
+ client_secret_basic: "client_secret_basic";
2822
+ client_secret_post: "client_secret_post";
2823
+ }>>>;
2824
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
2825
+ authorization_code: "authorization_code";
2826
+ client_credentials: "client_credentials";
2827
+ refresh_token: "refresh_token";
2828
+ }>>>>;
2829
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
2830
+ code: "code";
2831
+ }>>>>;
2832
+ type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2833
+ web: "web";
2834
+ native: "native";
2835
+ "user-agent-based": "user-agent-based";
2836
+ }>>;
2837
+ client_secret_expires_at: import("better-auth").ZodDefault<import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [import("better-auth").ZodString, import("better-auth").ZodNumber]>>>;
2838
+ skip_consent: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2839
+ enable_end_session: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2840
+ require_pkce: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2841
+ subject_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2842
+ public: "public";
2843
+ pairwise: "pairwise";
2844
+ }>>;
2845
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
2846
+ }, import("zod/v4/core").$strip>;
2847
+ metadata: {
2848
+ SERVER_ONLY: true;
2849
+ openapi: {
2850
+ description: string;
2851
+ responses: {
2852
+ "200": {
2853
+ description: string;
2854
+ content: {
2855
+ "application/json": {
2856
+ schema: {
2857
+ type: "object";
2858
+ properties: {
2859
+ client_id: {
2860
+ type: string;
2861
+ description: string;
2862
+ };
2863
+ client_secret: {
2864
+ type: string;
2865
+ description: string;
2866
+ };
2867
+ client_secret_expires_at: {
2868
+ type: string;
2869
+ description: string;
2870
+ };
2871
+ scope: {
2872
+ type: string;
2873
+ description: string;
2874
+ };
2875
+ user_id: {
2876
+ type: string;
2877
+ description: string;
2878
+ };
2879
+ client_id_issued_at: {
2880
+ type: string;
2881
+ description: string;
2882
+ };
2883
+ client_name: {
2884
+ type: string;
2885
+ description: string;
2886
+ };
2887
+ client_uri: {
2888
+ type: string;
2889
+ description: string;
2890
+ };
2891
+ logo_uri: {
2892
+ type: string;
2893
+ description: string;
2894
+ };
2895
+ contacts: {
2896
+ type: string;
2897
+ items: {
2898
+ type: string;
2899
+ };
2900
+ description: string;
2901
+ };
2902
+ tos_uri: {
2903
+ type: string;
2904
+ description: string;
2905
+ };
2906
+ policy_uri: {
2907
+ type: string;
2908
+ description: string;
2909
+ };
2910
+ software_id: {
2911
+ type: string;
2912
+ description: string;
2913
+ };
2914
+ software_version: {
2915
+ type: string;
2916
+ description: string;
2917
+ };
2918
+ software_statement: {
2919
+ type: string;
2920
+ description: string;
2921
+ };
2922
+ redirect_uris: {
2923
+ type: string;
2924
+ items: {
2925
+ type: string;
2926
+ format: string;
2927
+ };
2928
+ description: string;
2929
+ };
2930
+ token_endpoint_auth_method: {
2931
+ type: string;
2932
+ description: string;
2933
+ enum: string[];
2934
+ };
2935
+ grant_types: {
2936
+ type: string;
2937
+ items: {
2938
+ type: string;
2939
+ enum: string[];
2940
+ };
2941
+ description: string;
2942
+ };
2943
+ response_types: {
2944
+ type: string;
2945
+ items: {
2946
+ type: string;
2947
+ enum: string[];
2948
+ };
2949
+ description: string;
2950
+ };
2951
+ public: {
2952
+ type: string;
2953
+ description: string;
2954
+ };
2955
+ type: {
2956
+ type: string;
2957
+ description: string;
2958
+ enum: string[];
2959
+ };
2960
+ disabled: {
2961
+ type: string;
2962
+ description: string;
2963
+ };
2964
+ require_pkce: {
2965
+ type: string;
2966
+ description: string;
2967
+ default: boolean;
2968
+ };
2969
+ metadata: {
2970
+ type: string;
2971
+ additionalProperties: boolean;
2972
+ nullable: boolean;
2973
+ description: string;
2974
+ };
2975
+ };
2976
+ required: string[];
2977
+ };
2978
+ };
2979
+ };
2980
+ };
2981
+ };
2982
+ };
2983
+ };
2984
+ }, import("@better-auth/oauth-provider").OAuthClient>;
2985
+ createOAuthClient: import("better-call").StrictEndpoint<"/oauth2/create-client", {
2986
+ method: "POST";
2987
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2988
+ session: {
2989
+ session: Record<string, any> & {
2990
+ id: string;
2991
+ createdAt: Date;
2992
+ updatedAt: Date;
2993
+ userId: string;
2994
+ expiresAt: Date;
2995
+ token: string;
2996
+ ipAddress?: string | null | undefined;
2997
+ userAgent?: string | null | undefined;
2998
+ };
2999
+ user: Record<string, any> & {
3000
+ id: string;
3001
+ createdAt: Date;
3002
+ updatedAt: Date;
3003
+ email: string;
3004
+ emailVerified: boolean;
3005
+ name: string;
3006
+ image?: string | null | undefined;
3007
+ };
3008
+ };
3009
+ }>)[];
3010
+ body: import("better-auth").ZodObject<{
3011
+ redirect_uris: import("better-auth").ZodArray<import("better-auth").ZodURL>;
3012
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3013
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3014
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3015
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3016
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3017
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3018
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3019
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3020
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3021
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3022
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3023
+ token_endpoint_auth_method: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodEnum<{
3024
+ none: "none";
3025
+ client_secret_basic: "client_secret_basic";
3026
+ client_secret_post: "client_secret_post";
3027
+ }>>>;
3028
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3029
+ authorization_code: "authorization_code";
3030
+ client_credentials: "client_credentials";
3031
+ refresh_token: "refresh_token";
3032
+ }>>>>;
3033
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3034
+ code: "code";
3035
+ }>>>>;
3036
+ type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3037
+ web: "web";
3038
+ native: "native";
3039
+ "user-agent-based": "user-agent-based";
3040
+ }>>;
3041
+ }, import("zod/v4/core").$strip>;
3042
+ metadata: {
3043
+ openapi: {
3044
+ description: string;
3045
+ responses: {
3046
+ "200": {
3047
+ description: string;
3048
+ content: {
3049
+ "application/json": {
3050
+ schema: {
3051
+ type: "object";
3052
+ properties: {
3053
+ client_id: {
3054
+ type: string;
3055
+ description: string;
3056
+ };
3057
+ client_secret: {
3058
+ type: string;
3059
+ description: string;
3060
+ };
3061
+ client_secret_expires_at: {
3062
+ type: string;
3063
+ description: string;
3064
+ };
3065
+ scope: {
3066
+ type: string;
3067
+ description: string;
3068
+ };
3069
+ user_id: {
3070
+ type: string;
3071
+ description: string;
3072
+ };
3073
+ client_id_issued_at: {
3074
+ type: string;
3075
+ description: string;
3076
+ };
3077
+ client_name: {
3078
+ type: string;
3079
+ description: string;
3080
+ };
3081
+ client_uri: {
3082
+ type: string;
3083
+ description: string;
3084
+ };
3085
+ logo_uri: {
3086
+ type: string;
3087
+ description: string;
3088
+ };
3089
+ contacts: {
3090
+ type: string;
3091
+ items: {
3092
+ type: string;
3093
+ };
3094
+ description: string;
3095
+ };
3096
+ tos_uri: {
3097
+ type: string;
3098
+ description: string;
3099
+ };
3100
+ policy_uri: {
3101
+ type: string;
3102
+ description: string;
3103
+ };
3104
+ software_id: {
3105
+ type: string;
3106
+ description: string;
3107
+ };
3108
+ software_version: {
3109
+ type: string;
3110
+ description: string;
3111
+ };
3112
+ software_statement: {
3113
+ type: string;
3114
+ description: string;
3115
+ };
3116
+ redirect_uris: {
3117
+ type: string;
3118
+ items: {
3119
+ type: string;
3120
+ format: string;
3121
+ };
3122
+ description: string;
3123
+ };
3124
+ token_endpoint_auth_method: {
3125
+ type: string;
3126
+ description: string;
3127
+ enum: string[];
3128
+ };
3129
+ grant_types: {
3130
+ type: string;
3131
+ items: {
3132
+ type: string;
3133
+ enum: string[];
3134
+ };
3135
+ description: string;
3136
+ };
3137
+ response_types: {
3138
+ type: string;
3139
+ items: {
3140
+ type: string;
3141
+ enum: string[];
3142
+ };
3143
+ description: string;
3144
+ };
3145
+ public: {
3146
+ type: string;
3147
+ description: string;
3148
+ };
3149
+ type: {
3150
+ type: string;
3151
+ description: string;
3152
+ enum: string[];
3153
+ };
3154
+ disabled: {
3155
+ type: string;
3156
+ description: string;
3157
+ };
3158
+ metadata: {
3159
+ type: string;
3160
+ additionalProperties: boolean;
3161
+ nullable: boolean;
3162
+ description: string;
3163
+ };
3164
+ };
3165
+ required: string[];
3166
+ };
3167
+ };
3168
+ };
3169
+ };
3170
+ };
3171
+ };
3172
+ };
3173
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3174
+ getOAuthClient: import("better-call").StrictEndpoint<"/oauth2/get-client", {
3175
+ method: "GET";
3176
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3177
+ session: {
3178
+ session: Record<string, any> & {
3179
+ id: string;
3180
+ createdAt: Date;
3181
+ updatedAt: Date;
3182
+ userId: string;
3183
+ expiresAt: Date;
3184
+ token: string;
3185
+ ipAddress?: string | null | undefined;
3186
+ userAgent?: string | null | undefined;
3187
+ };
3188
+ user: Record<string, any> & {
3189
+ id: string;
3190
+ createdAt: Date;
3191
+ updatedAt: Date;
3192
+ email: string;
3193
+ emailVerified: boolean;
3194
+ name: string;
3195
+ image?: string | null | undefined;
3196
+ };
3197
+ };
3198
+ }>)[];
3199
+ query: import("better-auth").ZodObject<{
3200
+ client_id: import("better-auth").ZodString;
3201
+ }, import("zod/v4/core").$strip>;
3202
+ metadata: {
3203
+ openapi: {
3204
+ description: string;
3205
+ };
3206
+ };
3207
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3208
+ getOAuthClientPublic: import("better-call").StrictEndpoint<"/oauth2/public-client", {
3209
+ method: "GET";
3210
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3211
+ session: {
3212
+ session: Record<string, any> & {
3213
+ id: string;
3214
+ createdAt: Date;
3215
+ updatedAt: Date;
3216
+ userId: string;
3217
+ expiresAt: Date;
3218
+ token: string;
3219
+ ipAddress?: string | null | undefined;
3220
+ userAgent?: string | null | undefined;
3221
+ };
3222
+ user: Record<string, any> & {
3223
+ id: string;
3224
+ createdAt: Date;
3225
+ updatedAt: Date;
3226
+ email: string;
3227
+ emailVerified: boolean;
3228
+ name: string;
3229
+ image?: string | null | undefined;
3230
+ };
3231
+ };
3232
+ }>)[];
3233
+ query: import("better-auth").ZodObject<{
3234
+ client_id: import("better-auth").ZodString;
3235
+ }, import("zod/v4/core").$strip>;
3236
+ metadata: {
3237
+ openapi: {
3238
+ description: string;
3239
+ };
3240
+ };
3241
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3242
+ getOAuthClientPublicPrelogin: import("better-call").StrictEndpoint<"/oauth2/public-client-prelogin", {
3243
+ method: "POST";
3244
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
3245
+ body: import("better-auth").ZodObject<{
3246
+ client_id: import("better-auth").ZodString;
3247
+ oauth_query: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3248
+ }, import("zod/v4/core").$strip>;
3249
+ metadata: {
3250
+ openapi: {
3251
+ description: string;
3252
+ };
3253
+ };
3254
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3255
+ getOAuthClients: import("better-call").StrictEndpoint<"/oauth2/get-clients", {
3256
+ method: "GET";
3257
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3258
+ session: {
3259
+ session: Record<string, any> & {
3260
+ id: string;
3261
+ createdAt: Date;
3262
+ updatedAt: Date;
3263
+ userId: string;
3264
+ expiresAt: Date;
3265
+ token: string;
3266
+ ipAddress?: string | null | undefined;
3267
+ userAgent?: string | null | undefined;
3268
+ };
3269
+ user: Record<string, any> & {
3270
+ id: string;
3271
+ createdAt: Date;
3272
+ updatedAt: Date;
3273
+ email: string;
3274
+ emailVerified: boolean;
3275
+ name: string;
3276
+ image?: string | null | undefined;
3277
+ };
3278
+ };
3279
+ }>)[];
3280
+ metadata: {
3281
+ openapi: {
3282
+ description: string;
3283
+ };
3284
+ };
3285
+ }, import("@better-auth/oauth-provider").OAuthClient[] | null>;
3286
+ adminUpdateOAuthClient: import("better-call").StrictEndpoint<"/admin/oauth2/update-client", {
3287
+ method: "PATCH";
3288
+ body: import("better-auth").ZodObject<{
3289
+ client_id: import("better-auth").ZodString;
3290
+ update: import("better-auth").ZodObject<{
3291
+ redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3292
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3293
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3294
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3295
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3296
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3297
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3298
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3299
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3300
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3301
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3302
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3303
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3304
+ authorization_code: "authorization_code";
3305
+ client_credentials: "client_credentials";
3306
+ refresh_token: "refresh_token";
3307
+ }>>>;
3308
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3309
+ code: "code";
3310
+ }>>>;
3311
+ type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3312
+ web: "web";
3313
+ native: "native";
3314
+ "user-agent-based": "user-agent-based";
3315
+ }>>;
3316
+ client_secret_expires_at: import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [import("better-auth").ZodString, import("better-auth").ZodNumber]>>;
3317
+ skip_consent: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3318
+ enable_end_session: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3319
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
3320
+ }, import("zod/v4/core").$strip>;
3321
+ }, import("zod/v4/core").$strip>;
3322
+ metadata: {
3323
+ SERVER_ONLY: true;
3324
+ openapi: {
3325
+ description: string;
3326
+ };
3327
+ };
3328
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3329
+ updateOAuthClient: import("better-call").StrictEndpoint<"/oauth2/update-client", {
3330
+ method: "POST";
3331
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3332
+ session: {
3333
+ session: Record<string, any> & {
3334
+ id: string;
3335
+ createdAt: Date;
3336
+ updatedAt: Date;
3337
+ userId: string;
3338
+ expiresAt: Date;
3339
+ token: string;
3340
+ ipAddress?: string | null | undefined;
3341
+ userAgent?: string | null | undefined;
3342
+ };
3343
+ user: Record<string, any> & {
3344
+ id: string;
3345
+ createdAt: Date;
3346
+ updatedAt: Date;
3347
+ email: string;
3348
+ emailVerified: boolean;
3349
+ name: string;
3350
+ image?: string | null | undefined;
3351
+ };
3352
+ };
3353
+ }>)[];
3354
+ body: import("better-auth").ZodObject<{
3355
+ client_id: import("better-auth").ZodString;
3356
+ update: import("better-auth").ZodObject<{
3357
+ redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3358
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3359
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3360
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3361
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3362
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3363
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3364
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3365
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3366
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3367
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3368
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3369
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3370
+ authorization_code: "authorization_code";
3371
+ client_credentials: "client_credentials";
3372
+ refresh_token: "refresh_token";
3373
+ }>>>;
3374
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3375
+ code: "code";
3376
+ }>>>;
3377
+ type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3378
+ web: "web";
3379
+ native: "native";
3380
+ "user-agent-based": "user-agent-based";
3381
+ }>>;
3382
+ }, import("zod/v4/core").$strip>;
3383
+ }, import("zod/v4/core").$strip>;
3384
+ metadata: {
3385
+ openapi: {
3386
+ description: string;
3387
+ };
3388
+ };
3389
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3390
+ rotateClientSecret: import("better-call").StrictEndpoint<"/oauth2/client/rotate-secret", {
3391
+ method: "POST";
3392
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3393
+ session: {
3394
+ session: Record<string, any> & {
3395
+ id: string;
3396
+ createdAt: Date;
3397
+ updatedAt: Date;
3398
+ userId: string;
3399
+ expiresAt: Date;
3400
+ token: string;
3401
+ ipAddress?: string | null | undefined;
3402
+ userAgent?: string | null | undefined;
3403
+ };
3404
+ user: Record<string, any> & {
3405
+ id: string;
3406
+ createdAt: Date;
3407
+ updatedAt: Date;
3408
+ email: string;
3409
+ emailVerified: boolean;
3410
+ name: string;
3411
+ image?: string | null | undefined;
3412
+ };
3413
+ };
3414
+ }>)[];
3415
+ body: import("better-auth").ZodObject<{
3416
+ client_id: import("better-auth").ZodString;
3417
+ }, import("zod/v4/core").$strip>;
3418
+ metadata: {
3419
+ openapi: {
3420
+ description: string;
3421
+ };
3422
+ };
3423
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3424
+ deleteOAuthClient: import("better-call").StrictEndpoint<"/oauth2/delete-client", {
3425
+ method: "POST";
3426
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3427
+ session: {
3428
+ session: Record<string, any> & {
3429
+ id: string;
3430
+ createdAt: Date;
3431
+ updatedAt: Date;
3432
+ userId: string;
3433
+ expiresAt: Date;
3434
+ token: string;
3435
+ ipAddress?: string | null | undefined;
3436
+ userAgent?: string | null | undefined;
3437
+ };
3438
+ user: Record<string, any> & {
3439
+ id: string;
3440
+ createdAt: Date;
3441
+ updatedAt: Date;
3442
+ email: string;
3443
+ emailVerified: boolean;
3444
+ name: string;
3445
+ image?: string | null | undefined;
3446
+ };
3447
+ };
3448
+ }>)[];
3449
+ body: import("better-auth").ZodObject<{
3450
+ client_id: import("better-auth").ZodString;
3451
+ }, import("zod/v4/core").$strip>;
3452
+ metadata: {
3453
+ openapi: {
3454
+ description: string;
3455
+ };
3456
+ };
3457
+ }, void>;
3458
+ getOAuthConsent: import("better-call").StrictEndpoint<"/oauth2/get-consent", {
3459
+ method: "GET";
3460
+ query: import("better-auth").ZodObject<{
3461
+ id: import("better-auth").ZodString;
3462
+ }, import("zod/v4/core").$strip>;
3463
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3464
+ session: {
3465
+ session: Record<string, any> & {
3466
+ id: string;
3467
+ createdAt: Date;
3468
+ updatedAt: Date;
3469
+ userId: string;
3470
+ expiresAt: Date;
3471
+ token: string;
3472
+ ipAddress?: string | null | undefined;
3473
+ userAgent?: string | null | undefined;
3474
+ };
3475
+ user: Record<string, any> & {
3476
+ id: string;
3477
+ createdAt: Date;
3478
+ updatedAt: Date;
3479
+ email: string;
3480
+ emailVerified: boolean;
3481
+ name: string;
3482
+ image?: string | null | undefined;
3483
+ };
3484
+ };
3485
+ }>)[];
3486
+ metadata: {
3487
+ openapi: {
3488
+ description: string;
3489
+ };
3490
+ };
3491
+ }, import("@better-auth/oauth-provider").OAuthConsent<import("@better-auth/oauth-provider").Scope[]>>;
3492
+ getOAuthConsents: import("better-call").StrictEndpoint<"/oauth2/get-consents", {
3493
+ method: "GET";
3494
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3495
+ session: {
3496
+ session: Record<string, any> & {
3497
+ id: string;
3498
+ createdAt: Date;
3499
+ updatedAt: Date;
3500
+ userId: string;
3501
+ expiresAt: Date;
3502
+ token: string;
3503
+ ipAddress?: string | null | undefined;
3504
+ userAgent?: string | null | undefined;
3505
+ };
3506
+ user: Record<string, any> & {
3507
+ id: string;
3508
+ createdAt: Date;
3509
+ updatedAt: Date;
3510
+ email: string;
3511
+ emailVerified: boolean;
3512
+ name: string;
3513
+ image?: string | null | undefined;
3514
+ };
3515
+ };
3516
+ }>)[];
3517
+ metadata: {
3518
+ openapi: {
3519
+ description: string;
3520
+ };
3521
+ };
3522
+ }, import("@better-auth/oauth-provider").OAuthConsent<import("@better-auth/oauth-provider").Scope[]>[]>;
3523
+ updateOAuthConsent: import("better-call").StrictEndpoint<"/oauth2/update-consent", {
3524
+ method: "POST";
3525
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3526
+ session: {
3527
+ session: Record<string, any> & {
3528
+ id: string;
3529
+ createdAt: Date;
3530
+ updatedAt: Date;
3531
+ userId: string;
3532
+ expiresAt: Date;
3533
+ token: string;
3534
+ ipAddress?: string | null | undefined;
3535
+ userAgent?: string | null | undefined;
3536
+ };
3537
+ user: Record<string, any> & {
3538
+ id: string;
3539
+ createdAt: Date;
3540
+ updatedAt: Date;
3541
+ email: string;
3542
+ emailVerified: boolean;
3543
+ name: string;
3544
+ image?: string | null | undefined;
3545
+ };
3546
+ };
3547
+ }>)[];
3548
+ body: import("better-auth").ZodObject<{
3549
+ id: import("better-auth").ZodString;
3550
+ update: import("better-auth").ZodObject<{
3551
+ scopes: import("better-auth").ZodArray<import("better-auth").ZodString>;
3552
+ }, import("zod/v4/core").$strip>;
3553
+ }, import("zod/v4/core").$strip>;
3554
+ metadata: {
3555
+ openapi: {
3556
+ description: string;
3557
+ };
3558
+ };
3559
+ }, import("@better-auth/oauth-provider").OAuthConsent<import("@better-auth/oauth-provider").Scope[]> | null>;
3560
+ deleteOAuthConsent: import("better-call").StrictEndpoint<"/oauth2/delete-consent", {
3561
+ method: "POST";
3562
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3563
+ session: {
3564
+ session: Record<string, any> & {
3565
+ id: string;
3566
+ createdAt: Date;
3567
+ updatedAt: Date;
3568
+ userId: string;
3569
+ expiresAt: Date;
3570
+ token: string;
3571
+ ipAddress?: string | null | undefined;
3572
+ userAgent?: string | null | undefined;
3573
+ };
3574
+ user: Record<string, any> & {
3575
+ id: string;
3576
+ createdAt: Date;
3577
+ updatedAt: Date;
3578
+ email: string;
3579
+ emailVerified: boolean;
3580
+ name: string;
3581
+ image?: string | null | undefined;
3582
+ };
3583
+ };
3584
+ }>)[];
3585
+ body: import("better-auth").ZodObject<{
3586
+ id: import("better-auth").ZodString;
3587
+ }, import("zod/v4/core").$strip>;
3588
+ metadata: {
3589
+ openapi: {
3590
+ description: string;
3591
+ };
3592
+ };
3593
+ }, void>;
3594
+ };
3595
+ schema: {
3596
+ oauthClient: {
3597
+ modelName: string;
3598
+ fields: {
3599
+ clientId: {
3600
+ type: "string";
3601
+ unique: true;
3602
+ required: true;
3603
+ };
3604
+ clientSecret: {
3605
+ type: "string";
3606
+ required: false;
3607
+ };
3608
+ disabled: {
3609
+ type: "boolean";
3610
+ defaultValue: false;
3611
+ required: false;
3612
+ };
3613
+ skipConsent: {
3614
+ type: "boolean";
3615
+ required: false;
3616
+ };
3617
+ enableEndSession: {
3618
+ type: "boolean";
3619
+ required: false;
3620
+ };
3621
+ subjectType: {
3622
+ type: "string";
3623
+ required: false;
3624
+ };
3625
+ scopes: {
3626
+ type: "string[]";
3627
+ required: false;
3628
+ };
3629
+ userId: {
3630
+ type: "string";
3631
+ required: false;
3632
+ references: {
3633
+ model: string;
3634
+ field: string;
3635
+ };
3636
+ index: true;
3637
+ };
3638
+ createdAt: {
3639
+ type: "date";
3640
+ required: false;
3641
+ };
3642
+ updatedAt: {
3643
+ type: "date";
3644
+ required: false;
3645
+ };
3646
+ name: {
3647
+ type: "string";
3648
+ required: false;
3649
+ };
3650
+ uri: {
3651
+ type: "string";
3652
+ required: false;
3653
+ };
3654
+ icon: {
3655
+ type: "string";
3656
+ required: false;
3657
+ };
3658
+ contacts: {
3659
+ type: "string[]";
3660
+ required: false;
3661
+ };
3662
+ tos: {
3663
+ type: "string";
3664
+ required: false;
3665
+ };
3666
+ policy: {
3667
+ type: "string";
3668
+ required: false;
3669
+ };
3670
+ softwareId: {
3671
+ type: "string";
3672
+ required: false;
3673
+ };
3674
+ softwareVersion: {
3675
+ type: "string";
3676
+ required: false;
3677
+ };
3678
+ softwareStatement: {
3679
+ type: "string";
3680
+ required: false;
3681
+ };
3682
+ redirectUris: {
3683
+ type: "string[]";
3684
+ required: true;
3685
+ };
3686
+ postLogoutRedirectUris: {
3687
+ type: "string[]";
3688
+ required: false;
3689
+ };
3690
+ tokenEndpointAuthMethod: {
3691
+ type: "string";
3692
+ required: false;
3693
+ };
3694
+ grantTypes: {
3695
+ type: "string[]";
3696
+ required: false;
3697
+ };
3698
+ responseTypes: {
3699
+ type: "string[]";
3700
+ required: false;
3701
+ };
3702
+ public: {
3703
+ type: "boolean";
3704
+ required: false;
3705
+ };
3706
+ type: {
3707
+ type: "string";
3708
+ required: false;
3709
+ };
3710
+ requirePKCE: {
3711
+ type: "boolean";
3712
+ required: false;
3713
+ };
3714
+ referenceId: {
3715
+ type: "string";
3716
+ required: false;
3717
+ };
3718
+ metadata: {
3719
+ type: "json";
3720
+ required: false;
3721
+ };
3722
+ };
3723
+ };
3724
+ oauthRefreshToken: {
3725
+ fields: {
3726
+ token: {
3727
+ type: "string";
3728
+ required: true;
3729
+ unique: true;
3730
+ };
3731
+ clientId: {
3732
+ type: "string";
3733
+ required: true;
3734
+ references: {
3735
+ model: string;
3736
+ field: string;
3737
+ };
3738
+ index: true;
3739
+ };
3740
+ sessionId: {
3741
+ type: "string";
3742
+ required: false;
3743
+ references: {
3744
+ model: string;
3745
+ field: string;
3746
+ onDelete: "set null";
3747
+ };
3748
+ index: true;
3749
+ };
3750
+ userId: {
3751
+ type: "string";
3752
+ required: true;
3753
+ references: {
3754
+ model: string;
3755
+ field: string;
3756
+ };
3757
+ index: true;
3758
+ };
3759
+ referenceId: {
3760
+ type: "string";
3761
+ required: false;
3762
+ };
3763
+ expiresAt: {
3764
+ type: "date";
3765
+ };
3766
+ createdAt: {
3767
+ type: "date";
3768
+ };
3769
+ revoked: {
3770
+ type: "date";
3771
+ required: false;
3772
+ };
3773
+ authTime: {
3774
+ type: "date";
3775
+ required: false;
3776
+ };
3777
+ scopes: {
3778
+ type: "string[]";
3779
+ required: true;
3780
+ };
3781
+ };
3782
+ };
3783
+ oauthAccessToken: {
3784
+ modelName: string;
3785
+ fields: {
3786
+ token: {
3787
+ type: "string";
3788
+ unique: true;
3789
+ };
3790
+ clientId: {
3791
+ type: "string";
3792
+ required: true;
3793
+ references: {
3794
+ model: string;
3795
+ field: string;
3796
+ };
3797
+ index: true;
3798
+ };
3799
+ sessionId: {
3800
+ type: "string";
3801
+ required: false;
3802
+ references: {
3803
+ model: string;
3804
+ field: string;
3805
+ onDelete: "set null";
3806
+ };
3807
+ index: true;
3808
+ };
3809
+ userId: {
3810
+ type: "string";
3811
+ required: false;
3812
+ references: {
3813
+ model: string;
3814
+ field: string;
3815
+ };
3816
+ index: true;
3817
+ };
3818
+ referenceId: {
3819
+ type: "string";
3820
+ required: false;
3821
+ };
3822
+ refreshId: {
3823
+ type: "string";
3824
+ required: false;
3825
+ references: {
3826
+ model: string;
3827
+ field: string;
3828
+ };
3829
+ index: true;
3830
+ };
3831
+ expiresAt: {
3832
+ type: "date";
3833
+ };
3834
+ createdAt: {
3835
+ type: "date";
3836
+ };
3837
+ scopes: {
3838
+ type: "string[]";
3839
+ required: true;
3840
+ };
3841
+ };
3842
+ };
3843
+ oauthConsent: {
3844
+ modelName: string;
3845
+ fields: {
3846
+ clientId: {
3847
+ type: "string";
3848
+ required: true;
3849
+ references: {
3850
+ model: string;
3851
+ field: string;
3852
+ };
3853
+ index: true;
3854
+ };
3855
+ userId: {
3856
+ type: "string";
3857
+ required: false;
3858
+ references: {
3859
+ model: string;
3860
+ field: string;
3861
+ };
3862
+ index: true;
3863
+ };
3864
+ referenceId: {
3865
+ type: "string";
3866
+ required: false;
3867
+ };
3868
+ scopes: {
3869
+ type: "string[]";
3870
+ required: true;
3871
+ };
3872
+ createdAt: {
3873
+ type: "date";
3874
+ };
3875
+ updatedAt: {
3876
+ type: "date";
3877
+ };
3878
+ };
3879
+ };
3880
+ };
3881
+ rateLimit: ({
3882
+ pathMatcher: (path: string) => path is "/oauth2/token";
3883
+ window: number;
3884
+ max: number;
3885
+ } | {
3886
+ pathMatcher: (path: string) => path is "/oauth2/authorize";
3887
+ window: number;
3888
+ max: number;
3889
+ } | {
3890
+ pathMatcher: (path: string) => path is "/oauth2/introspect";
3891
+ window: number;
3892
+ max: number;
3893
+ } | {
3894
+ pathMatcher: (path: string) => path is "/oauth2/revoke";
3895
+ window: number;
3896
+ max: number;
3897
+ } | {
3898
+ pathMatcher: (path: string) => path is "/oauth2/register";
3899
+ window: number;
3900
+ max: number;
3901
+ } | {
3902
+ pathMatcher: (path: string) => path is "/oauth2/userinfo";
3903
+ window: number;
3904
+ max: number;
3905
+ })[];
3906
+ }];
3907
+ socialProviders: {
3908
+ google: {
3909
+ clientId: string;
3910
+ clientSecret: string;
3911
+ disableSignUp: true;
3912
+ };
3913
+ } | {
3914
+ google?: never;
3915
+ };
3916
+ account: {
3917
+ accountLinking?: {
3918
+ trustedProviders: "antasphere"[];
3919
+ requireLocalEmailVerified: true;
3920
+ };
3921
+ encryptOAuthTokens: true;
3922
+ };
3923
+ baseURL: string;
3924
+ basePath: string;
3925
+ secret: string;
3926
+ }>;
3927
+ //# sourceMappingURL=better-auth.d.ts.map