@archlast/server 0.1.7 → 0.1.9

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 (372) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +14 -10
  3. package/dist/admin/auth.d.ts +24 -5
  4. package/dist/admin/auth.js +49 -25
  5. package/dist/admin/schema.d.ts +122 -32
  6. package/dist/admin/schema.js +131 -95
  7. package/dist/admin/seed.d.ts +1 -1
  8. package/dist/admin/seed.js +79 -47
  9. package/dist/auth/api-key-resolver.d.ts +1 -1
  10. package/dist/auth/api-key-resolver.js +7 -3
  11. package/dist/auth/archlast-auth-adapter.d.ts +2 -5
  12. package/dist/auth/archlast-auth-adapter.js +1 -1
  13. package/dist/auth/better-auth-adapter.d.ts.map +1 -1
  14. package/dist/auth/better-auth-adapter.js +41 -26
  15. package/dist/auth/better-auth-adapter.js.map +1 -1
  16. package/dist/auth/better-auth-admin.d.ts.map +1 -1
  17. package/dist/auth/better-auth-admin.js +1 -1
  18. package/dist/auth/better-auth-admin.js.map +1 -1
  19. package/dist/auth/better-auth-api-key-resolver.js +1 -1
  20. package/dist/auth/better-auth-api-key-resolver.js.map +1 -1
  21. package/dist/auth/better-auth-instance.d.ts +247 -303
  22. package/dist/auth/better-auth-instance.d.ts.map +1 -1
  23. package/dist/auth/better-auth-instance.js +11 -0
  24. package/dist/auth/better-auth-instance.js.map +1 -1
  25. package/dist/auth/better-auth-seed.d.ts +5 -2
  26. package/dist/auth/better-auth-seed.js +31 -22
  27. package/dist/auth/better-auth-session-adapter.d.ts.map +1 -1
  28. package/dist/auth/better-auth-session-adapter.js +14 -10
  29. package/dist/auth/better-auth-session-adapter.js.map +1 -1
  30. package/dist/auth/errors.d.ts.map +1 -1
  31. package/dist/auth/errors.js +11 -11
  32. package/dist/auth/errors.js.map +1 -1
  33. package/dist/auth/oauth-proxy.d.ts +5 -2
  34. package/dist/auth/oauth-proxy.js +23 -27
  35. package/dist/auth/resolver.d.ts.map +1 -1
  36. package/dist/auth/resolver.js.map +1 -1
  37. package/dist/auth/role-helpers.d.ts +1 -1
  38. package/dist/auth/role-helpers.d.ts.map +1 -1
  39. package/dist/auth/role-helpers.js.map +1 -1
  40. package/dist/auth/session-manager.d.ts +2 -5
  41. package/dist/auth/session-manager.js +16 -6
  42. package/dist/auth/system/better-auth-schema.d.ts.map +1 -1
  43. package/dist/auth/system/better-auth-schema.js +6 -23
  44. package/dist/auth/system/better-auth-schema.js.map +1 -1
  45. package/dist/cache/circuit-breaker.d.ts +81 -0
  46. package/dist/cache/circuit-breaker.d.ts.map +1 -0
  47. package/dist/cache/circuit-breaker.js +170 -0
  48. package/dist/cache/circuit-breaker.js.map +1 -0
  49. package/dist/cache/client.d.ts +6 -3
  50. package/dist/cache/client.d.ts.map +1 -1
  51. package/dist/cache/client.js +12 -53
  52. package/dist/cache/client.js.map +1 -1
  53. package/dist/cache/index.d.ts +2 -0
  54. package/dist/cache/index.d.ts.map +1 -1
  55. package/dist/cache/index.js +5 -1
  56. package/dist/cache/index.js.map +1 -1
  57. package/dist/cache/invalidation-queue.d.ts +63 -0
  58. package/dist/cache/invalidation-queue.d.ts.map +1 -0
  59. package/dist/cache/invalidation-queue.js +196 -0
  60. package/dist/cache/invalidation-queue.js.map +1 -0
  61. package/dist/cache/layers.d.ts +14 -4
  62. package/dist/cache/layers.d.ts.map +1 -1
  63. package/dist/cache/layers.js +66 -72
  64. package/dist/cache/layers.js.map +1 -1
  65. package/dist/cache/manager.d.ts.map +1 -1
  66. package/dist/cache/manager.js +6 -41
  67. package/dist/cache/manager.js.map +1 -1
  68. package/dist/cache/protocol.d.ts +4 -39
  69. package/dist/cache/protocol.d.ts.map +1 -1
  70. package/dist/cache/protocol.js.map +1 -1
  71. package/dist/cache/redis-adapter.d.ts +103 -0
  72. package/dist/cache/redis-adapter.d.ts.map +1 -0
  73. package/dist/cache/redis-adapter.js +424 -0
  74. package/dist/cache/redis-adapter.js.map +1 -0
  75. package/dist/cache/run-sidecar.js +10 -1
  76. package/dist/cache/run-sidecar.js.map +1 -1
  77. package/dist/cache/sidecar-server.d.ts +51 -1
  78. package/dist/cache/sidecar-server.d.ts.map +1 -1
  79. package/dist/cache/sidecar-server.js +368 -22
  80. package/dist/cache/sidecar-server.js.map +1 -1
  81. package/dist/cache/store.d.ts +43 -0
  82. package/dist/cache/store.d.ts.map +1 -1
  83. package/dist/cache/store.js +69 -76
  84. package/dist/cache/store.js.map +1 -1
  85. package/dist/cache/strategies.d.ts +2 -9
  86. package/dist/cache/strategies.d.ts.map +1 -1
  87. package/dist/cache/types.d.ts +130 -0
  88. package/dist/cache/types.d.ts.map +1 -0
  89. package/dist/cache/types.js +60 -0
  90. package/dist/cache/types.js.map +1 -0
  91. package/dist/config/bullmq.d.ts +16 -0
  92. package/dist/config/bullmq.d.ts.map +1 -0
  93. package/dist/config/bullmq.js +103 -0
  94. package/dist/config/bullmq.js.map +1 -0
  95. package/dist/config/index.d.ts +1 -0
  96. package/dist/config/index.d.ts.map +1 -1
  97. package/dist/config/index.js +1 -0
  98. package/dist/config/index.js.map +1 -1
  99. package/dist/config/schema.d.ts +80 -6
  100. package/dist/config/schema.d.ts.map +1 -1
  101. package/dist/config/schema.js +71 -6
  102. package/dist/config/schema.js.map +1 -1
  103. package/dist/config/service.d.ts +54 -4
  104. package/dist/config/service.d.ts.map +1 -1
  105. package/dist/config/service.js +56 -2
  106. package/dist/config/service.js.map +1 -1
  107. package/dist/controllers/admin/admin-tokens.controller.d.ts +131 -115
  108. package/dist/controllers/admin/admin-tokens.controller.js +117 -98
  109. package/dist/controllers/admin/api-keys.controller.d.ts +1 -1
  110. package/dist/controllers/admin/api-keys.controller.d.ts.map +1 -1
  111. package/dist/controllers/admin/api-keys.controller.js.map +1 -1
  112. package/dist/controllers/admin/app-users.controller.d.ts +274 -243
  113. package/dist/controllers/admin/app-users.controller.js +301 -257
  114. package/dist/controllers/admin/auth.controller.d.ts +260 -236
  115. package/dist/controllers/admin/auth.controller.js +197 -174
  116. package/dist/controllers/admin/backup.controller.d.ts.map +1 -1
  117. package/dist/controllers/admin/backup.controller.js.map +1 -1
  118. package/dist/controllers/admin/settings.controller.d.ts +1 -1
  119. package/dist/controllers/admin/storage-stats.controller.d.ts +63 -0
  120. package/dist/controllers/admin/storage-stats.controller.d.ts.map +1 -0
  121. package/dist/controllers/admin/storage-stats.controller.js +33 -0
  122. package/dist/controllers/admin/storage-stats.controller.js.map +1 -0
  123. package/dist/controllers/admin/tenants.controller.d.ts.map +1 -1
  124. package/dist/controllers/admin/tenants.controller.js.map +1 -1
  125. package/dist/controllers/admin/users.controller.d.ts +1 -1
  126. package/dist/controllers/admin/users.controller.d.ts.map +1 -1
  127. package/dist/controllers/admin/users.controller.js.map +1 -1
  128. package/dist/controllers/auth.controller.d.ts +289 -271
  129. package/dist/controllers/auth.controller.js +275 -226
  130. package/dist/controllers/crud-generator.controller.d.ts.map +1 -1
  131. package/dist/controllers/crud-generator.controller.js +4 -2
  132. package/dist/controllers/crud-generator.controller.js.map +1 -1
  133. package/dist/controllers/index.d.ts +1 -1
  134. package/dist/controllers/index.d.ts.map +1 -1
  135. package/dist/controllers/index.js.map +1 -1
  136. package/dist/controllers/introspection.controller.d.ts +666 -0
  137. package/dist/controllers/introspection.controller.d.ts.map +1 -1
  138. package/dist/controllers/introspection.controller.js +628 -0
  139. package/dist/controllers/introspection.controller.js.map +1 -1
  140. package/dist/controllers/invite.controller.d.ts +190 -170
  141. package/dist/controllers/invite.controller.js +183 -164
  142. package/dist/controllers/mfa.controller.d.ts +205 -183
  143. package/dist/controllers/mfa.controller.js +131 -111
  144. package/dist/controllers/otp.controller.d.ts +194 -171
  145. package/dist/controllers/otp.controller.js +192 -175
  146. package/dist/controllers/storage.controller.d.ts.map +1 -1
  147. package/dist/controllers/storage.controller.js.map +1 -1
  148. package/dist/controllers/system.controller.d.ts +21 -3
  149. package/dist/controllers/system.controller.d.ts.map +1 -1
  150. package/dist/controllers/system.controller.js +32 -2
  151. package/dist/controllers/system.controller.js.map +1 -1
  152. package/dist/controllers/tenant.controller.d.ts +258 -227
  153. package/dist/controllers/tenant.controller.js +224 -200
  154. package/dist/db/cachedclient.d.ts +6 -11
  155. package/dist/db/cachedclient.d.ts.map +1 -1
  156. package/dist/db/cachedclient.js +79 -43
  157. package/dist/db/cachedclient.js.map +1 -1
  158. package/dist/db/distributed-client.d.ts +79 -24
  159. package/dist/db/distributed-client.js +23 -24
  160. package/dist/db/factory.d.ts +3 -8
  161. package/dist/db/factory.d.ts.map +1 -1
  162. package/dist/db/factory.js +3 -22
  163. package/dist/db/factory.js.map +1 -1
  164. package/dist/db/socket-client.d.ts +7 -0
  165. package/dist/db/socket-client.d.ts.map +1 -1
  166. package/dist/db/socket-client.js +140 -11
  167. package/dist/db/socket-client.js.map +1 -1
  168. package/dist/deployment/handler.d.ts +10 -2
  169. package/dist/deployment/handler.d.ts.map +1 -1
  170. package/dist/deployment/handler.js +103 -21
  171. package/dist/deployment/handler.js.map +1 -1
  172. package/dist/deployment/persistence.d.ts.map +1 -1
  173. package/dist/deployment/persistence.js +6 -1
  174. package/dist/deployment/persistence.js.map +1 -1
  175. package/dist/docker/compose.d.ts.map +1 -1
  176. package/dist/docker/compose.js +76 -0
  177. package/dist/docker/compose.js.map +1 -1
  178. package/dist/engine/runner.d.ts.map +1 -1
  179. package/dist/engine/runner.js +0 -43
  180. package/dist/engine/runner.js.map +1 -1
  181. package/dist/functions/built-in/auth-apikey.d.ts.map +1 -1
  182. package/dist/functions/built-in/auth-apikey.js.map +1 -1
  183. package/dist/functions/built-in/system-cache.d.ts.map +1 -1
  184. package/dist/functions/built-in/system-cache.js +6 -31
  185. package/dist/functions/built-in/system-cache.js.map +1 -1
  186. package/dist/functions/built-in/system-data.d.ts.map +1 -1
  187. package/dist/functions/built-in/system-data.js +4 -2
  188. package/dist/functions/built-in/system-data.js.map +1 -1
  189. package/dist/functions/definition.d.ts.map +1 -1
  190. package/dist/functions/definition.js +6 -2
  191. package/dist/functions/definition.js.map +1 -1
  192. package/dist/http/router.d.ts +1 -0
  193. package/dist/http/router.d.ts.map +1 -1
  194. package/dist/http/router.js +14 -3
  195. package/dist/http/router.js.map +1 -1
  196. package/dist/http/routes/metrics.d.ts +42 -0
  197. package/dist/http/routes/metrics.d.ts.map +1 -0
  198. package/dist/http/routes/metrics.js +29 -0
  199. package/dist/http/routes/metrics.js.map +1 -0
  200. package/dist/http/server.d.ts +1 -0
  201. package/dist/http/server.d.ts.map +1 -1
  202. package/dist/http/server.js +63 -22
  203. package/dist/http/server.js.map +1 -1
  204. package/dist/ipc/socket-bridge.d.ts +1 -0
  205. package/dist/ipc/socket-bridge.d.ts.map +1 -1
  206. package/dist/ipc/socket-bridge.js +5 -1
  207. package/dist/ipc/socket-bridge.js.map +1 -1
  208. package/dist/jobs/bullmq-adapter.d.ts +154 -0
  209. package/dist/jobs/bullmq-adapter.d.ts.map +1 -0
  210. package/dist/jobs/bullmq-adapter.js +688 -0
  211. package/dist/jobs/bullmq-adapter.js.map +1 -0
  212. package/dist/jobs/bullmq-circuit-breaker.d.ts +133 -0
  213. package/dist/jobs/bullmq-circuit-breaker.d.ts.map +1 -0
  214. package/dist/jobs/bullmq-circuit-breaker.js +323 -0
  215. package/dist/jobs/bullmq-circuit-breaker.js.map +1 -0
  216. package/dist/jobs/bullmq-dlq-manager.d.ts +155 -0
  217. package/dist/jobs/bullmq-dlq-manager.d.ts.map +1 -0
  218. package/dist/jobs/bullmq-dlq-manager.js +325 -0
  219. package/dist/jobs/bullmq-dlq-manager.js.map +1 -0
  220. package/dist/jobs/bullmq-metrics.d.ts +104 -0
  221. package/dist/jobs/bullmq-metrics.d.ts.map +1 -0
  222. package/dist/jobs/bullmq-metrics.js +323 -0
  223. package/dist/jobs/bullmq-metrics.js.map +1 -0
  224. package/dist/jobs/bullmq-priority-service.d.ts +173 -0
  225. package/dist/jobs/bullmq-priority-service.d.ts.map +1 -0
  226. package/dist/jobs/bullmq-priority-service.js +390 -0
  227. package/dist/jobs/bullmq-priority-service.js.map +1 -0
  228. package/dist/jobs/bullmq-scheduler.d.ts +111 -0
  229. package/dist/jobs/bullmq-scheduler.d.ts.map +1 -0
  230. package/dist/jobs/bullmq-scheduler.js +300 -0
  231. package/dist/jobs/bullmq-scheduler.js.map +1 -0
  232. package/dist/jobs/bullmq-worker.d.ts +155 -0
  233. package/dist/jobs/bullmq-worker.d.ts.map +1 -0
  234. package/dist/jobs/bullmq-worker.js +651 -0
  235. package/dist/jobs/bullmq-worker.js.map +1 -0
  236. package/dist/jobs/circuit-breaker.d.ts +120 -0
  237. package/dist/jobs/circuit-breaker.d.ts.map +1 -0
  238. package/dist/jobs/circuit-breaker.js +262 -0
  239. package/dist/jobs/circuit-breaker.js.map +1 -0
  240. package/dist/jobs/index.d.ts +1 -1
  241. package/dist/jobs/index.d.ts.map +1 -1
  242. package/dist/jobs/index.js.map +1 -1
  243. package/dist/jobs/queue.d.ts +120 -1
  244. package/dist/jobs/queue.d.ts.map +1 -1
  245. package/dist/jobs/queue.js +487 -9
  246. package/dist/jobs/queue.js.map +1 -1
  247. package/dist/jobs/redis-connection.d.ts +50 -0
  248. package/dist/jobs/redis-connection.d.ts.map +1 -0
  249. package/dist/jobs/redis-connection.js +123 -0
  250. package/dist/jobs/redis-connection.js.map +1 -0
  251. package/dist/jobs/run-scheduler.js +163 -10
  252. package/dist/jobs/run-scheduler.js.map +1 -1
  253. package/dist/jobs/run-worker.js +101 -9
  254. package/dist/jobs/run-worker.js.map +1 -1
  255. package/dist/jobs/worker-thread.d.ts +6 -0
  256. package/dist/jobs/worker-thread.d.ts.map +1 -1
  257. package/dist/jobs/worker-thread.js +37 -8
  258. package/dist/jobs/worker-thread.js.map +1 -1
  259. package/dist/jobs/worker.d.ts +33 -0
  260. package/dist/jobs/worker.d.ts.map +1 -1
  261. package/dist/jobs/worker.js +358 -115
  262. package/dist/jobs/worker.js.map +1 -1
  263. package/dist/linq/async-enumerable.d.ts.map +1 -1
  264. package/dist/linq/async-enumerable.js.map +1 -1
  265. package/dist/linq/enumerable.d.ts.map +1 -1
  266. package/dist/linq/enumerable.js +10 -10
  267. package/dist/linq/enumerable.js.map +1 -1
  268. package/dist/metrics/collector.d.ts +26 -0
  269. package/dist/metrics/collector.d.ts.map +1 -0
  270. package/dist/metrics/collector.js +103 -0
  271. package/dist/metrics/collector.js.map +1 -0
  272. package/dist/polling/updates.controller.d.ts +57 -0
  273. package/dist/polling/updates.controller.d.ts.map +1 -0
  274. package/dist/polling/updates.controller.js +70 -0
  275. package/dist/polling/updates.controller.js.map +1 -0
  276. package/dist/repository/db-set.d.ts.map +1 -1
  277. package/dist/repository/db-set.js +12 -8
  278. package/dist/repository/db-set.js.map +1 -1
  279. package/dist/repository/ef-core.d.ts.map +1 -1
  280. package/dist/repository/ef-core.js +6 -6
  281. package/dist/repository/ef-core.js.map +1 -1
  282. package/dist/repository/factory.d.ts +1 -1
  283. package/dist/repository/factory.d.ts.map +1 -1
  284. package/dist/repository/factory.js.map +1 -1
  285. package/dist/repository/interfaces.d.ts.map +1 -1
  286. package/dist/repository/interfaces.js.map +1 -1
  287. package/dist/repository/queryable.d.ts.map +1 -1
  288. package/dist/repository/queryable.js.map +1 -1
  289. package/dist/rpc/adapter.d.ts.map +1 -1
  290. package/dist/rpc/adapter.js.map +1 -1
  291. package/dist/rpc/router.d.ts +2 -2
  292. package/dist/rpc/router.d.ts.map +1 -1
  293. package/dist/rpc/router.js +1 -1
  294. package/dist/rpc/router.js.map +1 -1
  295. package/dist/schema/input-types.d.ts +1 -1
  296. package/dist/schema/input-types.d.ts.map +1 -1
  297. package/dist/schema/input-types.js +4 -3
  298. package/dist/schema/input-types.js.map +1 -1
  299. package/dist/schema/modifiers.d.ts +2 -1
  300. package/dist/schema/modifiers.d.ts.map +1 -1
  301. package/dist/schema/modifiers.js +41 -5
  302. package/dist/schema/modifiers.js.map +1 -1
  303. package/dist/schema/relationship-types.d.ts +7 -2
  304. package/dist/schema/relationship-types.js +1 -1
  305. package/dist/schema/type-helpers.d.ts +35 -0
  306. package/dist/schema/type-helpers.d.ts.map +1 -1
  307. package/dist/schema/type-helpers.js +32 -21
  308. package/dist/schema/type-helpers.js.map +1 -1
  309. package/dist/schema/types.d.ts.map +1 -1
  310. package/dist/schema/validators.d.ts +1 -1
  311. package/dist/schema/validators.d.ts.map +1 -1
  312. package/dist/schema/validators.js +27 -16
  313. package/dist/schema/validators.js.map +1 -1
  314. package/dist/services/admin/app-users.service.d.ts +1 -1
  315. package/dist/services/admin/app-users.service.js +31 -38
  316. package/dist/services/admin/auth.service.d.ts +1 -1
  317. package/dist/services/admin/auth.service.js +11 -5
  318. package/dist/services/admin/backup/BackupOrchestrator.d.ts.map +1 -1
  319. package/dist/services/admin/backup/BackupOrchestrator.js +4 -7
  320. package/dist/services/admin/backup/BackupOrchestrator.js.map +1 -1
  321. package/dist/services/admin/backup/StorageStreamer.d.ts +3 -3
  322. package/dist/services/admin/backup/StorageStreamer.d.ts.map +1 -1
  323. package/dist/services/admin/backup/StorageStreamer.js +16 -55
  324. package/dist/services/admin/backup/StorageStreamer.js.map +1 -1
  325. package/dist/services/admin/backup/ZipComposer.d.ts +2 -0
  326. package/dist/services/admin/backup/ZipComposer.d.ts.map +1 -1
  327. package/dist/services/admin/backup/ZipComposer.js +23 -0
  328. package/dist/services/admin/backup/ZipComposer.js.map +1 -1
  329. package/dist/services/admin/backup.service.d.ts.map +1 -1
  330. package/dist/services/admin/backup.service.js.map +1 -1
  331. package/dist/services/admin/data.service.d.ts.map +1 -1
  332. package/dist/services/admin/data.service.js +287 -286
  333. package/dist/services/admin/data.service.js.map +1 -1
  334. package/dist/services/admin/tenants.service.d.ts.map +1 -1
  335. package/dist/services/admin/tenants.service.js.map +1 -1
  336. package/dist/services/auth.service.d.ts +2 -3
  337. package/dist/services/auth.service.js +16 -16
  338. package/dist/services/introspection.service.d.ts.map +1 -1
  339. package/dist/services/introspection.service.js +6 -3
  340. package/dist/services/introspection.service.js.map +1 -1
  341. package/dist/services/invite.service.d.ts +1 -1
  342. package/dist/services/invite.service.js +17 -15
  343. package/dist/services/storage.service.d.ts.map +1 -1
  344. package/dist/services/storage.service.js +35 -4
  345. package/dist/services/storage.service.js.map +1 -1
  346. package/dist/services/system.service.d.ts +4 -0
  347. package/dist/services/system.service.d.ts.map +1 -1
  348. package/dist/services/system.service.js +43 -1
  349. package/dist/services/system.service.js.map +1 -1
  350. package/dist/services/tenant.service.d.ts +1 -1
  351. package/dist/services/tenant.service.js +43 -31
  352. package/dist/sse/subscriptions.controller.d.ts +57 -0
  353. package/dist/sse/subscriptions.controller.d.ts.map +1 -0
  354. package/dist/sse/subscriptions.controller.js +127 -0
  355. package/dist/sse/subscriptions.controller.js.map +1 -0
  356. package/dist/startup/bootstrap.d.ts +13 -2
  357. package/dist/startup/bootstrap.d.ts.map +1 -1
  358. package/dist/startup/bootstrap.js +85 -13
  359. package/dist/startup/bootstrap.js.map +1 -1
  360. package/dist/storage/s3-backend.d.ts.map +1 -1
  361. package/dist/storage/s3-backend.js +3 -3
  362. package/dist/storage/s3-backend.js.map +1 -1
  363. package/dist/websocket/server.d.ts.map +1 -1
  364. package/dist/websocket/server.js +14 -3
  365. package/dist/websocket/server.js.map +1 -1
  366. package/docker/README.md +299 -1
  367. package/package.json +5 -1
  368. package/templates/.env.example +76 -16
  369. package/templates/archlast.config.js +15 -1
  370. package/templates/docker-compose.dev.yml +8 -8
  371. package/templates/docker-compose.prod.yml +29 -12
  372. package/templates/docker-compose.yml +112 -28
