@archlast/server 0.1.8 → 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 (347) hide show
  1. package/README.md +104 -100
  2. package/dist/admin/auth.d.ts +24 -5
  3. package/dist/admin/auth.js +49 -25
  4. package/dist/admin/schema.d.ts +122 -32
  5. package/dist/admin/schema.js +131 -95
  6. package/dist/admin/seed.d.ts +1 -1
  7. package/dist/admin/seed.js +79 -47
  8. package/dist/auth/api-key-resolver.d.ts +1 -1
  9. package/dist/auth/api-key-resolver.js +7 -3
  10. package/dist/auth/archlast-auth-adapter.d.ts +2 -5
  11. package/dist/auth/archlast-auth-adapter.js +1 -1
  12. package/dist/auth/better-auth-adapter.d.ts.map +1 -1
  13. package/dist/auth/better-auth-adapter.js +41 -26
  14. package/dist/auth/better-auth-adapter.js.map +1 -1
  15. package/dist/auth/better-auth-admin.d.ts.map +1 -1
  16. package/dist/auth/better-auth-admin.js +1 -1
  17. package/dist/auth/better-auth-admin.js.map +1 -1
  18. package/dist/auth/better-auth-api-key-resolver.js +1 -1
  19. package/dist/auth/better-auth-api-key-resolver.js.map +1 -1
  20. package/dist/auth/better-auth-instance.d.ts +249 -301
  21. package/dist/auth/better-auth-instance.d.ts.map +1 -1
  22. package/dist/auth/better-auth-instance.js +11 -0
  23. package/dist/auth/better-auth-instance.js.map +1 -1
  24. package/dist/auth/better-auth-seed.d.ts +5 -2
  25. package/dist/auth/better-auth-seed.js +31 -22
  26. package/dist/auth/better-auth-session-adapter.d.ts.map +1 -1
  27. package/dist/auth/better-auth-session-adapter.js +14 -10
  28. package/dist/auth/better-auth-session-adapter.js.map +1 -1
  29. package/dist/auth/errors.d.ts.map +1 -1
  30. package/dist/auth/errors.js +11 -11
  31. package/dist/auth/errors.js.map +1 -1
  32. package/dist/auth/oauth-proxy.d.ts +5 -2
  33. package/dist/auth/oauth-proxy.js +23 -27
  34. package/dist/auth/resolver.d.ts.map +1 -1
  35. package/dist/auth/resolver.js.map +1 -1
  36. package/dist/auth/role-helpers.d.ts +1 -1
  37. package/dist/auth/role-helpers.d.ts.map +1 -1
  38. package/dist/auth/role-helpers.js.map +1 -1
  39. package/dist/auth/session-manager.d.ts +2 -5
  40. package/dist/auth/session-manager.js +16 -6
  41. package/dist/auth/system/better-auth-schema.d.ts.map +1 -1
  42. package/dist/auth/system/better-auth-schema.js +6 -23
  43. package/dist/auth/system/better-auth-schema.js.map +1 -1
  44. package/dist/cache/circuit-breaker.d.ts +81 -0
  45. package/dist/cache/circuit-breaker.d.ts.map +1 -0
  46. package/dist/cache/circuit-breaker.js +170 -0
  47. package/dist/cache/circuit-breaker.js.map +1 -0
  48. package/dist/cache/client.d.ts +6 -3
  49. package/dist/cache/client.d.ts.map +1 -1
  50. package/dist/cache/client.js +12 -53
  51. package/dist/cache/client.js.map +1 -1
  52. package/dist/cache/index.d.ts +2 -0
  53. package/dist/cache/index.d.ts.map +1 -1
  54. package/dist/cache/index.js +5 -1
  55. package/dist/cache/index.js.map +1 -1
  56. package/dist/cache/invalidation-queue.d.ts +63 -0
  57. package/dist/cache/invalidation-queue.d.ts.map +1 -0
  58. package/dist/cache/invalidation-queue.js +196 -0
  59. package/dist/cache/invalidation-queue.js.map +1 -0
  60. package/dist/cache/layers.d.ts +14 -4
  61. package/dist/cache/layers.d.ts.map +1 -1
  62. package/dist/cache/layers.js +66 -72
  63. package/dist/cache/layers.js.map +1 -1
  64. package/dist/cache/manager.d.ts.map +1 -1
  65. package/dist/cache/manager.js +6 -41
  66. package/dist/cache/manager.js.map +1 -1
  67. package/dist/cache/protocol.d.ts +4 -39
  68. package/dist/cache/protocol.d.ts.map +1 -1
  69. package/dist/cache/protocol.js.map +1 -1
  70. package/dist/cache/redis-adapter.d.ts +103 -0
  71. package/dist/cache/redis-adapter.d.ts.map +1 -0
  72. package/dist/cache/redis-adapter.js +424 -0
  73. package/dist/cache/redis-adapter.js.map +1 -0
  74. package/dist/cache/run-sidecar.js +10 -1
  75. package/dist/cache/run-sidecar.js.map +1 -1
  76. package/dist/cache/sidecar-server.d.ts +51 -1
  77. package/dist/cache/sidecar-server.d.ts.map +1 -1
  78. package/dist/cache/sidecar-server.js +368 -22
  79. package/dist/cache/sidecar-server.js.map +1 -1
  80. package/dist/cache/store.d.ts +43 -0
  81. package/dist/cache/store.d.ts.map +1 -1
  82. package/dist/cache/store.js +69 -76
  83. package/dist/cache/store.js.map +1 -1
  84. package/dist/cache/strategies.d.ts +2 -9
  85. package/dist/cache/strategies.d.ts.map +1 -1
  86. package/dist/cache/types.d.ts +130 -0
  87. package/dist/cache/types.d.ts.map +1 -0
  88. package/dist/cache/types.js +60 -0
  89. package/dist/cache/types.js.map +1 -0
  90. package/dist/config/bullmq.d.ts +16 -0
  91. package/dist/config/bullmq.d.ts.map +1 -0
  92. package/dist/config/bullmq.js +103 -0
  93. package/dist/config/bullmq.js.map +1 -0
  94. package/dist/config/index.d.ts +1 -0
  95. package/dist/config/index.d.ts.map +1 -1
  96. package/dist/config/index.js +1 -0
  97. package/dist/config/index.js.map +1 -1
  98. package/dist/config/schema.d.ts +80 -6
  99. package/dist/config/schema.d.ts.map +1 -1
  100. package/dist/config/schema.js +71 -6
  101. package/dist/config/schema.js.map +1 -1
  102. package/dist/config/service.d.ts +54 -4
  103. package/dist/config/service.d.ts.map +1 -1
  104. package/dist/config/service.js +56 -2
  105. package/dist/config/service.js.map +1 -1
  106. package/dist/controllers/admin/admin-tokens.controller.d.ts +131 -115
  107. package/dist/controllers/admin/admin-tokens.controller.js +117 -98
  108. package/dist/controllers/admin/api-keys.controller.d.ts +1 -1
  109. package/dist/controllers/admin/api-keys.controller.d.ts.map +1 -1
  110. package/dist/controllers/admin/api-keys.controller.js.map +1 -1
  111. package/dist/controllers/admin/app-users.controller.d.ts +274 -243
  112. package/dist/controllers/admin/app-users.controller.js +301 -257
  113. package/dist/controllers/admin/auth.controller.d.ts +260 -236
  114. package/dist/controllers/admin/auth.controller.js +197 -174
  115. package/dist/controllers/admin/backup.controller.d.ts.map +1 -1
  116. package/dist/controllers/admin/backup.controller.js.map +1 -1
  117. package/dist/controllers/admin/settings.controller.d.ts +1 -1
  118. package/dist/controllers/admin/storage-stats.controller.d.ts +63 -0
  119. package/dist/controllers/admin/storage-stats.controller.d.ts.map +1 -0
  120. package/dist/controllers/admin/storage-stats.controller.js +33 -0
  121. package/dist/controllers/admin/storage-stats.controller.js.map +1 -0
  122. package/dist/controllers/admin/tenants.controller.d.ts.map +1 -1
  123. package/dist/controllers/admin/tenants.controller.js.map +1 -1
  124. package/dist/controllers/admin/users.controller.d.ts +1 -1
  125. package/dist/controllers/admin/users.controller.d.ts.map +1 -1
  126. package/dist/controllers/admin/users.controller.js.map +1 -1
  127. package/dist/controllers/auth.controller.d.ts +289 -271
  128. package/dist/controllers/auth.controller.js +275 -226
  129. package/dist/controllers/crud-generator.controller.d.ts.map +1 -1
  130. package/dist/controllers/crud-generator.controller.js +127 -125
  131. package/dist/controllers/crud-generator.controller.js.map +1 -1
  132. package/dist/controllers/index.d.ts +1 -1
  133. package/dist/controllers/index.d.ts.map +1 -1
  134. package/dist/controllers/index.js.map +1 -1
  135. package/dist/controllers/introspection.controller.d.ts +642 -0
  136. package/dist/controllers/introspection.controller.d.ts.map +1 -1
  137. package/dist/controllers/introspection.controller.js +611 -0
  138. package/dist/controllers/introspection.controller.js.map +1 -1
  139. package/dist/controllers/invite.controller.d.ts +190 -170
  140. package/dist/controllers/invite.controller.js +183 -164
  141. package/dist/controllers/mfa.controller.d.ts +205 -183
  142. package/dist/controllers/mfa.controller.js +131 -111
  143. package/dist/controllers/otp.controller.d.ts +194 -171
  144. package/dist/controllers/otp.controller.js +192 -175
  145. package/dist/controllers/storage.controller.d.ts.map +1 -1
  146. package/dist/controllers/storage.controller.js.map +1 -1
  147. package/dist/controllers/system.controller.d.ts +5 -3
  148. package/dist/controllers/system.controller.d.ts.map +1 -1
  149. package/dist/controllers/system.controller.js +4 -2
  150. package/dist/controllers/system.controller.js.map +1 -1
  151. package/dist/controllers/tenant.controller.d.ts +258 -227
  152. package/dist/controllers/tenant.controller.js +224 -200
  153. package/dist/db/cachedclient.d.ts +6 -11
  154. package/dist/db/cachedclient.d.ts.map +1 -1
  155. package/dist/db/cachedclient.js +79 -43
  156. package/dist/db/cachedclient.js.map +1 -1
  157. package/dist/db/distributed-client.d.ts +79 -24
  158. package/dist/db/distributed-client.js +23 -24
  159. package/dist/db/factory.d.ts +3 -8
  160. package/dist/db/factory.d.ts.map +1 -1
  161. package/dist/db/factory.js +3 -22
  162. package/dist/db/factory.js.map +1 -1
  163. package/dist/db/socket-client.d.ts +7 -0
  164. package/dist/db/socket-client.d.ts.map +1 -1
  165. package/dist/db/socket-client.js +140 -11
  166. package/dist/db/socket-client.js.map +1 -1
  167. package/dist/deployment/handler.d.ts +10 -2
  168. package/dist/deployment/handler.d.ts.map +1 -1
  169. package/dist/deployment/handler.js +70 -15
  170. package/dist/deployment/handler.js.map +1 -1
  171. package/dist/deployment/persistence.d.ts.map +1 -1
  172. package/dist/deployment/persistence.js +6 -1
  173. package/dist/deployment/persistence.js.map +1 -1
  174. package/dist/docker/compose.d.ts.map +1 -1
  175. package/dist/docker/compose.js +76 -0
  176. package/dist/docker/compose.js.map +1 -1
  177. package/dist/engine/runner.d.ts.map +1 -1
  178. package/dist/engine/runner.js +0 -43
  179. package/dist/engine/runner.js.map +1 -1
  180. package/dist/functions/built-in/auth-apikey.d.ts.map +1 -1
  181. package/dist/functions/built-in/auth-apikey.js.map +1 -1
  182. package/dist/functions/built-in/system-cache.d.ts.map +1 -1
  183. package/dist/functions/built-in/system-cache.js +6 -31
  184. package/dist/functions/built-in/system-cache.js.map +1 -1
  185. package/dist/functions/built-in/system-data.d.ts.map +1 -1
  186. package/dist/functions/built-in/system-data.js +4 -2
  187. package/dist/functions/built-in/system-data.js.map +1 -1
  188. package/dist/functions/definition.d.ts.map +1 -1
  189. package/dist/functions/definition.js +6 -2
  190. package/dist/functions/definition.js.map +1 -1
  191. package/dist/http/routes/metrics.d.ts +42 -0
  192. package/dist/http/routes/metrics.d.ts.map +1 -0
  193. package/dist/http/routes/metrics.js +29 -0
  194. package/dist/http/routes/metrics.js.map +1 -0
  195. package/dist/http/server.d.ts +1 -0
  196. package/dist/http/server.d.ts.map +1 -1
  197. package/dist/http/server.js +41 -3
  198. package/dist/http/server.js.map +1 -1
  199. package/dist/ipc/socket-bridge.d.ts +1 -0
  200. package/dist/ipc/socket-bridge.d.ts.map +1 -1
  201. package/dist/ipc/socket-bridge.js +5 -1
  202. package/dist/ipc/socket-bridge.js.map +1 -1
  203. package/dist/jobs/bullmq-adapter.d.ts +154 -0
  204. package/dist/jobs/bullmq-adapter.d.ts.map +1 -0
  205. package/dist/jobs/bullmq-adapter.js +688 -0
  206. package/dist/jobs/bullmq-adapter.js.map +1 -0
  207. package/dist/jobs/bullmq-circuit-breaker.d.ts +133 -0
  208. package/dist/jobs/bullmq-circuit-breaker.d.ts.map +1 -0
  209. package/dist/jobs/bullmq-circuit-breaker.js +323 -0
  210. package/dist/jobs/bullmq-circuit-breaker.js.map +1 -0
  211. package/dist/jobs/bullmq-dlq-manager.d.ts +155 -0
  212. package/dist/jobs/bullmq-dlq-manager.d.ts.map +1 -0
  213. package/dist/jobs/bullmq-dlq-manager.js +325 -0
  214. package/dist/jobs/bullmq-dlq-manager.js.map +1 -0
  215. package/dist/jobs/bullmq-metrics.d.ts +104 -0
  216. package/dist/jobs/bullmq-metrics.d.ts.map +1 -0
  217. package/dist/jobs/bullmq-metrics.js +323 -0
  218. package/dist/jobs/bullmq-metrics.js.map +1 -0
  219. package/dist/jobs/bullmq-priority-service.d.ts +173 -0
  220. package/dist/jobs/bullmq-priority-service.d.ts.map +1 -0
  221. package/dist/jobs/bullmq-priority-service.js +390 -0
  222. package/dist/jobs/bullmq-priority-service.js.map +1 -0
  223. package/dist/jobs/bullmq-scheduler.d.ts +111 -0
  224. package/dist/jobs/bullmq-scheduler.d.ts.map +1 -0
  225. package/dist/jobs/bullmq-scheduler.js +300 -0
  226. package/dist/jobs/bullmq-scheduler.js.map +1 -0
  227. package/dist/jobs/bullmq-worker.d.ts +155 -0
  228. package/dist/jobs/bullmq-worker.d.ts.map +1 -0
  229. package/dist/jobs/bullmq-worker.js +651 -0
  230. package/dist/jobs/bullmq-worker.js.map +1 -0
  231. package/dist/jobs/circuit-breaker.d.ts +120 -0
  232. package/dist/jobs/circuit-breaker.d.ts.map +1 -0
  233. package/dist/jobs/circuit-breaker.js +262 -0
  234. package/dist/jobs/circuit-breaker.js.map +1 -0
  235. package/dist/jobs/index.d.ts +1 -1
  236. package/dist/jobs/index.d.ts.map +1 -1
  237. package/dist/jobs/index.js.map +1 -1
  238. package/dist/jobs/queue.d.ts +120 -1
  239. package/dist/jobs/queue.d.ts.map +1 -1
  240. package/dist/jobs/queue.js +487 -9
  241. package/dist/jobs/queue.js.map +1 -1
  242. package/dist/jobs/redis-connection.d.ts +50 -0
  243. package/dist/jobs/redis-connection.d.ts.map +1 -0
  244. package/dist/jobs/redis-connection.js +123 -0
  245. package/dist/jobs/redis-connection.js.map +1 -0
  246. package/dist/jobs/run-scheduler.js +163 -10
  247. package/dist/jobs/run-scheduler.js.map +1 -1
  248. package/dist/jobs/run-worker.js +101 -9
  249. package/dist/jobs/run-worker.js.map +1 -1
  250. package/dist/jobs/worker-thread.d.ts +6 -0
  251. package/dist/jobs/worker-thread.d.ts.map +1 -1
  252. package/dist/jobs/worker-thread.js +37 -8
  253. package/dist/jobs/worker-thread.js.map +1 -1
  254. package/dist/jobs/worker.d.ts +33 -0
  255. package/dist/jobs/worker.d.ts.map +1 -1
  256. package/dist/jobs/worker.js +358 -115
  257. package/dist/jobs/worker.js.map +1 -1
  258. package/dist/linq/async-enumerable.d.ts.map +1 -1
  259. package/dist/linq/async-enumerable.js.map +1 -1
  260. package/dist/linq/enumerable.d.ts.map +1 -1
  261. package/dist/linq/enumerable.js +10 -10
  262. package/dist/linq/enumerable.js.map +1 -1
  263. package/dist/metrics/collector.d.ts +26 -0
  264. package/dist/metrics/collector.d.ts.map +1 -0
  265. package/dist/metrics/collector.js +103 -0
  266. package/dist/metrics/collector.js.map +1 -0
  267. package/dist/polling/updates.controller.d.ts +57 -0
  268. package/dist/polling/updates.controller.d.ts.map +1 -0
  269. package/dist/polling/updates.controller.js +70 -0
  270. package/dist/polling/updates.controller.js.map +1 -0
  271. package/dist/repository/db-set.d.ts.map +1 -1
  272. package/dist/repository/db-set.js +12 -8
  273. package/dist/repository/db-set.js.map +1 -1
  274. package/dist/repository/ef-core.d.ts.map +1 -1
  275. package/dist/repository/ef-core.js +6 -6
  276. package/dist/repository/ef-core.js.map +1 -1
  277. package/dist/repository/factory.d.ts +1 -1
  278. package/dist/repository/factory.d.ts.map +1 -1
  279. package/dist/repository/factory.js.map +1 -1
  280. package/dist/repository/interfaces.d.ts.map +1 -1
  281. package/dist/repository/interfaces.js.map +1 -1
  282. package/dist/repository/queryable.d.ts.map +1 -1
  283. package/dist/repository/queryable.js.map +1 -1
  284. package/dist/rpc/adapter.d.ts.map +1 -1
  285. package/dist/rpc/adapter.js.map +1 -1
  286. package/dist/rpc/router.d.ts +2 -2
  287. package/dist/rpc/router.d.ts.map +1 -1
  288. package/dist/rpc/router.js +1 -1
  289. package/dist/rpc/router.js.map +1 -1
  290. package/dist/schema/relationship-types.d.ts +7 -2
  291. package/dist/schema/relationship-types.js +1 -1
  292. package/dist/schema/types.d.ts.map +1 -1
  293. package/dist/services/admin/app-users.service.d.ts +1 -1
  294. package/dist/services/admin/app-users.service.js +31 -38
  295. package/dist/services/admin/auth.service.d.ts +1 -1
  296. package/dist/services/admin/auth.service.js +11 -5
  297. package/dist/services/admin/backup/BackupOrchestrator.d.ts.map +1 -1
  298. package/dist/services/admin/backup/BackupOrchestrator.js +4 -7
  299. package/dist/services/admin/backup/BackupOrchestrator.js.map +1 -1
  300. package/dist/services/admin/backup/SqliteGenerator.js +8 -8
  301. package/dist/services/admin/backup/StorageStreamer.d.ts +3 -3
  302. package/dist/services/admin/backup/StorageStreamer.d.ts.map +1 -1
  303. package/dist/services/admin/backup/StorageStreamer.js +16 -55
  304. package/dist/services/admin/backup/StorageStreamer.js.map +1 -1
  305. package/dist/services/admin/backup/ZipComposer.d.ts +2 -0
  306. package/dist/services/admin/backup/ZipComposer.d.ts.map +1 -1
  307. package/dist/services/admin/backup/ZipComposer.js +23 -0
  308. package/dist/services/admin/backup/ZipComposer.js.map +1 -1
  309. package/dist/services/admin/backup.service.d.ts.map +1 -1
  310. package/dist/services/admin/backup.service.js.map +1 -1
  311. package/dist/services/admin/data.service.d.ts.map +1 -1
  312. package/dist/services/admin/data.service.js +287 -286
  313. package/dist/services/admin/data.service.js.map +1 -1
  314. package/dist/services/admin/tenants.service.d.ts.map +1 -1
  315. package/dist/services/admin/tenants.service.js.map +1 -1
  316. package/dist/services/auth.service.d.ts +2 -3
  317. package/dist/services/auth.service.js +16 -16
  318. package/dist/services/invite.service.d.ts +1 -1
  319. package/dist/services/invite.service.js +17 -15
  320. package/dist/services/storage.service.d.ts.map +1 -1
  321. package/dist/services/storage.service.js +35 -4
  322. package/dist/services/storage.service.js.map +1 -1
  323. package/dist/services/system.service.d.ts.map +1 -1
  324. package/dist/services/system.service.js +1 -1
  325. package/dist/services/system.service.js.map +1 -1
  326. package/dist/services/tenant.service.d.ts +1 -1
  327. package/dist/services/tenant.service.js +43 -31
  328. package/dist/sse/subscriptions.controller.d.ts +57 -0
  329. package/dist/sse/subscriptions.controller.d.ts.map +1 -0
  330. package/dist/sse/subscriptions.controller.js +127 -0
  331. package/dist/sse/subscriptions.controller.js.map +1 -0
  332. package/dist/startup/bootstrap.d.ts +13 -2
  333. package/dist/startup/bootstrap.d.ts.map +1 -1
  334. package/dist/startup/bootstrap.js +85 -13
  335. package/dist/startup/bootstrap.js.map +1 -1
  336. package/dist/storage/s3-backend.d.ts.map +1 -1
  337. package/dist/storage/s3-backend.js +3 -3
  338. package/dist/storage/s3-backend.js.map +1 -1
  339. package/dist/websocket/server.d.ts.map +1 -1
  340. package/dist/websocket/server.js +14 -3
  341. package/dist/websocket/server.js.map +1 -1
  342. package/docker/README.md +309 -11
  343. package/package.json +214 -210
  344. package/templates/.env.example +115 -55
  345. package/templates/archlast.config.js +51 -37
  346. package/templates/docker-compose.prod.yml +32 -15
  347. package/templates/docker-compose.yml +117 -33
