@r2wa-org/eden 0.0.48

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