@@ -9,6 +9,7 @@
9
9
  * - Anonymous plugin (guest users)
10
10
  * - API Key plugin (API key management and authentication)
11
11
  * - Organization plugin (multi-tenancy support)
12
+ * - Expo plugin (React Native/Expo support with deep linking)
12
13
  */
13
14
  import type { IDatabaseClient } from "../db/interfaces.js";
14
15
  /**
@@ -329,20 +330,12 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
329
330
  };
330
331
  };
331
332
  };
332
- }, {
333
- id: string;
334
- createdAt: Date;
335
- updatedAt: Date;
336
- email: string;
337
- emailVerified: boolean;
338
- name: string;
339
- image?: string | null | undefined;
340
- }>;
333
+ }, import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole>;
341
334
  createUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/create-user", {
342
335
  method: "POST";
343
336
  body: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
344
337
  email: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
345
- password: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
338
+ password: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
346
339
  name: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
347
340
  role: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodUnion<readonly [import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodArray<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>]>>;
348
341
  data: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodRecord<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString, import("better-auth", { with: { "resolution-mode": "import" } }).ZodAny>>;
@@ -373,7 +366,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
373
366
  $Infer: {
374
367
  body: {
375
368
  email: string;
376
- password: string;
369
+ password?: string | undefined;
377
370
  name: string;
378
371
  role?: "user" | "admin" | ("user" | "admin")[] | undefined;
379
372
  data?: Record<string, any> | undefined;
@@ -581,15 +574,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
581
574
  };
582
575
  };
583
576
  }, {
584
- user: {
585
- id: string;
586
- createdAt: Date;
587
- updatedAt: Date;
588
- email: string;
589
- emailVerified: boolean;
590
- name: string;
591
- image?: string | null | undefined;
592
- } & Record<string, any>;
577
+ user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
593
578
  }>;
594
579
  banUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/ban-user", {
595
580
  method: "POST";
@@ -629,15 +614,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
629
614
  };
630
615
  };
631
616
  }, {
632
- user: {
633
- id: string;
634
- createdAt: Date;
635
- updatedAt: Date;
636
- email: string;
637
- emailVerified: boolean;
638
- name: string;
639
- image?: string | null | undefined;
640
- } & Record<string, any>;
617
+ user: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).UserWithRole;
641
618
  }>;
642
619
  impersonateUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/impersonate-user", {
643
620
  method: "POST";
@@ -694,8 +671,25 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
694
671
  method: "POST";
695
672
  requireHeaders: true;
696
673
  }, {
697
- session: import("better-auth", { with: { "resolution-mode": "import" } }).Session & Record<string, any>;
698
- user: import("better-auth", { with: { "resolution-mode": "import" } }).User & Record<string, any>;
674
+ session: {
675
+ id: string;
676
+ createdAt: Date;
677
+ updatedAt: Date;
678
+ userId: string;
679
+ expiresAt: Date;
680
+ token: string;
681
+ ipAddress?: string | null | undefined;
682
+ userAgent?: string | null | undefined;
683
+ } & Record<string, any>;
684
+ user: {
685
+ id: string;
686
+ createdAt: Date;
687
+ updatedAt: Date;
688
+ email: string;
689
+ emailVerified: boolean;
690
+ name: string;
691
+ image?: string | null | undefined;
692
+ } & Record<string, any>;
699
693
  }>;
700
694
  revokeUserSession: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/admin/revoke-user-session", {
701
695
  method: "POST";
@@ -1041,16 +1035,10 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1041
1035
  displayUsername?: string | undefined;
1042
1036
  username?: string | undefined;
1043
1037
  id? /**
1044
- * Maximum expiration time (in days)
1038
+ * Minimum expiration time (in days)
1045
1039
  */: string | undefined;