@@ -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";
@@ -1038,13 +1032,11 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1038
1032
  image?: string | null | undefined;
1039
1033
  }> & Record<string, unknown>, context: import("better-auth", { with: { "resolution-mode": "import" } }).GenericEndpointContext | null): Promise<{
1040
1034
  data: {
1041
- displayUsername
1042
- /**
1043
- * Default expiration time for API keys (in milliseconds)
1044
- */
1045
- ?: string | undefined;
1035
+ displayUsername?: string | undefined;
1046
1036
  username?: string | undefined;
1047
- id?: string | undefined;
1037
+ id? /**
1038
+ * Minimum expiration time (in days)
1039
+ */: string | undefined;
1048
1040
  createdAt?: Date | undefined;
1049
1041
  updatedAt?: Date | undefined;
1050
1042
  email?: string | undefined;
@@ -1114,14 +1106,15 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1114
1106
  token: string;
1115
1107
  user: {
1116
1108
  id: string;
1109
+ createdAt: Date;
1110
+ updatedAt: Date;
1117
1111
  email: string;
1118
1112
  emailVerified: boolean;
1113
+ name: string;
1114
+ image?: string | null | undefined;
1115
+ } & {
1119
1116
  username: string;
1120
1117
  displayUsername: string;
1121
- name: string;
1122
- image: string | null | undefined;
1123
- createdAt: Date;
1124
- updatedAt: Date;
1125
1118
  };
1126
1119
  } | null>;
1127
1120
  isUsernameAvailable: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/is-username-available", {
@@ -1205,15 +1198,98 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1205
1198
  };