1046
1040
  createdAt?: Date | undefined;
1047
- updatedAt
1048
- /**
1049
- * Rate limiting configuration for API keys
1050
- */
1051
- ? /**
1052
- * Rate limiting configuration for API keys
1053
- */: Date | undefined;
1041
+ updatedAt?: Date | undefined;
1054
1042
  email?: string | undefined;
1055
1043
  emailVerified?: boolean | undefined;
1056
1044
  name?: string | undefined;
@@ -1118,14 +1106,15 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1118
1106
  token: string;
1119
1107
  user: {
1120
1108
  id: string;
1109
+ createdAt: Date;
1110
+ updatedAt: Date;
1121
1111
  email: string;
1122
1112
  emailVerified: boolean;
1113
+ name: string;
1114
+ image?: string | null | undefined;
1115
+ } & {
1123
1116
  username: string;
1124
1117
  displayUsername: string;
1125
- name: string;
1126
- image: string | null | undefined;
1127
- createdAt: Date;
1128
- updatedAt: Date;
1129
1118
  };
1130
1119
  } | null>;
1131
1120
  isUsernameAvailable: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/is-username-available", {
@@ -1209,15 +1198,98 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1209
1198
  };
1210
1199
  }, {
1211
1200
  token: string;
1212
- user: {
1201
+ user: Record<string, any> & {
1213
1202
  id: string;
1203
+ createdAt: Date;
1204
+ updatedAt: Date;
1214
1205
  email: string;
1215
1206
  emailVerified: boolean;
1216
1207
  name: string;
1217
- createdAt: Date;
1218
- updatedAt: Date;
1208
+ image?: string | null | undefined;
1219
1209
  };
1220
1210
  } | null>;
1211
+ deleteAnonymousUser: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/delete-anonymous-user", {
1212
+ method: "POST";
1213
+ use: ((inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<{
1214
+ session: {
1215
+ session: Record<string, any> & {
1216
+ id: string;
1217
+ createdAt: Date;
1218
+ updatedAt: Date;
1219
+ userId: string;
1220
+ expiresAt: Date;
1221
+ token: string;
1222
+ ipAddress?: string | null | undefined;
1223
+ userAgent?: string | null | undefined;
1224
+ };
1225
+ user: Record<string, any> & {
1226
+ id: string;
1227
+ createdAt: Date;
1228
+ updatedAt: Date;
1229
+ email: string;
1230
+ emailVerified: boolean;
1231
+ name: string;
1232
+ image?: string | null | undefined;
1233
+ };
1234
+ };
1235
+ }>)[];
1236
+ metadata: {
1237
+ openapi: {
1238
+ description: string;
1239
+ responses: {
1240
+ 200: {
1241
+ description: string;
1242
+ content: {
1243
+ "application/json": {
1244
+ schema: {
1245
+ type: "object";
1246
+ properties: {
1247
+ success: {
1248
+ type: string;
1249
+ };
1250
+ };
1251
+ };
1252
+ };
1253
+ };
1254
+ };
1255
+ "400": {
1256
+ description: string;
1257
+ content: {
1258
+ "application/json": {
1259
+ schema: {
1260
+ type: "object";
1261
+ properties: {
1262
+ message: {
1263
+ type: string;
1264
+ };
1265
+ };
1266
+ };
1267
+ required: string[];
1268
+ };
1269
+ };
1270
+ };
1271
+ "500": {
1272
+ description: string;
1273
+ content: {
1274
+ "application/json": {
1275
+ schema: {
1276
+ type: "object";
1277
+ properties: {
1278
+ message: {
1279
+ type: string;
1280
+ };
1281
+ };
1282
+ required: string[];
1283
+ };
1284
+ };
1285
+ };
1286
+ };
1287
+ };
1288
+ };
1289
+ };
1290
+ }, {
1291
+ success: boolean;
1292
+ }>;
1221
1293
  };
1222
1294
  hooks: {
1223
1295
  after: {
@@ -1225,7 +1297,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1225
1297
  handler: (inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<void>;
1226
1298
  }[];
1227
1299
  };
1228
- options: import("../../node_modules/better-auth/dist/plugins/anonymous/types.mjs", { with: { "resolution-mode": "import" } }).AnonymousOptions | undefined;
1300
+ options: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).AnonymousOptions | undefined;
1229
1301
  schema: {
1230
1302
  user: {
1231
1303
  fields: {
@@ -1243,259 +1315,15 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1243
1315
  readonly FAILED_TO_CREATE_USER: "Failed to create user";
1244
1316
  readonly COULD_NOT_CREATE_SESSION: "Could not create session";
1245
1317
  readonly ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: "Anonymous users cannot sign in again anonymously";
1318
+ readonly FAILED_TO_DELETE_ANONYMOUS_USER: "Failed to delete anonymous user";
1319
+ readonly USER_IS_NOT_ANONYMOUS: "User is not anonymous";
1320
+ readonly DELETE_ANONYMOUS_USER_DISABLED: "Deleting anonymous users is disabled";
1246
1321
  };
1247
- }, {
1248
- id: "organization";
1249
- endpoints: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).OrganizationEndpoints<{
1250
- allowUserToCreateOrganization: true;
1251
- creatorRole: string;
1252
- membershipLimit: number;
1253
- }>;
1254
- schema: {
1255
- organization: {
1256
- modelName: string;
1257
- fields: {
1258
- name: {
1259
- type: "string";
1260
- required: true;
1261
- sortable: true;
1262
- };
1263
- slug: {
1264
- type: "string";
1265
- required: true;
1266
- unique: true;
1267
- sortable: true;
1268
- };
1269
- logo: {
1270
- type: "string";
1271
- required: false;
1272
- };
1273
- createdAt: {
1274
- type: "date";
1275
- required: true;
1276
- };
1277
- updatedAt: {
1278
- type: "date";
1279
- required: false;
1280
- };
1281
- };
1282
- };
1283
- member: {
1284
- modelName: string;
1285
- fields: {
1286
- organizationId: {
1287
- type: "string";
1288
- required: true;
1289
- references: {
1290
- model: "organization";
1291
- field: "id";
1292
- };
1293
- };
1294
- userId: {
1295
- type: "string";
1296
- required: true;
1297
- references: {
1298
- model: "user";
1299
- field: "id";
1300
- };
1301
- };
1302
- role: {
1303
- type: "string";
1304
- required: true;
1305
- defaultValue: "member";
1306
- };
1307
- createdAt: {
1308
- type: "date";
1309
- required: true;
1310
- };
1311
- };
1312
- };
1313
- invitation: {
1314
- modelName: string;
1315
- fields: {
1316
- organizationId: {
1317
- type: "string";
1318
- required: true;
1319
- references: {
1320
- model: "organization";
1321
- field: "id";
1322
- };
1323
- };
1324
- email: {
1325
- type: "string";
1326
- required: true;
1327
- sortable: true;
1328
- };
1329
- role: {
1330
- type: "string";
1331
- required: true;
1332
- sortable: true;
1333
- };
1334
- status: {
1335
- type: "string";
1336
- required: true;
1337
- sortable: true;
1338
- defaultValue: "pending";
1339
- };
1340
- expiresAt: {
1341
- type: "date";
1342
- required: false;
1343
- };
1344
- createdAt: {
1345
- type: "date";
1346
- required: true;
1347
- defaultValue: Date;
1348
- };
1349
- inviterId: {
1350
- type: "string";
1351
- required: true;
1352
- references: {
1353
- model: "user";
1354
- field: "id";
1355
- };
1356
- };
1357
- };
1358
- };
1359
- session: {
1360
- fields: {
1361
- activeOrganizationId: {
1362
- type: "string";
1363
- required: false;
1364
- };
1365
- };
1366
- };
1367
- };
1368
- $Infer: {
1369
- Organization: {
1370
- id: string;
1371
- name: string;
1372
- slug: string;
1373
- createdAt: Date;
1374
- logo?: string | null | undefined;
1375
- metadata?: any;
1376
- };
1377
- Invitation: {
1378
- id: string;
1379
- organizationId: string;
1380
- email: string;
1381
- role: "admin" | "owner" | "member";
1382
- status: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).InvitationStatus;
1383
- inviterId: string;
1384
- expiresAt: Date;
1385
- createdAt: Date;
1386
- };
1387
- Member: {
1388
- id: string;
1389
- organizationId: string;
1390
- role: "admin" | "owner" | "member";
1391
- createdAt: Date;
1392
- userId: string;
1393
- user: {
1394
- id: string;
1395
- email: string;
1396
- name: string;
1397
- image?: string | undefined;
1398
- };
1399
- };
1400
- Team: any;
1401
- TeamMember: any;
1402
- ActiveOrganization: {
1403
- members: {
1404
- id: string;
1405
- organizationId: string;
1406
- role: "admin" | "owner" | "member";
1407
- createdAt: Date;
1408
- userId: string;
1409
- user: {
1410
- id: string;
1411
- email: string;
1412
- name: string;
1413
- image?: string | undefined;
1414
- };
1415
- }[];
1416
- invitations: {
1417
- id: string;
1418
- organizationId: string;
1419
- email: string;
1420
- role: "admin" | "owner" | "member";
1421
- status: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).InvitationStatus;
1422
- inviterId: string;
1423
- expiresAt: Date;
1424
- createdAt: Date;
1425
- }[];
1426
- } & {
1427
- id: string;
1428
- name: string;
1429
- slug: string;
1430
- createdAt: Date;
1431
- logo?: string | null | undefined;
1432
- metadata?: any;
1433
- };
1434
- };
1435
- $ERROR_CODES: {
1436
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
1437
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
1438
- readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
1439
- readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
1440
- readonly ORGANIZATION_NOT_FOUND: "Organization not found";
1441
- readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
1442
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
1443
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
1444
- readonly NO_ACTIVE_ORGANIZATION: "No active organization";
1445
- readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
1446
- readonly MEMBER_NOT_FOUND: "Member not found";
1447
- readonly ROLE_NOT_FOUND: "Role not found";
1448
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
1449
- readonly TEAM_ALREADY_EXISTS: "Team already exists";
1450
- readonly TEAM_NOT_FOUND: "Team not found";
1451
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
1452
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
1453
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
1454
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
1455
- readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
1456
- readonly INVITATION_NOT_FOUND: "Invitation not found";
1457
- readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
1458
- readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
1459
- readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
1460
- readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
1461
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
1462
- readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
1463
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
1464
- readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
1465
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
1466
- readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
1467
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
1468
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
1469
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
1470
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
1471
- readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
1472
- readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
1473
- readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
1474
- readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
1475
- readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
1476
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
1477
- readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
1478
- readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
1479
- readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
1480
- readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
1481
- readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
1482
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
1483
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
1484
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
1485
- readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
1486
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
1487
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
1488
- readonly TOO_MANY_ROLES: "This organization has too many roles";
1489
- readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
1490
- readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
1491
- readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
1492
- };
1493
- options: NoInfer<{
1494
- allowUserToCreateOrganization: true;
1495
- creatorRole: string;
1496
- membershipLimit: number;
1497
- }>;
1498
- }, {
1322
+ }, import("better-auth/plugins", { with: { "resolution-mode": "import" } }).DefaultOrganizationPlugin<{
1323
+ allowUserToCreateOrganization: true;
1324
+ creatorRole: string;
1325
+ membershipLimit: number;
1326
+ }>, {
1499
1327
  id: "api-key";
1500
1328
  $ERROR_CODES: {
1501
1329
  readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
@@ -1548,9 +1376,83 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1548
1376
  expiresAt: Date;
1549
1377
  };
1550
1378
  } | {
1551
- context: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions, import("better-auth", { with: { "resolution-mode": "import" } }).AuthContext & {
1379
+ context: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions, {
1552
1380
  returned?: unknown | undefined;
1553
1381
  responseHeaders?: Headers | undefined;
1382
+ } & import("better-auth", { with: { "resolution-mode": "import" } }).PluginContext & import("better-auth", { with: { "resolution-mode": "import" } }).InfoContext & {
1383
+ options: import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthOptions;
1384
+ appName: string;
1385
+ baseURL: string;
1386
+ trustedOrigins: string[];
1387
+ isTrustedOrigin: (url: string, settings?: {
1388
+ allowRelativePaths: boolean;
1389
+ }) => boolean;
1390
+ oauthConfig: {
1391
+ skipStateCookieCheck?: boolean | undefined;
1392
+ storeStateStrategy: "database" | "cookie";
1393
+ };
1394
+ newSession: {
1395
+ session: import("better-auth", { with: { "resolution-mode": "import" } }).Session & Record<string, any>;
1396
+ user: import("better-auth", { with: { "resolution-mode": "import" } }).User & Record<string, any>;
1397
+ } | null;
1398
+ session: {
1399
+ session: import("better-auth", { with: { "resolution-mode": "import" } }).Session & Record<string, any>;
1400
+ user: import("better-auth", { with: { "resolution-mode": "import" } }).User & Record<string, any>;
1401
+ } | null;
1402
+ setNewSession: (session: {
1403
+ session: import("better-auth", { with: { "resolution-mode": "import" } }).Session & Record<string, any>;
1404
+ user: import("better-auth", { with: { "resolution-mode": "import" } }).User & Record<string, any>;
1405
+ } | null) => void;
1406
+ socialProviders: import("better-auth", { with: { "resolution-mode": "import" } }).OAuthProvider[];
1407
+ authCookies: import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthCookies;
1408
+ logger: ReturnType<(options?: import("better-auth", { with: { "resolution-mode": "import" } }).Logger | undefined) => import("better-auth", { with: { "resolution-mode": "import" } }).InternalLogger>;
1409
+ rateLimit: {
1410
+ enabled: boolean;
1411
+ window: number;
1412
+ max: number;
1413
+ storage: "memory" | "database" | "secondary-storage";
1414
+ } & Omit<import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
1415
+ adapter: import("better-auth", { with: { "resolution-mode": "import" } }).DBAdapter<import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthOptions>;
1416
+ internalAdapter: import("better-auth", { with: { "resolution-mode": "import" } }).InternalAdapter<import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthOptions>;
1417
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth", { with: { "resolution-mode": "import" } }).CookieOptions> | undefined) => import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthCookie;
1418
+ secret: string;
1419
+ sessionConfig: {
1420
+ updateAge: number;
1421
+ expiresIn: number;
1422
+ freshAge: number;
1423
+ cookieRefreshCache: false | {
1424
+ enabled: true;
1425
+ updateAge: number;
1426
+ };
1427
+ };
1428
+ generateId: (options: {
1429
+ model: import("better-auth", { with: { "resolution-mode": "import" } }).ModelNames;
1430
+ size?: number | undefined;
1431
+ }) => string | false;
1432
+ secondaryStorage: import("better-auth", { with: { "resolution-mode": "import" } }).SecondaryStorage | undefined;
1433
+ password: {
1434
+ hash: (password: string) => Promise<string>;
1435
+ verify: (data: {
1436
+ password: string;
1437
+ hash: string;
1438
+ }) => Promise<boolean>;
1439
+ config: {
1440
+ minPasswordLength: number;
1441
+ maxPasswordLength: number;
1442
+ };
1443
+ checkPassword: (userId: string, ctx: import("better-auth", { with: { "resolution-mode": "import" } }).GenericEndpointContext<import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthOptions>) => Promise<boolean>;
1444
+ };
1445
+ tables: import("better-auth", { with: { "resolution-mode": "import" } }).BetterAuthDBSchema;
1446
+ runMigrations: () => Promise<void>;
1447
+ publishTelemetry: (event: {
1448
+ type: string;
1449
+ anonymousId?: string | undefined;
1450
+ payload: Record<string, any>;
1451
+ }) => Promise<void>;
1452
+ skipOriginCheck: boolean | string[];
1453
+ skipCSRFCheck: boolean;
1454
+ runInBackground: (promise: Promise<unknown>) => void;
1455
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth", { with: { "resolution-mode": "import" } }).Awaitable<unknown>;
1554
1456
  }>;
1555
1457
  }>;
1556
1458
  }[];