1206
1199
  }, {
1207
1200
  token: string;
1208
- user: {
1201
+ user: Record<string, any> & {
1209
1202
  id: string;
1203
+ createdAt: Date;
1204
+ updatedAt: Date;
1210
1205
  email: string;
1211
1206
  emailVerified: boolean;
1212
1207
  name: string;
1213
- createdAt: Date;
1214
- updatedAt: Date;
1208
+ image?: string | null | undefined;
1215
1209
  };
1216
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
+ }>;
1217
1293
  };
1218
1294
  hooks: {
1219
1295
  after: {
@@ -1221,7 +1297,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1221
1297
  handler: (inputContext: import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareInputContext<import("better-auth", { with: { "resolution-mode": "import" } }).MiddlewareOptions>) => Promise<void>;
1222
1298
  }[];
1223
1299
  };
1224
- 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;
1225
1301
  schema: {
1226
1302
  user: {
1227
1303
  fields: {
@@ -1239,259 +1315,15 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1239
1315
  readonly FAILED_TO_CREATE_USER: "Failed to create user";
1240
1316
  readonly COULD_NOT_CREATE_SESSION: "Could not create session";
1241
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";
1242
1321
  };
1243
- }, {
1244
- id: "organization";
1245
- endpoints: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).OrganizationEndpoints<{
1246
- allowUserToCreateOrganization: true;
1247
- creatorRole: string;
1248
- membershipLimit: number;
1249
- }>;
1250
- schema: {
1251
- organization: {
1252
- modelName: string;
1253
- fields: {
1254
- name: {
1255
- type: "string";
1256
- required: true;
1257
- sortable: true;
1258
- };
1259
- slug: {
1260
- type: "string";
1261
- required: true;
1262
- unique: true;
1263
- sortable: true;
1264
- };
1265
- logo: {
1266
- type: "string";
1267
- required: false;
1268
- };
1269
- createdAt: {
1270
- type: "date";
1271
- required: true;
1272
- };
1273
- updatedAt: {
1274
- type: "date";
1275
- required: false;
1276
- };
1277
- };
1278
- };
1279
- member: {
1280
- modelName: string;
1281
- fields: {
1282
- organizationId: {
1283
- type: "string";
1284
- required: true;
1285
- references: {
1286
- model: "organization";
1287
- field: "id";
1288
- };
1289
- };
1290
- userId: {
1291
- type: "string";
1292
- required: true;
1293
- references: {
1294
- model: "user";
1295
- field: "id";
1296
- };
1297
- };
1298
- role: {
1299
- type: "string";
1300
- required: true;
1301
- defaultValue: "member";
1302
- };
1303
- createdAt: {
1304
- type: "date";
1305
- required: true;
1306
- };
1307
- };
1308
- };
1309
- invitation: {
1310
- modelName: string;
1311
- fields: {
1312
- organizationId: {
1313
- type: "string";
1314
- required: true;
1315
- references: {
1316
- model: "organization";
1317
- field: "id";
1318
- };
1319
- };
1320
- email: {
1321
- type: "string";
1322
- required: true;
1323
- sortable: true;
1324
- };
1325
- role: {
1326
- type: "string";
1327
- required: true;
1328
- sortable: true;
1329
- };
1330
- status: {
1331
- type: "string";
1332
- required: true;
1333
- sortable: true;
1334
- defaultValue: "pending";
1335
- };
1336
- expiresAt: {
1337
- type: "date";
1338
- required: false;
1339
- };
1340
- createdAt: {
1341
- type: "date";
1342
- required: true;
1343
- defaultValue: Date;
1344
- };
1345
- inviterId: {
1346
- type: "string";
1347
- required: true;
1348
- references: {
1349
- model: "user";
1350
- field: "id";
1351
- };
1352
- };
1353
- };
1354
- };
1355
- session: {
1356
- fields: {
1357
- activeOrganizationId: {
1358
- type: "string";
1359
- required: false;
1360
- };
1361
- };
1362
- };
1363
- };
1364
- $Infer: {
1365
- Organization: {
1366
- id: string;
1367
- name: string;
1368
- slug: string;
1369
- createdAt: Date;
1370
- logo?: string | null | undefined;
1371
- metadata?: any;
1372
- };
1373
- Invitation: {
1374
- id: string;
1375
- organizationId: string;
1376
- email: string;
1377
- role: "admin" | "owner" | "member";
1378
- status: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).InvitationStatus;
1379
- inviterId: string;
1380
- expiresAt: Date;
1381
- createdAt: Date;
1382
- };
1383
- Member: {
1384
- id: string;
1385
- organizationId: string;
1386
- role: "admin" | "owner" | "member";
1387
- createdAt: Date;
1388
- userId: string;
1389
- user: {
1390
- id: string;
1391
- email: string;
1392
- name: string;
1393
- image?: string | undefined;
1394
- };
1395
- };
1396
- Team: any;
1397
- TeamMember: any;
1398
- ActiveOrganization: {
1399
- members: {
1400
- id: string;
1401
- organizationId: string;
1402
- role: "admin" | "owner" | "member";
1403
- createdAt: Date;
1404
- userId: string;
1405
- user: {
1406
- id: string;
1407
- email: string;
1408
- name: string;
1409
- image?: string | undefined;
1410
- };
1411
- }[];
1412
- invitations: {
1413
- id: string;
1414
- organizationId: string;
1415
- email: string;
1416
- role: "admin" | "owner" | "member";
1417
- status: import("better-auth/plugins", { with: { "resolution-mode": "import" } }).InvitationStatus;
1418
- inviterId: string;
1419
- expiresAt: Date;
1420
- createdAt: Date;
1421
- }[];
1422
- } & {
1423
- id: string;
1424
- name: string;
1425
- slug: string;
1426
- createdAt: Date;
1427
- logo?: string | null | undefined;
1428
- metadata?: any;
1429
- };
1430
- };
1431
- $ERROR_CODES: {
1432
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
1433
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
1434
- readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
1435
- readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
1436
- readonly ORGANIZATION_NOT_FOUND: "Organization not found";
1437
- readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
1438
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
1439
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
1440
- readonly NO_ACTIVE_ORGANIZATION: "No active organization";
1441
- readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
1442
- readonly MEMBER_NOT_FOUND: "Member not found";
1443
- readonly ROLE_NOT_FOUND: "Role not found";
1444
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
1445
- readonly TEAM_ALREADY_EXISTS: "Team already exists";
1446
- readonly TEAM_NOT_FOUND: "Team not found";
1447
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
1448
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
1449
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
1450
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
1451
- readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
1452
- readonly INVITATION_NOT_FOUND: "Invitation not found";
1453
- readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
1454
- readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
1455
- readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
1456
- readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
1457
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
1458
- readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
1459
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
1460
- readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
1461
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
1462
- readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
1463
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
1464
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
1465
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
1466
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
1467
- readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
1468
- readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
1469
- readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
1470
- readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
1471
- readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
1472
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
1473
- readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
1474
- readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
1475
- readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
1476
- readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
1477
- readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
1478
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
1479
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
1480
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
1481
- readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
1482
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
1483
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
1484
- readonly TOO_MANY_ROLES: "This organization has too many roles";
1485
- readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
1486
- readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
1487
- readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
1488
- };
1489
- options: NoInfer<{
1490
- allowUserToCreateOrganization: true;
1491
- creatorRole: string;
1492
- membershipLimit: number;
1493
- }>;
1494
- }, {
1322
+ }, import("better-auth/plugins", { with: { "resolution-mode": "import" } }).DefaultOrganizationPlugin<{
1323
+ allowUserToCreateOrganization: true;
1324
+ creatorRole: string;
1325
+ membershipLimit: number;
1326
+ }>, {
1495
1327
  id: "api-key";
1496
1328
  $ERROR_CODES: {
1497
1329
  readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
@@ -1544,9 +1376,83 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1544
1376
  expiresAt: Date;
1545
1377
  };
1546
1378
  } | {
1547
- 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, {
1548
1380
  returned?: unknown | undefined;
1549
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>;
1550
1456
  }>;
1551
1457
  }>;