@@ -1891,6 +1793,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1891
1793
  };
1892
1794
  };
1893
1795
  }, {
1796
+ metadata: Record<string, any> | null;
1894
1797
  permissions: {
1895
1798
  [key: string]: string[];
1896
1799
  } | null;
@@ -1912,7 +1815,6 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1912
1815
  expiresAt: Date | null;
1913
1816
  createdAt: Date;
1914
1817
  updatedAt: Date;
1915
- metadata: Record<string, any> | null;
1916
1818
  }>;
1917
1819
  updateApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/update", {
1918
1820
  method: "POST";
@@ -2052,6 +1954,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2052
1954
  };
2053
1955
  };
2054
1956
  }, {
1957
+ metadata: Record<string, any> | null;
2055
1958
  permissions: {
2056
1959
  [key: string]: string[];
2057
1960
  } | null;
@@ -2073,7 +1976,6 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2073
1976
  expiresAt: Date | null;
2074
1977
  createdAt: Date;
2075
1978
  updatedAt: Date;
2076
- metadata: Record<string, any> | null;
2077
1979
  }>;
2078
1980
  deleteApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/delete", {
2079
1981
  method: "POST";
@@ -2295,6 +2197,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2295
2197
  };
2296
2198
  };
2297
2199
  }, {
2200
+ metadata: Record<string, any> | null;
2298
2201
  permissions: {
2299
2202
  [key: string]: string[];
2300
2203
  } | null;
@@ -2316,7 +2219,6 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2316
2219
  expiresAt: Date | null;
2317
2220
  createdAt: Date;
2318
2221
  updatedAt: Date;
2319
- metadata: Record<string, any> | null;
2320
2222
  }[]>;