1552
1458
  }[];
@@ -1887,6 +1793,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1887
1793
  };
1888
1794
  };
1889
1795
  }, {
1796
+ metadata: Record<string, any> | null;
1890
1797
  permissions: {
1891
1798
  [key: string]: string[];
1892
1799
  } | null;
@@ -1908,7 +1815,6 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
1908
1815
  expiresAt: Date | null;
1909
1816
  createdAt: Date;
1910
1817
  updatedAt: Date;
1911
- metadata: Record<string, any> | null;
1912
1818
  }>;
1913
1819
  updateApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/update", {
1914
1820
  method: "POST";
@@ -2048,6 +1954,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2048
1954
  };
2049
1955
  };
2050
1956
  }, {
1957
+ metadata: Record<string, any> | null;
2051
1958
  permissions: {
2052
1959
  [key: string]: string[];
2053
1960
  } | null;
@@ -2069,7 +1976,6 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2069
1976
  expiresAt: Date | null;
2070
1977
  createdAt: Date;
2071
1978
  updatedAt: Date;
2072
- metadata: Record<string, any> | null;
2073
1979
  }>;
2074
1980
  deleteApiKey: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<"/api-key/delete", {
2075
1981
  method: "POST";
@@ -2291,6 +2197,7 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2291
2197
  };
2292
2198
  };
2293
2199
  }, {
2200
+ metadata: Record<string, any> | null;
2294
2201
  permissions: {
2295
2202
  [key: string]: string[];
2296
2203
  } | null;
@@ -2312,7 +2219,6 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2312
2219
  expiresAt: Date | null;
2313
2220
  createdAt: Date;
2314
2221
  updatedAt: Date;
2315
- metadata: Record<string, any> | null;
2316
2222
  }[]>;
2317
2223
  deleteAllExpiredApiKeys: import("better-auth", { with: { "resolution-mode": "import" } }).StrictEndpoint<string, {
2318
2224
  method: "POST";
@@ -2444,6 +2350,48 @@ export declare function createBetterAuthInstance(userOptions: BetterAuthInstance
2444
2350
  };
2445
2351
  };
2446
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;
2447
2395
  }];
2448
2396
  databaseHooks: {
2449
2397
  user: {