2321
2223
  deleteAllExpiredApiKeys: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<string, {
2322
2224
  method: "POST";
@@ -2448,6 +2350,48 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2448
2350
  };
2449
2351
  };
2450
2352
  options: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).ApiKeyOptions | undefined;
2353
+ }, {
2354
+ id: "expo";
2355
+ init: (ctx: import("better-auth", { with: { "resolution-mode": "import" } }).AuthContext) => {
2356
+ options: {
2357
+ trustedOrigins: string[];
2358
+ };
2359
+ };
2360
+ onRequest(request: Request, ctx: import("better-auth", { with: { "resolution-mode": "import" } }).AuthContext): Promise<{
2361
+ request: Request;
2362
+ } | undefined>;
2363
+ hooks: {
2364
+ after: {
2365
+ matcher(context: import("better-auth", { with: { "resolution-mode": "import" } }).HookEndpointContext): boolean;
2366
+ handler: (inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<void>;
2367
+ }[];
2368
+ };
2369
+ endpoints: {
2370
+ expoAuthorizationProxy: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/expo-authorization-proxy", {
2371
+ method: "GET";
2372
+ query: import("better-auth", { with: { "resolution-mode": "import" } }).ZodObject<{
2373
+ authorizationURL: import("better-auth", { with: { "resolution-mode": "import" } }).ZodString;
2374
+ oauthState: import("better-auth", { with: { "resolution-mode": "import" } }).ZodOptional<import("better-auth", { with: { "resolution-mode": "import" } }).ZodString>;
2375
+ }, import("better-auth", { with: { "resolution-mode": "import" } }).$strip>;
2376
+ metadata: {
2377
+ readonly scope: "server";
2378
+ };
2379
+ }, {
2380
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | import("better-auth", { with: { "resolution-mode": "import" } }).Status;
2381
+ body: ({
2382
+ message?: string;
2383
+ code?: string;
2384
+ cause?: unknown;
2385
+ } & Record<string, any>) | undefined;
2386
+ headers: HeadersInit;
2387
+ statusCode: number;
2388
+ name: string;
2389
+ message: string;
2390
+ stack?: string;
2391
+ cause?: unknown;
2392
+ }>;
2393
+ };
2394
+ options: import("@better-auth/expo", { with: { "resolution-mode": "import" } }).ExpoOptions | undefined;
2451
2395
  }];
2452
2396
  databaseHooks: {
2453
2397
  user: {