@r2wa-org/eden 0.0.56 → 0.0.59

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 (151) hide show
  1. package/dist/src/admin/admin/dto.schemas.d.ts +3 -54
  2. package/dist/src/admin/admin/router.d.ts +10 -12
  3. package/dist/src/admin/admin/service.d.ts +0 -2
  4. package/dist/src/admin/index.d.ts +1043 -54
  5. package/dist/src/asset/admin/dto.schemas.d.ts +49 -26
  6. package/dist/src/asset/admin/router.d.ts +123 -20
  7. package/dist/src/asset/admin/service.d.ts +52 -4
  8. package/dist/src/asset/user/dto.schemas.d.ts +16 -98
  9. package/dist/src/asset/user/router.d.ts +69 -75
  10. package/dist/src/asset/user/service.d.ts +42 -42
  11. package/dist/src/asset-convert-product/admin/dto.schemas.d.ts +459 -566
  12. package/dist/src/asset-convert-product/admin/router.d.ts +564 -22
  13. package/dist/src/asset-convert-product/admin/service.d.ts +419 -12
  14. package/dist/src/asset-convert-product/errors/index.d.ts +7 -0
  15. package/dist/src/asset-convert-product/errors/locales/zh.d.ts +7 -0
  16. package/dist/src/asset-convert-product/permissions.d.ts +2 -2
  17. package/dist/src/asset-convert-product/user/router.d.ts +8 -8
  18. package/dist/src/asset-price/admin/dto.schemas.d.ts +99 -352
  19. package/dist/src/asset-price/admin/router.d.ts +125 -10
  20. package/dist/src/asset-price/admin/service.d.ts +157 -0
  21. package/dist/src/asset-price/errors/index.d.ts +3 -0
  22. package/dist/src/asset-price/errors/locales/zh.d.ts +3 -0
  23. package/dist/src/asset-price/internal/service.d.ts +1 -0
  24. package/dist/src/asset-price/user/dto.schemas.d.ts +7 -3
  25. package/dist/src/asset-price/user/router.d.ts +51 -10
  26. package/dist/src/asset-price/user/service.d.ts +13 -1
  27. package/dist/src/asset-type/admin/dto.schemas.d.ts +291 -33
  28. package/dist/src/asset-type/admin/router.d.ts +60 -18
  29. package/dist/src/asset-type/admin/service.d.ts +16 -6
  30. package/dist/src/asset-type/db.schemas.d.ts +6 -6
  31. package/dist/src/asset-type/errors/index.d.ts +6 -0
  32. package/dist/src/asset-type/errors/locales/zh.d.ts +3 -0
  33. package/dist/src/asset-type/internal/service.d.ts +4 -4
  34. package/dist/src/asset-type/permissions.d.ts +1 -1
  35. package/dist/src/asset-type/schema.d.ts +3 -5
  36. package/dist/src/asset-type/user/dto.schemas.d.ts +3 -15
  37. package/dist/src/asset-type/user/router.d.ts +10 -10
  38. package/dist/src/asset-type/user/service.d.ts +1 -1
  39. package/dist/src/auth/better-auth.d.ts +706 -451
  40. package/dist/src/auth/db.schemas.d.ts +27 -407
  41. package/dist/src/auth/permissions.d.ts +20 -20
  42. package/dist/src/auth/roles.d.ts +60 -60
  43. package/dist/src/auth/router.d.ts +6 -6
  44. package/dist/src/auth/schema.d.ts +8 -206
  45. package/dist/src/bank-account/admin/router.d.ts +10 -10
  46. package/dist/src/bank-account/user/router.d.ts +6 -6
  47. package/dist/src/check-in/admin/dto.schemas.d.ts +1 -18
  48. package/dist/src/check-in/admin/router.d.ts +10 -11
  49. package/dist/src/check-in/admin/service.d.ts +0 -1
  50. package/dist/src/check-in/internal/service.d.ts +0 -1
  51. package/dist/src/check-in/user/dto.schemas.d.ts +1 -18
  52. package/dist/src/check-in/user/router.d.ts +8 -9
  53. package/dist/src/check-in/user/service.d.ts +0 -1
  54. package/dist/src/deposit/admin/dto.schemas.d.ts +8 -42
  55. package/dist/src/deposit/admin/router.d.ts +10 -11
  56. package/dist/src/deposit/admin/service.d.ts +0 -2
  57. package/dist/src/deposit/user/dto.schemas.d.ts +8 -42
  58. package/dist/src/deposit/user/router.d.ts +8 -9
  59. package/dist/src/deposit/user/service.d.ts +0 -2
  60. package/dist/src/dynamic-env/admin.router.d.ts +10 -10
  61. package/dist/src/env/server.d.ts +1 -1
  62. package/dist/src/file-storage/admin/router.d.ts +10 -10
  63. package/dist/src/file-storage/share/router.d.ts +8 -8
  64. package/dist/src/file-storage/user/router.d.ts +8 -8
  65. package/dist/src/index.d.ts +1578 -352
  66. package/dist/src/ledger/admin/router.d.ts +10 -10
  67. package/dist/src/ledger/user/router.d.ts +8 -8
  68. package/dist/src/ledger-account/admin/dto.schemas.d.ts +2 -2
  69. package/dist/src/ledger-account/admin/router.d.ts +11 -11
  70. package/dist/src/ledger-account/user/dto.schemas.d.ts +39 -193
  71. package/dist/src/ledger-account/user/router.d.ts +51 -50
  72. package/dist/src/ledger-account/user/service.d.ts +41 -41
  73. package/dist/src/ledger-account-import/admin/router.d.ts +10 -10
  74. package/dist/src/ledger-account-transfer/user/router.d.ts +8 -8
  75. package/dist/src/ledger-account-type/admin/router.d.ts +10 -10
  76. package/dist/src/ledger-account-type/user/router.d.ts +56 -8
  77. package/dist/src/ledger-account-type/user/service.d.ts +25 -0
  78. package/dist/src/market-data/admin/router.d.ts +10 -10
  79. package/dist/src/market-data/user/router.d.ts +8 -8
  80. package/dist/src/market-pricing/admin/router.d.ts +10 -10
  81. package/dist/src/news/admin/dto.schemas.d.ts +6 -6
  82. package/dist/src/news/admin/router.d.ts +10 -10
  83. package/dist/src/news/user/dto.schemas.d.ts +12 -12
  84. package/dist/src/news/user/router.d.ts +8 -8
  85. package/dist/src/news-category/user/router.d.ts +6 -6
  86. package/dist/src/notification/admin/dto.schemas.d.ts +3 -3
  87. package/dist/src/notification/admin/router.d.ts +10 -10
  88. package/dist/src/notification/user/dto.schemas.d.ts +2 -2
  89. package/dist/src/notification/user/router.d.ts +8 -8
  90. package/dist/src/portfolio/index.d.ts +2 -0
  91. package/dist/src/portfolio/internal/index.d.ts +1 -0
  92. package/dist/src/portfolio/internal/service.d.ts +5 -0
  93. package/dist/src/portfolio/user/dto.schemas.d.ts +352 -0
  94. package/dist/src/portfolio/user/index.d.ts +3 -0
  95. package/dist/src/portfolio/user/router.d.ts +659 -0
  96. package/dist/src/portfolio/user/service.d.ts +143 -0
  97. package/dist/src/receipt-method/admin/router.d.ts +10 -10
  98. package/dist/src/receipt-method/user/router.d.ts +6 -6
  99. package/dist/src/referral/admin/dto.schemas.d.ts +2 -36
  100. package/dist/src/referral/admin/router.d.ts +10 -11
  101. package/dist/src/referral/user/dto.schemas.d.ts +2 -36
  102. package/dist/src/referral/user/router.d.ts +8 -9
  103. package/dist/src/referral-depth-config/admin/router.d.ts +10 -10
  104. package/dist/src/server-test/index.d.ts +6 -6
  105. package/dist/src/shipping-address/admin/router.d.ts +10 -10
  106. package/dist/src/shipping-address/user/router.d.ts +6 -6
  107. package/dist/src/team/admin/dto.schemas.d.ts +2 -36
  108. package/dist/src/team/admin/router.d.ts +10 -11
  109. package/dist/src/team/user/dto.schemas.d.ts +5 -90
  110. package/dist/src/team/user/router.d.ts +8 -11
  111. package/dist/src/trade-market/admin/dto.schemas.d.ts +1 -1
  112. package/dist/src/trade-market/admin/router.d.ts +10 -10
  113. package/dist/src/trade-market/user/router.d.ts +8 -8
  114. package/dist/src/transfer/admin/router.d.ts +10 -10
  115. package/dist/src/transfer/admin/service.d.ts +0 -2
  116. package/dist/src/transfer/user/router.d.ts +8 -8
  117. package/dist/src/transfer/user/service.d.ts +0 -2
  118. package/dist/src/user/admin/dto.schemas.d.ts +1 -21
  119. package/dist/src/user/admin/router.d.ts +10 -15
  120. package/dist/src/user/admin/service.d.ts +0 -4
  121. package/dist/src/user/user/router.d.ts +6 -8
  122. package/dist/src/user/user/service.d.ts +0 -2
  123. package/dist/src/user-kyc/admin/dto.schemas.d.ts +1 -1
  124. package/dist/src/user-kyc/admin/router.d.ts +10 -10
  125. package/dist/src/user-kyc/user/router.d.ts +8 -8
  126. package/dist/src/user-security/admin/router.d.ts +10 -10
  127. package/dist/src/user-security/user/router.d.ts +8 -8
  128. package/dist/src/wallet/admin/dto.schemas.d.ts +35 -3
  129. package/dist/src/wallet/admin/router.d.ts +75 -10
  130. package/dist/src/wallet/admin/service.d.ts +46 -8
  131. package/dist/src/wallet/internal/service.d.ts +118 -14
  132. package/dist/src/wallet/user/dto.schemas.d.ts +6 -66
  133. package/dist/src/wallet/user/router.d.ts +9 -69
  134. package/dist/src/wallet/user/service.d.ts +20 -46
  135. package/dist/src/wallet-type/admin/dto.schemas.d.ts +4 -0
  136. package/dist/src/wallet-type/admin/router.d.ts +143 -10
  137. package/dist/src/wallet-type/admin/service.d.ts +51 -0
  138. package/dist/src/wallet-type/errors/index.d.ts +4 -0
  139. package/dist/src/wallet-type/errors/locales/zh.d.ts +4 -0
  140. package/dist/src/wallet-type/internal/service.d.ts +37 -0
  141. package/dist/src/wallet-type/user/router.d.ts +8 -8
  142. package/dist/src/welfare-cycle/admin/dto.schemas.d.ts +3 -3
  143. package/dist/src/welfare-cycle/admin/router.d.ts +10 -10
  144. package/dist/src/welfare-cycle/user/dto.schemas.d.ts +1 -0
  145. package/dist/src/welfare-cycle/user/router.d.ts +51 -56
  146. package/dist/src/welfare-cycle/user/service.d.ts +1 -1
  147. package/dist/src/withdraw/admin/router.d.ts +10 -10
  148. package/dist/src/withdraw/user/dto.schemas.d.ts +7 -0
  149. package/dist/src/withdraw/user/router.d.ts +55 -8
  150. package/dist/src/withdraw/user/service.d.ts +20 -1
  151. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- import { createAuthMiddleware } from "better-auth/plugins";
2
1
  import * as roles from "./roles";
3
2
  /**
4
3
  * 显式类型注解绕过 TS2742(AnonymousOptions 未从 better-auth/plugins 公共入口导出)
@@ -35,7 +34,7 @@ export declare const auth: import("better-auth").Auth<{
35
34
  };
36
35
  };
37
36
  hooks: {
38
- before: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
37
+ before: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
39
38
  };
40
39
  emailAndPassword: {
41
40
  enabled: true;
@@ -74,19 +73,43 @@ export declare const auth: import("better-auth").Auth<{
74
73
  disablePaths: string[];
75
74
  appName: string;
76
75
  plugins: [{
77
- id: string;
76
+ id: "i18n";
77
+ version: string;
78
78
  hooks: {
79
- after: Array<{
80
- matcher: (ctx: any) => boolean;
81
- handler: ReturnType<typeof createAuthMiddleware>;
82
- }>;
79
+ after: {
80
+ matcher: () => true;
81
+ handler: (inputContext: {
82
+ body?: undefined;
83
+ } & {
84
+ query?: Record<string, any> | undefined;
85
+ } & {
86
+ request?: Request;
87
+ } & {
88
+ headers?: HeadersInit;
89
+ } & {
90
+ asResponse?: boolean;
91
+ returnHeaders?: boolean;
92
+ use?: any[];
93
+ }) => Promise<void>;
94
+ }[];
95
+ };
96
+ options: {
97
+ translations: {
98
+ [x: string]: import("@better-auth/i18n").TranslationDictionary;
99
+ };
100
+ defaultLocale: string;
101
+ detection: import("@better-auth/i18n").LocaleDetectionStrategy[];
102
+ localeCookie: string;
103
+ userLocaleField: string;
104
+ getLocale?: ((ctx: import("better-auth").GenericEndpointContext) => string | Promise<string | null> | null) | undefined;
83
105
  };
84
106
  }, {
85
107
  id: "bearer";
108
+ version: string;
86
109
  hooks: {
87
110
  before: {
88
111
  matcher(context: import("better-auth").HookEndpointContext): boolean;
89
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
112
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
90
113
  context: {
91
114
  headers: Headers;
92
115
  };
@@ -94,20 +117,24 @@ export declare const auth: import("better-auth").Auth<{
94
117
  }[];
95
118
  after: {
96
119
  matcher(context: import("better-auth").HookEndpointContext): true;
97
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
120
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
98
121
  }[];
99
122
  };
100
123
  options: import("better-auth/plugins").BearerOptions | undefined;
101
124
  }, {
102
125
  id: "two-factor";
126
+ version: string;
103
127
  endpoints: {
104
- enableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/enable", {
128
+ enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
105
129
  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<{
130
+ body: import("zod").ZodObject<{
131
+ password: import("zod").ZodOptional<import("zod").ZodString>;
132
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
133
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
134
+ password: import("zod").ZodString;
135
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
136
+ }, import("zod/v4/core").$strip>;
137
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
111
138
  session: {
112
139
  session: Record<string, any> & {
113
140
  id: string;
@@ -165,12 +192,14 @@ export declare const auth: import("better-auth").Auth<{
165
192
  totpURI: string;
166
193
  backupCodes: string[];
167
194
  }>;
168
- disableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/disable", {
195
+ disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
169
196
  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<{
197
+ body: import("zod").ZodObject<{
198
+ password: import("zod").ZodOptional<import("zod").ZodString>;
199
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
200
+ password: import("zod").ZodString;
201
+ }, import("zod/v4/core").$strip>;
202
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
174
203
  session: {
175
204
  session: Record<string, any> & {
176
205
  id: string;
@@ -219,13 +248,13 @@ export declare const auth: import("better-auth").Auth<{
219
248
  }, {
220
249
  status: boolean;
221
250
  }>;
222
- verifyBackupCode: import("better-auth").StrictEndpoint<"/two-factor/verify-backup-code", {
251
+ verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
223
252
  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>;
253
+ body: import("zod").ZodObject<{
254
+ code: import("zod").ZodString;
255
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
256
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
257
+ }, import("zod/v4/core").$strip>;
229
258
  metadata: {
230
259
  openapi: {
231
260
  description: string;
@@ -330,12 +359,14 @@ export declare const auth: import("better-auth").Auth<{
330
359
  image?: string | null | undefined;
331
360
  }) | import("better-auth/plugins").UserWithTwoFactor;
332
361
  }>;
333
- generateBackupCodes: import("better-auth").StrictEndpoint<"/two-factor/generate-backup-codes", {
362
+ generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
334
363
  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<{
364
+ body: import("zod").ZodObject<{
365
+ password: import("zod").ZodOptional<import("zod").ZodString>;
366
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
367
+ password: import("zod").ZodString;
368
+ }, import("zod/v4/core").$strip>;
369
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
339
370
  session: {
340
371
  session: Record<string, any> & {
341
372
  id: string;
@@ -394,20 +425,20 @@ export declare const auth: import("better-auth").Auth<{
394
425
  status: boolean;
395
426
  backupCodes: string[];
396
427
  }>;
397
- viewBackupCodes: import("better-auth").StrictEndpoint<string, {
428
+ viewBackupCodes: import("better-call").StrictEndpoint<string, {
398
429
  method: "POST";
399
- body: import("better-auth").ZodObject<{
400
- userId: import("better-auth").ZodCoercedString<unknown>;
401
- }, import("better-auth").$strip>;
430
+ body: import("zod").ZodObject<{
431
+ userId: import("zod").ZodCoercedString<unknown>;
432
+ }, import("zod/v4/core").$strip>;
402
433
  }, {
403
434
  status: boolean;
404
435
  backupCodes: string[];
405
436
  }>;
406
- sendTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/send-otp", {
437
+ sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
407
438
  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>>;
439
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
440
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
441
+ }, import("zod/v4/core").$strip>>;
411
442
  metadata: {
412
443
  openapi: {
413
444
  summary: string;
@@ -434,12 +465,12 @@ export declare const auth: import("better-auth").Auth<{
434
465
  }, {
435
466
  status: boolean;
436
467
  }>;
437
- verifyTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-otp", {
468
+ verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
438
469
  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>;
470
+ body: import("zod").ZodObject<{
471
+ code: import("zod").ZodString;
472
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
473
+ }, import("zod/v4/core").$strip>;
443
474
  metadata: {
444
475
  openapi: {
445
476
  summary: string;
@@ -523,11 +554,11 @@ export declare const auth: import("better-auth").Auth<{
523
554
  image?: string | null | undefined;
524
555
  };
525
556
  }>;
526
- generateTOTP: import("better-auth").StrictEndpoint<string, {
557
+ generateTOTP: import("better-call").StrictEndpoint<string, {
527
558
  method: "POST";
528
- body: import("better-auth").ZodObject<{
529
- secret: import("better-auth").ZodString;
530
- }, import("better-auth").$strip>;
559
+ body: import("zod").ZodObject<{
560
+ secret: import("zod").ZodString;
561
+ }, import("zod/v4/core").$strip>;
531
562
  metadata: {
532
563
  openapi: {
533
564
  summary: string;
@@ -554,9 +585,9 @@ export declare const auth: import("better-auth").Auth<{
554
585
  }, {
555
586
  code: string;
556
587
  }>;
557
- getTOTPURI: import("better-auth").StrictEndpoint<"/two-factor/get-totp-uri", {
588
+ getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
558
589
  method: "POST";
559
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
590
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
560
591
  session: {
561
592
  session: Record<string, any> & {
562
593
  id: string;
@@ -579,9 +610,11 @@ export declare const auth: import("better-auth").Auth<{
579
610
  };
580
611
  };
581
612
  }>)[];
582
- body: import("better-auth").ZodObject<{
583
- password: import("better-auth").ZodString;
584
- }, import("better-auth").$strip>;
613
+ body: import("zod").ZodObject<{
614
+ password: import("zod").ZodOptional<import("zod").ZodString>;
615
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
616
+ password: import("zod").ZodString;
617
+ }, import("zod/v4/core").$strip>;
585
618
  metadata: {
586
619
  openapi: {
587
620
  summary: string;
@@ -608,12 +641,12 @@ export declare const auth: import("better-auth").Auth<{
608
641
  }, {
609
642
  totpURI: string;
610
643
  }>;
611
- verifyTOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-totp", {
644
+ verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
612
645
  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>;
646
+ body: import("zod").ZodObject<{
647
+ code: import("zod").ZodString;
648
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
649
+ }, import("zod/v4/core").$strip>;
617
650
  metadata: {
618
651
  openapi: {
619
652
  summary: string;
@@ -657,8 +690,9 @@ export declare const auth: import("better-auth").Auth<{
657
690
  hooks: {
658
691
  after: {
659
692
  matcher(context: import("better-auth").HookEndpointContext): boolean;
660
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
693
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
661
694
  twoFactorRedirect: boolean;
695
+ twoFactorMethods: string[];
662
696
  } | undefined>;
663
697
  }[];
664
698
  };
@@ -696,6 +730,12 @@ export declare const auth: import("better-auth").Auth<{
696
730
  };
697
731
  index: true;
698
732
  };
733
+ verified: {
734
+ type: "boolean";
735
+ required: false;
736
+ defaultValue: true;
737
+ input: false;
738
+ };
699
739
  };
700
740
  };
701
741
  };
@@ -705,18 +745,19 @@ export declare const auth: import("better-auth").Auth<{
705
745
  max: number;
706
746
  }[];
707
747
  $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";
748
+ OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
749
+ OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
750
+ TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
751
+ TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
752
+ BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
753
+ INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
754
+ INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
755
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
756
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
717
757
  };
718
758
  }, {
719
759
  id: "username";
760
+ version: string;
720
761
  init(ctx: import("better-auth").AuthContext): {
721
762
  options: {
722
763
  databaseHooks: {
@@ -772,14 +813,14 @@ export declare const auth: import("better-auth").Auth<{
772
813
  };
773
814
  };
774
815
  endpoints: {
775
- signInUsername: import("better-auth").StrictEndpoint<"/sign-in/username", {
816
+ signInUsername: import("better-call").StrictEndpoint<"/sign-in/username", {
776
817
  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>;
818
+ body: import("zod").ZodObject<{
819
+ username: import("zod").ZodString;
820
+ password: import("zod").ZodString;
821
+ rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
822
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
823
+ }, import("zod/v4/core").$strip>;
783
824
  metadata: {
784
825
  openapi: {
785
826
  summary: string;
@@ -837,12 +878,12 @@ export declare const auth: import("better-auth").Auth<{
837
878
  username: string;
838
879
  displayUsername: string;
839
880
  };
840
- } | null>;
841
- isUsernameAvailable: import("better-auth").StrictEndpoint<"/is-username-available", {
881
+ }>;
882
+ isUsernameAvailable: import("better-call").StrictEndpoint<"/is-username-available", {
842
883
  method: "POST";
843
- body: import("better-auth").ZodObject<{
844
- username: import("better-auth").ZodString;
845
- }, import("better-auth").$strip>;
884
+ body: import("zod").ZodObject<{
885
+ username: import("zod").ZodString;
886
+ }, import("zod/v4/core").$strip>;
846
887
  }, {
847
888
  available: boolean;
848
889
  }>;
@@ -857,14 +898,14 @@ export declare const auth: import("better-auth").Auth<{
857
898
  unique: true;
858
899
  returned: true;
859
900
  transform: {
860
- input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
901
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
861
902
  };
862
903
  };
863
904
  displayUsername: {
864
905
  type: "string";
865
906
  required: false;
866
907
  transform: {
867
- input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
908
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
868
909
  };
869
910
  };
870
911
  };
@@ -873,36 +914,37 @@ export declare const auth: import("better-auth").Auth<{
873
914
  hooks: {
874
915
  before: {
875
916
  matcher(context: import("better-auth").HookEndpointContext): boolean;
876
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
917
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
877
918
  }[];
878
919
  };
879
920
  options: import("better-auth/plugins").UsernameOptions | undefined;
880
921
  $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";
922
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
923
+ UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
924
+ INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
925
+ USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
926
+ USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
927
+ USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
928
+ INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
929
+ INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
889
930
  };
890
931
  }, {
891
932
  id: "phone-number";
933
+ version: string;
892
934
  hooks: {
893
935
  before: {
894
936
  matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
895
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<never>;
937
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never>;
896
938
  }[];
897
939
  };
898
940
  endpoints: {
899
- signInPhoneNumber: import("better-auth").StrictEndpoint<"/sign-in/phone-number", {
941
+ signInPhoneNumber: import("better-call").StrictEndpoint<"/sign-in/phone-number", {
900
942
  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>;
943
+ body: import("zod").ZodObject<{
944
+ phoneNumber: import("zod").ZodString;
945
+ password: import("zod").ZodString;
946
+ rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
947
+ }, import("zod/v4/core").$strip>;
906
948
  metadata: {
907
949
  openapi: {
908
950
  summary: string;
@@ -936,11 +978,11 @@ export declare const auth: import("better-auth").Auth<{
936
978
  token: string;
937
979
  user: import("better-auth/plugins").UserWithPhoneNumber;
938
980
  }>;
939
- sendPhoneNumberOTP: import("better-auth").StrictEndpoint<"/phone-number/send-otp", {
981
+ sendPhoneNumberOTP: import("better-call").StrictEndpoint<"/phone-number/send-otp", {
940
982
  method: "POST";
941
- body: import("better-auth").ZodObject<{
942
- phoneNumber: import("better-auth").ZodString;
943
- }, import("better-auth").$strip>;
983
+ body: import("zod").ZodObject<{
984
+ phoneNumber: import("zod").ZodString;
985
+ }, import("zod/v4/core").$strip>;
944
986
  metadata: {
945
987
  openapi: {
946
988
  summary: string;
@@ -967,14 +1009,14 @@ export declare const auth: import("better-auth").Auth<{
967
1009
  }, {
968
1010
  message: string;
969
1011
  }>;
970
- verifyPhoneNumber: import("better-auth").StrictEndpoint<"/phone-number/verify", {
1012
+ verifyPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/verify", {
971
1013
  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>;
1014
+ body: import("zod").ZodIntersection<import("zod").ZodObject<{
1015
+ phoneNumber: import("zod").ZodString;
1016
+ code: import("zod").ZodString;
1017
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
1018
+ updatePhoneNumber: import("zod").ZodOptional<import("zod").ZodBoolean>;
1019
+ }, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
978
1020
  metadata: {
979
1021
  openapi: {
980
1022
  summary: string;
@@ -1078,11 +1120,11 @@ export declare const auth: import("better-auth").Auth<{
1078
1120
  token: null;
1079
1121
  user: import("better-auth/plugins").UserWithPhoneNumber;
1080
1122
  }>;
1081
- requestPasswordResetPhoneNumber: import("better-auth").StrictEndpoint<"/phone-number/request-password-reset", {
1123
+ requestPasswordResetPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/request-password-reset", {
1082
1124
  method: "POST";
1083
- body: import("better-auth").ZodObject<{
1084
- phoneNumber: import("better-auth").ZodString;
1085
- }, import("better-auth").$strip>;
1125
+ body: import("zod").ZodObject<{
1126
+ phoneNumber: import("zod").ZodString;
1127
+ }, import("zod/v4/core").$strip>;
1086
1128
  metadata: {
1087
1129
  openapi: {
1088
1130
  description: string;
@@ -1111,13 +1153,13 @@ export declare const auth: import("better-auth").Auth<{
1111
1153
  }, {
1112
1154
  status: boolean;
1113
1155
  }>;
1114
- resetPasswordPhoneNumber: import("better-auth").StrictEndpoint<"/phone-number/reset-password", {
1156
+ resetPasswordPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/reset-password", {
1115
1157
  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>;
1158
+ body: import("zod").ZodObject<{
1159
+ otp: import("zod").ZodString;
1160
+ phoneNumber: import("zod").ZodString;
1161
+ newPassword: import("zod").ZodString;
1162
+ }, import("zod/v4/core").$strip>;
1121
1163
  metadata: {
1122
1164
  openapi: {
1123
1165
  description: string;
@@ -1173,32 +1215,34 @@ export declare const auth: import("better-auth").Auth<{
1173
1215
  }[];
1174
1216
  options: import("better-auth/plugins").PhoneNumberOptions | undefined;
1175
1217
  $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";
1218
+ OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
1219
+ INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
1220
+ TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
1221
+ INVALID_PHONE_NUMBER: import("better-auth").RawError<"INVALID_PHONE_NUMBER">;
1222
+ PHONE_NUMBER_EXIST: import("better-auth").RawError<"PHONE_NUMBER_EXIST">;
1223
+ PHONE_NUMBER_NOT_EXIST: import("better-auth").RawError<"PHONE_NUMBER_NOT_EXIST">;
1224
+ INVALID_PHONE_NUMBER_OR_PASSWORD: import("better-auth").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
1225
+ UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
1226
+ OTP_NOT_FOUND: import("better-auth").RawError<"OTP_NOT_FOUND">;
1227
+ PHONE_NUMBER_NOT_VERIFIED: import("better-auth").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
1228
+ PHONE_NUMBER_CANNOT_BE_UPDATED: import("better-auth").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
1229
+ SEND_OTP_NOT_IMPLEMENTED: import("better-auth").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
1188
1230
  };
1189
1231
  }, {
1190
1232
  id: "magic-link";
1233
+ version: string;
1191
1234
  endpoints: {
1192
- signInMagicLink: import("better-auth").StrictEndpoint<"/sign-in/magic-link", {
1235
+ signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
1193
1236
  method: "POST";
1194
1237
  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>;
1238
+ body: import("zod").ZodObject<{
1239
+ email: import("zod").ZodEmail;
1240
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1241
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1242
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1243
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1244
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1245
+ }, import("zod/v4/core").$strip>;
1202
1246
  metadata: {
1203
1247
  openapi: {
1204
1248
  operationId: string;
@@ -1225,15 +1269,15 @@ export declare const auth: import("better-auth").Auth<{
1225
1269
  }, {
1226
1270
  status: boolean;
1227
1271
  }>;
1228
- magicLinkVerify: import("better-auth").StrictEndpoint<"/magic-link/verify", {
1272
+ magicLinkVerify: import("better-call").StrictEndpoint<"/magic-link/verify", {
1229
1273
  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>)[];
1274
+ query: import("zod").ZodObject<{
1275
+ token: import("zod").ZodString;
1276
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1277
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1278
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1279
+ }, import("zod/v4/core").$strip>;
1280
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
1237
1281
  requireHeaders: true;
1238
1282
  metadata: {
1239
1283
  openapi: {
@@ -1272,6 +1316,16 @@ export declare const auth: import("better-auth").Auth<{
1272
1316
  name: string;
1273
1317
  image?: string | null | undefined;
1274
1318
  };
1319
+ session: {
1320
+ id: string;
1321
+ createdAt: Date;
1322
+ updatedAt: Date;
1323
+ userId: string;
1324
+ expiresAt: Date;
1325
+ token: string;
1326
+ ipAddress?: string | null | undefined;
1327
+ userAgent?: string | null | undefined;
1328
+ };
1275
1329
  }>;
1276
1330
  };
1277
1331
  rateLimit: {
@@ -1282,6 +1336,7 @@ export declare const auth: import("better-auth").Auth<{
1282
1336
  options: import("better-auth/plugins").MagicLinkOptions;
1283
1337
  }, {
1284
1338
  id: "email-otp";
1339
+ version: string;
1285
1340
  init(ctx: import("better-auth").AuthContext): {
1286
1341
  options: {
1287
1342
  emailVerification: {
@@ -1294,16 +1349,17 @@ export declare const auth: import("better-auth").Auth<{
1294
1349
  };
1295
1350
  } | undefined;
1296
1351
  endpoints: {
1297
- sendVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/send-verification-otp", {
1352
+ sendVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/send-verification-otp", {
1298
1353
  method: "POST";
1299
- body: import("better-auth").ZodObject<{
1300
- email: import("better-auth").ZodString;
1301
- type: import("better-auth").ZodEnum<{
1354
+ body: import("zod").ZodObject<{
1355
+ email: import("zod").ZodString;
1356
+ type: import("zod").ZodEnum<{
1302
1357
  "sign-in": "sign-in";
1358
+ "change-email": "change-email";
1303
1359
  "email-verification": "email-verification";
1304
1360
  "forget-password": "forget-password";
1305
1361
  }>;
1306
- }, import("better-auth").$strip>;
1362
+ }, import("zod/v4/core").$strip>;
1307
1363
  metadata: {
1308
1364
  openapi: {
1309
1365
  operationId: string;
@@ -1330,16 +1386,17 @@ export declare const auth: import("better-auth").Auth<{
1330
1386
  }, {
1331
1387
  success: boolean;
1332
1388
  }>;
1333
- createVerificationOTP: import("better-auth").StrictEndpoint<string, {
1389
+ createVerificationOTP: import("better-call").StrictEndpoint<string, {
1334
1390
  method: "POST";
1335
- body: import("better-auth").ZodObject<{
1336
- email: import("better-auth").ZodString;
1337
- type: import("better-auth").ZodEnum<{
1391
+ body: import("zod").ZodObject<{
1392
+ email: import("zod").ZodString;
1393
+ type: import("zod").ZodEnum<{
1338
1394
  "sign-in": "sign-in";
1395
+ "change-email": "change-email";
1339
1396
  "email-verification": "email-verification";
1340
1397
  "forget-password": "forget-password";
1341
1398
  }>;
1342
- }, import("better-auth").$strip>;
1399
+ }, import("zod/v4/core").$strip>;
1343
1400
  metadata: {
1344
1401
  openapi: {
1345
1402
  operationId: string;
@@ -1359,16 +1416,17 @@ export declare const auth: import("better-auth").Auth<{
1359
1416
  };
1360
1417
  };
1361
1418
  }, string>;
1362
- getVerificationOTP: import("better-auth").StrictEndpoint<string, {
1419
+ getVerificationOTP: import("better-call").StrictEndpoint<string, {
1363
1420
  method: "GET";
1364
- query: import("better-auth").ZodObject<{
1365
- email: import("better-auth").ZodString;
1366
- type: import("better-auth").ZodEnum<{
1421
+ query: import("zod").ZodObject<{
1422
+ email: import("zod").ZodString;
1423
+ type: import("zod").ZodEnum<{
1367
1424
  "sign-in": "sign-in";
1425
+ "change-email": "change-email";
1368
1426
  "email-verification": "email-verification";
1369
1427
  "forget-password": "forget-password";
1370
1428
  }>;
1371
- }, import("better-auth").$strip>;
1429
+ }, import("zod/v4/core").$strip>;
1372
1430
  metadata: {
1373
1431
  openapi: {
1374
1432
  operationId: string;
@@ -1400,17 +1458,18 @@ export declare const auth: import("better-auth").Auth<{
1400
1458
  } | {
1401
1459
  otp: string;
1402
1460
  }>;
1403
- checkVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/check-verification-otp", {
1461
+ checkVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/check-verification-otp", {
1404
1462
  method: "POST";
1405
- body: import("better-auth").ZodObject<{
1406
- email: import("better-auth").ZodString;
1407
- type: import("better-auth").ZodEnum<{
1463
+ body: import("zod").ZodObject<{
1464
+ email: import("zod").ZodString;
1465
+ type: import("zod").ZodEnum<{
1408
1466
  "sign-in": "sign-in";
1467
+ "change-email": "change-email";
1409
1468
  "email-verification": "email-verification";
1410
1469
  "forget-password": "forget-password";
1411
1470
  }>;
1412
- otp: import("better-auth").ZodString;
1413
- }, import("better-auth").$strip>;
1471
+ otp: import("zod").ZodString;
1472
+ }, import("zod/v4/core").$strip>;
1414
1473
  metadata: {
1415
1474
  openapi: {
1416
1475
  operationId: string;
@@ -1437,12 +1496,12 @@ export declare const auth: import("better-auth").Auth<{
1437
1496
  }, {
1438
1497
  success: boolean;
1439
1498
  }>;
1440
- verifyEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/verify-email", {
1499
+ verifyEmailOTP: import("better-call").StrictEndpoint<"/email-otp/verify-email", {
1441
1500
  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>;
1501
+ body: import("zod").ZodObject<{
1502
+ email: import("zod").ZodString;
1503
+ otp: import("zod").ZodString;
1504
+ }, import("zod/v4/core").$strip>;
1446
1505
  metadata: {
1447
1506
  openapi: {
1448
1507
  description: string;
@@ -1501,12 +1560,14 @@ export declare const auth: import("better-auth").Auth<{
1501
1560
  image?: string | null | undefined;
1502
1561
  } & Record<string, any>;
1503
1562
  }>;
1504
- signInEmailOTP: import("better-auth").StrictEndpoint<"/sign-in/email-otp", {
1563
+ signInEmailOTP: import("better-call").StrictEndpoint<"/sign-in/email-otp", {
1505
1564
  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>;
1565
+ body: import("zod").ZodIntersection<import("zod").ZodObject<{
1566
+ email: import("zod").ZodString;
1567
+ otp: import("zod").ZodString;
1568
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1569
+ image: import("zod").ZodOptional<import("zod").ZodString>;
1570
+ }, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1510
1571
  metadata: {
1511
1572
  openapi: {
1512
1573
  operationId: string;
@@ -1547,11 +1608,11 @@ export declare const auth: import("better-auth").Auth<{
1547
1608
  image?: string | null | undefined;
1548
1609
  };
1549
1610
  }>;
1550
- forgetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/forget-password/email-otp", {
1611
+ requestPasswordResetEmailOTP: import("better-call").StrictEndpoint<"/email-otp/request-password-reset", {
1551
1612
  method: "POST";
1552
- body: import("better-auth").ZodObject<{
1553
- email: import("better-auth").ZodString;
1554
- }, import("better-auth").$strip>;
1613
+ body: import("zod").ZodObject<{
1614
+ email: import("zod").ZodString;
1615
+ }, import("zod/v4/core").$strip>;
1555
1616
  metadata: {
1556
1617
  openapi: {
1557
1618
  operationId: string;
@@ -1579,13 +1640,155 @@ export declare const auth: import("better-auth").Auth<{
1579
1640
  }, {
1580
1641
  success: boolean;
1581
1642
  }>;
1582
- resetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/reset-password", {
1643
+ forgetPasswordEmailOTP: import("better-call").StrictEndpoint<"/forget-password/email-otp", {
1644
+ method: "POST";
1645
+ body: import("zod").ZodObject<{
1646
+ email: import("zod").ZodString;
1647
+ }, import("zod/v4/core").$strip>;
1648
+ metadata: {
1649
+ openapi: {
1650
+ operationId: string;
1651
+ description: string;
1652
+ responses: {
1653
+ 200: {
1654
+ description: string;
1655
+ content: {
1656
+ "application/json": {
1657
+ schema: {
1658
+ type: "object";
1659
+ properties: {
1660
+ success: {
1661
+ type: string;
1662
+ description: string;
1663
+ };
1664
+ };
1665
+ };
1666
+ };
1667
+ };
1668
+ };
1669
+ };
1670
+ };
1671
+ };
1672
+ }, {
1673
+ success: boolean;
1674
+ }>;
1675
+ resetPasswordEmailOTP: import("better-call").StrictEndpoint<"/email-otp/reset-password", {
1676
+ method: "POST";
1677
+ body: import("zod").ZodObject<{
1678
+ email: import("zod").ZodString;
1679
+ otp: import("zod").ZodString;
1680
+ password: import("zod").ZodString;
1681
+ }, import("zod/v4/core").$strip>;
1682
+ metadata: {
1683
+ openapi: {
1684
+ operationId: string;
1685
+ description: string;
1686
+ responses: {
1687
+ 200: {
1688
+ description: string;
1689
+ content: {
1690
+ "application/json": {
1691
+ schema: {
1692
+ type: "object";
1693
+ properties: {
1694
+ success: {
1695
+ type: string;
1696
+ };
1697
+ };
1698
+ };
1699
+ };
1700
+ };
1701
+ };
1702
+ };
1703
+ };
1704
+ };
1705
+ }, {
1706
+ success: boolean;
1707
+ }>;
1708
+ requestEmailChangeEmailOTP: import("better-call").StrictEndpoint<"/email-otp/request-email-change", {
1709
+ method: "POST";
1710
+ body: import("zod").ZodObject<{
1711
+ newEmail: import("zod").ZodString;
1712
+ otp: import("zod").ZodOptional<import("zod").ZodString>;
1713
+ }, import("zod/v4/core").$strip>;
1714
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1715
+ session: {
1716
+ session: Record<string, any> & {
1717
+ id: string;
1718
+ createdAt: Date;
1719
+ updatedAt: Date;
1720
+ userId: string;
1721
+ expiresAt: Date;
1722
+ token: string;
1723
+ ipAddress?: string | null | undefined;
1724
+ userAgent?: string | null | undefined;
1725
+ };
1726
+ user: Record<string, any> & {
1727
+ id: string;
1728
+ createdAt: Date;
1729
+ updatedAt: Date;
1730
+ email: string;
1731
+ emailVerified: boolean;
1732
+ name: string;
1733
+ image?: string | null | undefined;
1734
+ };
1735
+ };
1736
+ }>)[];
1737
+ metadata: {
1738
+ openapi: {
1739
+ operationId: string;
1740
+ description: string;
1741
+ responses: {
1742
+ 200: {
1743
+ description: string;
1744
+ content: {
1745
+ "application/json": {
1746
+ schema: {
1747
+ type: "object";
1748
+ properties: {
1749
+ success: {
1750
+ type: string;
1751
+ };
1752
+ };
1753
+ };
1754
+ };
1755
+ };
1756
+ };
1757
+ };
1758
+ };
1759
+ };
1760
+ }, {
1761
+ success: boolean;
1762
+ }>;
1763
+ changeEmailEmailOTP: import("better-call").StrictEndpoint<"/email-otp/change-email", {
1583
1764
  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>;
1765
+ body: import("zod").ZodObject<{
1766
+ newEmail: import("zod").ZodString;
1767
+ otp: import("zod").ZodString;
1768
+ }, import("zod/v4/core").$strip>;
1769
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1770
+ session: {
1771
+ session: Record<string, any> & {
1772
+ id: string;
1773
+ createdAt: Date;
1774
+ updatedAt: Date;
1775
+ userId: string;
1776
+ expiresAt: Date;
1777
+ token: string;
1778
+ ipAddress?: string | null | undefined;
1779
+ userAgent?: string | null | undefined;
1780
+ };
1781
+ user: Record<string, any> & {
1782
+ id: string;
1783
+ createdAt: Date;
1784
+ updatedAt: Date;
1785
+ email: string;
1786
+ emailVerified: boolean;
1787
+ name: string;
1788
+ image?: string | null | undefined;
1789
+ };
1790
+ };
1791
+ }>)[];
1589
1792
  metadata: {
1590
1793
  openapi: {
1591
1794
  operationId: string;
@@ -1593,10 +1796,10 @@ export declare const auth: import("better-auth").Auth<{
1593
1796
  responses: {
1594
1797
  200: {
1595
1798
  description: string;
1596
- contnt: {
1799
+ content: {
1597
1800
  "application/json": {
1598
1801
  schema: {
1599
- type: string;
1802
+ type: "object";
1600
1803
  properties: {
1601
1804
  success: {
1602
1805
  type: string;
@@ -1616,14 +1819,9 @@ export declare const auth: import("better-auth").Auth<{
1616
1819
  hooks: {
1617
1820
  after: {
1618
1821
  matcher(context: import("better-auth").HookEndpointContext): boolean;
1619
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
1822
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
1620
1823
  }[];
1621
1824
  };
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
1825
  rateLimit: ({
1628
1826
  pathMatcher(path: string): path is "/email-otp/send-verification-otp";
1629
1827
  window: number;
@@ -1640,10 +1838,36 @@ export declare const auth: import("better-auth").Auth<{
1640
1838
  pathMatcher(path: string): path is "/sign-in/email-otp";
1641
1839
  window: number;
1642
1840
  max: number;
1841
+ } | {
1842
+ pathMatcher(path: string): path is "/email-otp/request-password-reset";
1843
+ window: number;
1844
+ max: number;
1845
+ } | {
1846
+ pathMatcher(path: string): path is "/email-otp/reset-password";
1847
+ window: number;
1848
+ max: number;
1849
+ } | {
1850
+ pathMatcher(path: string): path is "/forget-password/email-otp";
1851
+ window: number;
1852
+ max: number;
1853
+ } | {
1854
+ pathMatcher(path: string): path is "/email-otp/request-email-change";
1855
+ window: number;
1856
+ max: number;
1857
+ } | {
1858
+ pathMatcher(path: string): path is "/email-otp/change-email";
1859
+ window: number;
1860
+ max: number;
1643
1861
  })[];
1644
1862
  options: import("better-auth/plugins").EmailOTPOptions;
1863
+ $ERROR_CODES: {
1864
+ OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
1865
+ INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
1866
+ TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
1867
+ };
1645
1868
  }, {
1646
1869
  id: "admin";
1870
+ version: string;
1647
1871
  init(): {
1648
1872
  options: {
1649
1873
  databaseHooks: {
@@ -1691,21 +1915,30 @@ export declare const auth: import("better-auth").Auth<{
1691
1915
  hooks: {
1692
1916
  after: {
1693
1917
  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>;
1918
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>;
1695
1919
  }[];
1696
1920
  };
1697
1921
  endpoints: {
1698
- setRole: import("better-auth").StrictEndpoint<"/admin/set-role", {
1922
+ setRole: import("better-call").StrictEndpoint<"/admin/set-role", {
1699
1923
  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>;
1924
+ body: import("zod").ZodObject<{
1925
+ userId: import("zod").ZodCoercedString<unknown>;
1926
+ role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
1927
+ }, import("zod/v4/core").$strip>;
1704
1928
  requireHeaders: true;
1705
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1929
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1706
1930
  session: {
1707
1931
  user: import("better-auth/plugins").UserWithRole;
1708
- session: import("better-auth").Session;
1932
+ session: {
1933
+ id: string;
1934
+ createdAt: Date;
1935
+ updatedAt: Date;
1936
+ userId: string;
1937
+ expiresAt: Date;
1938
+ token: string;
1939
+ ipAddress?: string | null | undefined;
1940
+ userAgent?: string | null | undefined;
1941
+ };
1709
1942
  };
1710
1943
  }>)[];
1711
1944
  metadata: {
@@ -1741,15 +1974,24 @@ export declare const auth: import("better-auth").Auth<{
1741
1974
  }, {
1742
1975
  user: import("better-auth/plugins").UserWithRole;
1743
1976
  }>;
1744
- getUser: import("better-auth").StrictEndpoint<"/admin/get-user", {
1977
+ getUser: import("better-call").StrictEndpoint<"/admin/get-user", {
1745
1978
  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<{
1979
+ query: import("zod").ZodObject<{
1980
+ id: import("zod").ZodString;
1981
+ }, import("zod/v4/core").$strip>;
1982
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1750
1983
  session: {
1751
1984
  user: import("better-auth/plugins").UserWithRole;
1752
- session: import("better-auth").Session;
1985
+ session: {
1986
+ id: string;
1987
+ createdAt: Date;
1988
+ updatedAt: Date;
1989
+ userId: string;
1990
+ expiresAt: Date;
1991
+ token: string;
1992
+ ipAddress?: string | null | undefined;
1993
+ userAgent?: string | null | undefined;
1994
+ };
1753
1995
  };
1754
1996
  }>)[];
1755
1997
  metadata: {
@@ -1777,15 +2019,15 @@ export declare const auth: import("better-auth").Auth<{
1777
2019
  };
1778
2020
  };
1779
2021
  }, import("better-auth/plugins").UserWithRole>;
1780
- createUser: import("better-auth").StrictEndpoint<"/admin/create-user", {
2022
+ createUser: import("better-call").StrictEndpoint<"/admin/create-user", {
1781
2023
  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>;
2024
+ body: import("zod").ZodObject<{
2025
+ email: import("zod").ZodString;
2026
+ password: import("zod").ZodOptional<import("zod").ZodString>;
2027
+ name: import("zod").ZodString;
2028
+ role: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
2029
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
2030
+ }, import("zod/v4/core").$strip>;
1789
2031
  metadata: {
1790
2032
  openapi: {
1791
2033
  operationId: string;
@@ -1822,16 +2064,25 @@ export declare const auth: import("better-auth").Auth<{
1822
2064
  }, {
1823
2065
  user: import("better-auth/plugins").UserWithRole;
1824
2066
  }>;
1825
- adminUpdateUser: import("better-auth").StrictEndpoint<"/admin/update-user", {
2067
+ adminUpdateUser: import("better-call").StrictEndpoint<"/admin/update-user", {
1826
2068
  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<{
2069
+ body: import("zod").ZodObject<{
2070
+ userId: import("zod").ZodCoercedString<unknown>;
2071
+ data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
2072
+ }, import("zod/v4/core").$strip>;
2073
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1832
2074
  session: {
1833
2075
  user: import("better-auth/plugins").UserWithRole;
1834
- session: import("better-auth").Session;
2076
+ session: {
2077
+ id: string;
2078
+ createdAt: Date;
2079
+ updatedAt: Date;
2080
+ userId: string;
2081
+ expiresAt: Date;
2082
+ token: string;
2083
+ ipAddress?: string | null | undefined;
2084
+ userAgent?: string | null | undefined;
2085
+ };
1835
2086
  };
1836
2087
  }>)[];
1837
2088
  metadata: {
@@ -1859,44 +2110,57 @@ export declare const auth: import("better-auth").Auth<{
1859
2110
  };
1860
2111
  };
1861
2112
  }, import("better-auth/plugins").UserWithRole>;
1862
- listUsers: import("better-auth").StrictEndpoint<"/admin/list-users", {
2113
+ listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
1863
2114
  method: "GET";
1864
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2115
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1865
2116
  session: {
1866
2117
  user: import("better-auth/plugins").UserWithRole;
1867
- session: import("better-auth").Session;
2118
+ session: {
2119
+ id: string;
2120
+ createdAt: Date;
2121
+ updatedAt: Date;
2122
+ userId: string;
2123
+ expiresAt: Date;
2124
+ token: string;
2125
+ ipAddress?: string | null | undefined;
2126
+ userAgent?: string | null | undefined;
2127
+ };
1868
2128
  };
1869
2129
  }>)[];
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";
2130
+ query: import("zod").ZodObject<{
2131
+ searchValue: import("zod").ZodOptional<import("zod").ZodString>;
2132
+ searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
1874
2133
  email: "email";
2134
+ name: "name";
1875
2135
  }>>;
1876
- searchOperator: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2136
+ searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
1877
2137
  contains: "contains";
1878
2138
  starts_with: "starts_with";
1879
2139
  ends_with: "ends_with";
1880
2140
  }>>;
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<{
2141
+ limit: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
2142
+ offset: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
2143
+ sortBy: import("zod").ZodOptional<import("zod").ZodString>;
2144
+ sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
1885
2145
  asc: "asc";
1886
2146
  desc: "desc";
1887
2147
  }>>;
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<{
2148
+ filterField: import("zod").ZodOptional<import("zod").ZodString>;
2149
+ filterValue: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, import("zod").ZodBoolean]>, import("zod").ZodArray<import("zod").ZodString>]>, import("zod").ZodArray<import("zod").ZodNumber>]>>;
2150
+ filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
1891
2151
  eq: "eq";
1892
2152
  ne: "ne";
1893
- lt: "lt";
1894
- lte: "lte";
1895
2153
  gt: "gt";
1896
2154
  gte: "gte";
2155
+ lt: "lt";
2156
+ lte: "lte";
2157
+ in: "in";
2158
+ not_in: "not_in";
1897
2159
  contains: "contains";
2160
+ starts_with: "starts_with";
2161
+ ends_with: "ends_with";
1898
2162
  }>>;
1899
- }, import("better-auth").$strip>;
2163
+ }, import("zod/v4/core").$strip>;
1900
2164
  metadata: {
1901
2165
  openapi: {
1902
2166
  operationId: string;
@@ -1937,23 +2201,27 @@ export declare const auth: import("better-auth").Auth<{
1937
2201
  }, {
1938
2202
  users: import("better-auth/plugins").UserWithRole[];
1939
2203
  total: number;
1940
- limit: number | undefined;
1941
- offset: number | undefined;
1942
- } | {
1943
- users: never[];
1944
- total: number;
1945
2204
  }>;
1946
- listUserSessions: import("better-auth").StrictEndpoint<"/admin/list-user-sessions", {
2205
+ listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
1947
2206
  method: "POST";
1948
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2207
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1949
2208
  session: {
1950
2209
  user: import("better-auth/plugins").UserWithRole;
1951
- session: import("better-auth").Session;
2210
+ session: {
2211
+ id: string;
2212
+ createdAt: Date;
2213
+ updatedAt: Date;
2214
+ userId: string;
2215
+ expiresAt: Date;
2216
+ token: string;
2217
+ ipAddress?: string | null | undefined;
2218
+ userAgent?: string | null | undefined;
2219
+ };
1952
2220
  };
1953
2221
  }>)[];
1954
- body: import("better-auth").ZodObject<{
1955
- userId: import("better-auth").ZodCoercedString<unknown>;
1956
- }, import("better-auth").$strip>;
2222
+ body: import("zod").ZodObject<{
2223
+ userId: import("zod").ZodCoercedString<unknown>;
2224
+ }, import("zod/v4/core").$strip>;
1957
2225
  metadata: {
1958
2226
  openapi: {
1959
2227
  operationId: string;
@@ -1984,15 +2252,24 @@ export declare const auth: import("better-auth").Auth<{
1984
2252
  }, {
1985
2253
  sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
1986
2254
  }>;
1987
- unbanUser: import("better-auth").StrictEndpoint<"/admin/unban-user", {
2255
+ unbanUser: import("better-call").StrictEndpoint<"/admin/unban-user", {
1988
2256
  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<{
2257
+ body: import("zod").ZodObject<{
2258
+ userId: import("zod").ZodCoercedString<unknown>;
2259
+ }, import("zod/v4/core").$strip>;
2260
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1993
2261
  session: {
1994
2262
  user: import("better-auth/plugins").UserWithRole;
1995
- session: import("better-auth").Session;
2263
+ session: {
2264
+ id: string;
2265
+ createdAt: Date;
2266
+ updatedAt: Date;
2267
+ userId: string;
2268
+ expiresAt: Date;
2269
+ token: string;
2270
+ ipAddress?: string | null | undefined;
2271
+ userAgent?: string | null | undefined;
2272
+ };
1996
2273
  };
1997
2274
  }>)[];
1998
2275
  metadata: {
@@ -2022,17 +2299,26 @@ export declare const auth: import("better-auth").Auth<{
2022
2299
  }, {
2023
2300
  user: import("better-auth/plugins").UserWithRole;
2024
2301
  }>;
2025
- banUser: import("better-auth").StrictEndpoint<"/admin/ban-user", {
2302
+ banUser: import("better-call").StrictEndpoint<"/admin/ban-user", {
2026
2303
  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<{
2304
+ body: import("zod").ZodObject<{
2305
+ userId: import("zod").ZodCoercedString<unknown>;
2306
+ banReason: import("zod").ZodOptional<import("zod").ZodString>;
2307
+ banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
2308
+ }, import("zod/v4/core").$strip>;
2309
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2033
2310
  session: {
2034
2311
  user: import("better-auth/plugins").UserWithRole;
2035
- session: import("better-auth").Session;
2312
+ session: {
2313
+ id: string;
2314
+ createdAt: Date;
2315
+ updatedAt: Date;
2316
+ userId: string;
2317
+ expiresAt: Date;
2318
+ token: string;
2319
+ ipAddress?: string | null | undefined;
2320
+ userAgent?: string | null | undefined;
2321
+ };
2036
2322
  };
2037
2323
  }>)[];
2038
2324
  metadata: {
@@ -2062,15 +2348,24 @@ export declare const auth: import("better-auth").Auth<{
2062
2348
  }, {
2063
2349
  user: import("better-auth/plugins").UserWithRole;
2064
2350
  }>;
2065
- impersonateUser: import("better-auth").StrictEndpoint<"/admin/impersonate-user", {
2351
+ impersonateUser: import("better-call").StrictEndpoint<"/admin/impersonate-user", {
2066
2352
  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<{
2353
+ body: import("zod").ZodObject<{
2354
+ userId: import("zod").ZodCoercedString<unknown>;
2355
+ }, import("zod/v4/core").$strip>;
2356
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2071
2357
  session: {
2072
2358
  user: import("better-auth/plugins").UserWithRole;
2073
- session: import("better-auth").Session;
2359
+ session: {
2360
+ id: string;
2361
+ createdAt: Date;
2362
+ updatedAt: Date;
2363
+ userId: string;
2364
+ expiresAt: Date;
2365
+ token: string;
2366
+ ipAddress?: string | null | undefined;
2367
+ userAgent?: string | null | undefined;
2368
+ };
2074
2369
  };
2075
2370
  }>)[];
2076
2371
  metadata: {
@@ -2113,7 +2408,7 @@ export declare const auth: import("better-auth").Auth<{
2113
2408
  };
2114
2409
  user: import("better-auth/plugins").UserWithRole;
2115
2410
  }>;
2116
- stopImpersonating: import("better-auth").StrictEndpoint<"/admin/stop-impersonating", {
2411
+ stopImpersonating: import("better-call").StrictEndpoint<"/admin/stop-impersonating", {
2117
2412
  method: "POST";
2118
2413
  requireHeaders: true;
2119
2414
  }, {
@@ -2137,15 +2432,24 @@ export declare const auth: import("better-auth").Auth<{
2137
2432
  image?: string | null | undefined;
2138
2433
  } & Record<string, any>;
2139
2434
  }>;
2140
- revokeUserSession: import("better-auth").StrictEndpoint<"/admin/revoke-user-session", {
2435
+ revokeUserSession: import("better-call").StrictEndpoint<"/admin/revoke-user-session", {
2141
2436
  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<{
2437
+ body: import("zod").ZodObject<{
2438
+ sessionToken: import("zod").ZodString;
2439
+ }, import("zod/v4/core").$strip>;
2440
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2146
2441
  session: {
2147
2442
  user: import("better-auth/plugins").UserWithRole;
2148
- session: import("better-auth").Session;
2443
+ session: {
2444
+ id: string;
2445
+ createdAt: Date;
2446
+ updatedAt: Date;
2447
+ userId: string;
2448
+ expiresAt: Date;
2449
+ token: string;
2450
+ ipAddress?: string | null | undefined;
2451
+ userAgent?: string | null | undefined;
2452
+ };
2149
2453
  };
2150
2454
  }>)[];
2151
2455
  metadata: {
@@ -2175,15 +2479,24 @@ export declare const auth: import("better-auth").Auth<{
2175
2479
  }, {
2176
2480
  success: boolean;
2177
2481
  }>;
2178
- revokeUserSessions: import("better-auth").StrictEndpoint<"/admin/revoke-user-sessions", {
2482
+ revokeUserSessions: import("better-call").StrictEndpoint<"/admin/revoke-user-sessions", {
2179
2483
  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<{
2484
+ body: import("zod").ZodObject<{
2485
+ userId: import("zod").ZodCoercedString<unknown>;
2486
+ }, import("zod/v4/core").$strip>;
2487
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2184
2488
  session: {
2185
2489
  user: import("better-auth/plugins").UserWithRole;
2186
- session: import("better-auth").Session;
2490
+ session: {
2491
+ id: string;
2492
+ createdAt: Date;
2493
+ updatedAt: Date;
2494
+ userId: string;
2495
+ expiresAt: Date;
2496
+ token: string;
2497
+ ipAddress?: string | null | undefined;
2498
+ userAgent?: string | null | undefined;
2499
+ };
2187
2500
  };
2188
2501
  }>)[];
2189
2502
  metadata: {
@@ -2213,15 +2526,24 @@ export declare const auth: import("better-auth").Auth<{
2213
2526
  }, {
2214
2527
  success: boolean;
2215
2528
  }>;
2216
- removeUser: import("better-auth").StrictEndpoint<"/admin/remove-user", {
2529
+ removeUser: import("better-call").StrictEndpoint<"/admin/remove-user", {
2217
2530
  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<{
2531
+ body: import("zod").ZodObject<{
2532
+ userId: import("zod").ZodCoercedString<unknown>;
2533
+ }, import("zod/v4/core").$strip>;
2534
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2222
2535
  session: {
2223
2536
  user: import("better-auth/plugins").UserWithRole;
2224
- session: import("better-auth").Session;
2537
+ session: {
2538
+ id: string;
2539
+ createdAt: Date;
2540
+ updatedAt: Date;
2541
+ userId: string;
2542
+ expiresAt: Date;
2543
+ token: string;
2544
+ ipAddress?: string | null | undefined;
2545
+ userAgent?: string | null | undefined;
2546
+ };
2225
2547
  };
2226
2548
  }>)[];
2227
2549
  metadata: {
@@ -2251,16 +2573,25 @@ export declare const auth: import("better-auth").Auth<{
2251
2573
  }, {
2252
2574
  success: boolean;
2253
2575
  }>;
2254
- setUserPassword: import("better-auth").StrictEndpoint<"/admin/set-user-password", {
2576
+ setUserPassword: import("better-call").StrictEndpoint<"/admin/set-user-password", {
2255
2577
  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<{
2578
+ body: import("zod").ZodObject<{
2579
+ newPassword: import("zod").ZodString;
2580
+ userId: import("zod").ZodCoercedString<unknown>;
2581
+ }, import("zod/v4/core").$strip>;
2582
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2261
2583
  session: {
2262
2584
  user: import("better-auth/plugins").UserWithRole;
2263
- session: import("better-auth").Session;
2585
+ session: {
2586
+ id: string;
2587
+ createdAt: Date;
2588
+ updatedAt: Date;
2589
+ userId: string;
2590
+ expiresAt: Date;
2591
+ token: string;
2592
+ ipAddress?: string | null | undefined;
2593
+ userAgent?: string | null | undefined;
2594
+ };
2264
2595
  };
2265
2596
  }>)[];
2266
2597
  metadata: {
@@ -2290,18 +2621,16 @@ export declare const auth: import("better-auth").Auth<{
2290
2621
  }, {
2291
2622
  status: boolean;
2292
2623
  }>;
2293
- userHasPermission: import("better-auth").StrictEndpoint<"/admin/has-permission", {
2624
+ userHasPermission: import("better-call").StrictEndpoint<"/admin/has-permission", {
2294
2625
  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>]>>;
2626
+ body: import("zod").ZodIntersection<import("zod").ZodObject<{
2627
+ userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
2628
+ role: import("zod").ZodOptional<import("zod").ZodString>;
2629
+ }, import("zod/v4/core").$strip>, import("zod").ZodXor<readonly [import("zod").ZodObject<{
2630
+ permission: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
2631
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
2632
+ permissions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
2633
+ }, import("zod/v4/core").$strip>]>>;
2305
2634
  metadata: {
2306
2635
  openapi: {
2307
2636
  description: string;
@@ -2311,11 +2640,6 @@ export declare const auth: import("better-auth").Auth<{
2311
2640
  schema: {
2312
2641
  type: "object";
2313
2642
  properties: {
2314
- permission: {
2315
- type: string;
2316
- description: string;
2317
- deprecated: boolean;
2318
- };
2319
2643
  permissions: {
2320
2644
  type: string;
2321
2645
  description: string;
@@ -2349,55 +2673,7 @@ export declare const auth: import("better-auth").Auth<{
2349
2673
  };
2350
2674
  };
2351
2675
  $Infer: {
2352
- body: ({
2353
- permission: {
2354
- readonly "welfare_cycle:plan"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2355
- readonly "welfare_cycle:subscription"?: ("read" | "list" | "create")[] | undefined;
2356
- readonly "welfare_cycle:payout"?: ("read" | "list" | "create")[] | undefined;
2357
- readonly "ledger_account:import"?: ("read" | "list" | "create")[] | undefined;
2358
- readonly "wallet:container"?: ("read" | "list")[] | undefined;
2359
- readonly "wallet:type"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2360
- readonly "news:news"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2361
- readonly "news:category"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2362
- readonly "trade_market:market"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2363
- readonly "trade_market:order"?: ("read" | "list" | "create")[] | undefined;
2364
- readonly "transfer:order"?: ("read" | "list" | "create")[] | undefined;
2365
- readonly "team:member"?: ("read" | "list" | "stats")[] | undefined;
2366
- readonly "referral:depth-config"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2367
- readonly "referral:relation"?: ("read" | "list" | "bind")[] | undefined;
2368
- readonly "shipping_address:item"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2369
- readonly "receipt_method:item"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2370
- readonly "notification:notification"?: ("read" | "list" | "update")[] | undefined;
2371
- readonly "notification:admin"?: ("read" | "list" | "create" | "stats")[] | undefined;
2372
- readonly "withdraw:manage"?: ("read" | "create")[] | undefined;
2373
- readonly "withdraw:review"?: ("read" | "approve" | "reject" | "paid")[] | undefined;
2374
- readonly "market_data:ticker"?: ("read" | "latest")[] | undefined;
2375
- readonly "market_data:kline"?: ("read" | "list")[] | undefined;
2376
- readonly "market_data:admin"?: ("read" | "list" | "run")[] | undefined;
2377
- readonly "market_pricing:strategy"?: ("read" | "list" | "create" | "update" | "delete" | "run")[] | undefined;
2378
- readonly "ledger:entry"?: ("read" | "list" | "view_all" | "adjust")[] | undefined;
2379
- readonly "ledger-account:type"?: ("read" | "list" | "create" | "update")[] | undefined;
2380
- readonly "ledger-account:account"?: ("read" | "list" | "update")[] | undefined;
2381
- readonly "deposit:order"?: ("read" | "list" | "create" | "update")[] | undefined;
2382
- readonly "deposit:review"?: ("read" | "list" | "update")[] | undefined;
2383
- readonly "checkIn:checkIn"?: ("read" | "list" | "create")[] | undefined;
2384
- readonly "checkIn:admin"?: ("read" | "list")[] | undefined;
2385
- readonly "kyc:method"?: ("read" | "create" | "update")[] | undefined;
2386
- readonly "kyc:admin"?: ("read" | "list" | "approve" | "reject")[] | undefined;
2387
- readonly "user:profile"?: ("read" | "update")[] | undefined;
2388
- readonly "user:referral"?: "bind"[] | undefined;
2389
- readonly "admin:user-profile"?: ("read" | "list" | "update")[] | undefined;
2390
- readonly "asset_price:price"?: ("read" | "list" | "latest")[] | undefined;
2391
- readonly "asset_price:admin"?: ("read" | "list" | "create" | "latest")[] | undefined;
2392
- readonly "asset-type:type"?: ("read" | "list" | "update")[] | undefined;
2393
- readonly "asset_convert_product:product"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2394
- readonly "asset_convert_product:order"?: ("read" | "list" | "create")[] | undefined;
2395
- readonly "asset:item"?: ("read" | "list" | "create" | "update")[] | undefined;
2396
- readonly user?: ("list" | "create" | "update" | "delete" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
2397
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
2398
- };
2399
- permissions?: never | undefined;
2400
- } | {
2676
+ body: {
2401
2677
  permissions: {
2402
2678
  readonly "welfare_cycle:plan"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2403
2679
  readonly "welfare_cycle:subscription"?: ("read" | "list" | "create")[] | undefined;
@@ -2422,7 +2698,7 @@ export declare const auth: import("better-auth").Auth<{
2422
2698
  readonly "market_data:ticker"?: ("read" | "latest")[] | undefined;
2423
2699
  readonly "market_data:kline"?: ("read" | "list")[] | undefined;
2424
2700
  readonly "market_data:admin"?: ("read" | "list" | "run")[] | undefined;
2425
- readonly "market_pricing:strategy"?: ("read" | "list" | "create" | "update" | "delete" | "run")[] | undefined;
2701
+ readonly "market_pricing:strategy"?: ("read" | "list" | "create" | "update" | "run" | "delete")[] | undefined;
2426
2702
  readonly "ledger:entry"?: ("read" | "list" | "view_all" | "adjust")[] | undefined;
2427
2703
  readonly "ledger-account:type"?: ("read" | "list" | "create" | "update")[] | undefined;
2428
2704
  readonly "ledger-account:account"?: ("read" | "list" | "update")[] | undefined;
@@ -2437,15 +2713,14 @@ export declare const auth: import("better-auth").Auth<{
2437
2713
  readonly "admin:user-profile"?: ("read" | "list" | "update")[] | undefined;
2438
2714
  readonly "asset_price:price"?: ("read" | "list" | "latest")[] | undefined;
2439
2715
  readonly "asset_price:admin"?: ("read" | "list" | "create" | "latest")[] | undefined;
2440
- readonly "asset-type:type"?: ("read" | "list" | "update")[] | undefined;
2441
- readonly "asset_convert_product:product"?: ("read" | "list" | "create" | "update" | "delete")[] | undefined;
2442
- readonly "asset_convert_product:order"?: ("read" | "list" | "create")[] | undefined;
2716
+ readonly "asset-type:type"?: ("read" | "list" | "create" | "update")[] | undefined;
2717
+ readonly "asset_convert_product:product"?: ("read" | "list" | "create" | "update")[] | undefined;
2718
+ readonly "asset_convert_product:order"?: ("read" | "list")[] | undefined;
2443
2719
  readonly "asset:item"?: ("read" | "list" | "create" | "update")[] | undefined;
2444
- readonly user?: ("list" | "create" | "update" | "delete" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
2720
+ readonly user?: ("list" | "create" | "update" | "delete" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "get")[] | undefined;
2445
2721
  readonly session?: ("list" | "delete" | "revoke")[] | undefined;
2446
2722
  };
2447
- permission?: never | undefined;
2448
- }) & {
2723
+ } & {
2449
2724
  userId?: string | undefined;
2450
2725
  role?: "user" | "admin" | "authAdmin" | "superAdmin" | "authUser" | undefined;
2451
2726
  };
@@ -2457,27 +2732,27 @@ export declare const auth: import("better-auth").Auth<{
2457
2732
  }>;
2458
2733
  };
2459
2734
  $ERROR_CODES: {
2460
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
2461
- readonly USER_ALREADY_EXISTS: "User already exists.";
2462
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2463
- readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
2464
- readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
2465
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
2466
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
2467
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
2468
- readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
2469
- readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
2470
- readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
2471
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
2472
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
2473
- readonly BANNED_USER: "You have been banned from this application";
2474
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
2475
- readonly NO_DATA_TO_UPDATE: "No data to update";
2476
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
2477
- readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
2478
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
2479
- readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
2480
- readonly INVALID_ROLE_TYPE: "Invalid role type";
2735
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
2736
+ FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
2737
+ USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
2738
+ YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
2739
+ YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
2740
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
2741
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
2742
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
2743
+ YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
2744
+ YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
2745
+ YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
2746
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
2747
+ YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
2748
+ BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
2749
+ YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
2750
+ NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
2751
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
2752
+ YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
2753
+ YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
2754
+ YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
2755
+ INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
2481
2756
  };
2482
2757
  schema: {
2483
2758
  user: {
@@ -2555,11 +2830,11 @@ export declare const auth: import("better-auth").Auth<{
2555
2830
  readonly "admin:user-profile": readonly ["read", "update", "list"];
2556
2831
  readonly "asset_price:price": readonly ["read", "list", "latest"];
2557
2832
  readonly "asset_price:admin": readonly ["create", "read", "list", "latest"];
2558
- readonly "asset-type:type": readonly ["read", "update", "list"];
2559
- readonly "asset_convert_product:product": readonly ["create", "read", "update", "delete", "list"];
2560
- readonly "asset_convert_product:order": readonly ["create", "read", "list"];
2833
+ readonly "asset-type:type": readonly ["create", "read", "update", "list"];
2834
+ readonly "asset_convert_product:product": readonly ["create", "read", "update", "list"];
2835
+ readonly "asset_convert_product:order": readonly ["read", "list"];
2561
2836
  readonly "asset:item": readonly ["create", "read", "update", "list"];
2562
- readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
2837
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
2563
2838
  readonly session: readonly ["list", "revoke", "delete"];
2564
2839
  }>): {
2565
2840
  authorize<K_1 extends K>(request: K_1 extends infer T extends K_2 ? { [key in T]?: import("better-auth/plugins").Subset<K, {
@@ -2601,11 +2876,11 @@ export declare const auth: import("better-auth").Auth<{
2601
2876
  readonly "admin:user-profile": readonly ["read", "update", "list"];
2602
2877
  readonly "asset_price:price": readonly ["read", "list", "latest"];
2603
2878
  readonly "asset_price:admin": readonly ["create", "read", "list", "latest"];
2604
- readonly "asset-type:type": readonly ["read", "update", "list"];
2605
- readonly "asset_convert_product:product": readonly ["create", "read", "update", "delete", "list"];
2606
- readonly "asset_convert_product:order": readonly ["create", "read", "list"];
2879
+ readonly "asset-type:type": readonly ["create", "read", "update", "list"];
2880
+ readonly "asset_convert_product:product": readonly ["create", "read", "update", "list"];
2881
+ readonly "asset_convert_product:order": readonly ["read", "list"];
2607
2882
  readonly "asset:item": readonly ["create", "read", "update", "list"];
2608
- readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
2883
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
2609
2884
  readonly session: readonly ["list", "revoke", "delete"];
2610
2885
  }>[key] | {
2611
2886
  actions: import("better-auth/plugins").Subset<K, {
@@ -2647,11 +2922,11 @@ export declare const auth: import("better-auth").Auth<{
2647
2922
  readonly "admin:user-profile": readonly ["read", "update", "list"];
2648
2923
  readonly "asset_price:price": readonly ["read", "list", "latest"];
2649
2924
  readonly "asset_price:admin": readonly ["create", "read", "list", "latest"];
2650
- readonly "asset-type:type": readonly ["read", "update", "list"];
2651
- readonly "asset_convert_product:product": readonly ["create", "read", "update", "delete", "list"];
2652
- readonly "asset_convert_product:order": readonly ["create", "read", "list"];
2925
+ readonly "asset-type:type": readonly ["create", "read", "update", "list"];
2926
+ readonly "asset_convert_product:product": readonly ["create", "read", "update", "list"];
2927
+ readonly "asset_convert_product:order": readonly ["read", "list"];
2653
2928
  readonly "asset:item": readonly ["create", "read", "update", "list"];
2654
- readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
2929
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
2655
2930
  readonly session: readonly ["list", "revoke", "delete"];
2656
2931
  }>[key];
2657
2932
  connector: "OR" | "AND";
@@ -2695,11 +2970,11 @@ export declare const auth: import("better-auth").Auth<{
2695
2970
  readonly "admin:user-profile": readonly ["read", "update", "list"];
2696
2971
  readonly "asset_price:price": readonly ["read", "list", "latest"];
2697
2972
  readonly "asset_price:admin": readonly ["create", "read", "list", "latest"];
2698
- readonly "asset-type:type": readonly ["read", "update", "list"];
2699
- readonly "asset_convert_product:product": readonly ["create", "read", "update", "delete", "list"];
2700
- readonly "asset_convert_product:order": readonly ["create", "read", "list"];
2973
+ readonly "asset-type:type": readonly ["create", "read", "update", "list"];
2974
+ readonly "asset_convert_product:product": readonly ["create", "read", "update", "list"];
2975
+ readonly "asset_convert_product:order": readonly ["read", "list"];
2701
2976
  readonly "asset:item": readonly ["create", "read", "update", "list"];
2702
- readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
2977
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
2703
2978
  readonly session: readonly ["list", "revoke", "delete"];
2704
2979
  }>;
2705
2980
  };
@@ -2742,11 +3017,11 @@ export declare const auth: import("better-auth").Auth<{
2742
3017
  readonly "admin:user-profile": readonly ["read", "update", "list"];
2743
3018
  readonly "asset_price:price": readonly ["read", "list", "latest"];
2744
3019
  readonly "asset_price:admin": readonly ["create", "read", "list", "latest"];
2745
- readonly "asset-type:type": readonly ["read", "update", "list"];
2746
- readonly "asset_convert_product:product": readonly ["create", "read", "update", "delete", "list"];
2747
- readonly "asset_convert_product:order": readonly ["create", "read", "list"];
3020
+ readonly "asset-type:type": readonly ["create", "read", "update", "list"];
3021
+ readonly "asset_convert_product:product": readonly ["create", "read", "update", "list"];
3022
+ readonly "asset_convert_product:order": readonly ["read", "list"];
2748
3023
  readonly "asset:item": readonly ["create", "read", "update", "list"];
2749
- readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
3024
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
2750
3025
  readonly session: readonly ["list", "revoke", "delete"];
2751
3026
  };
2752
3027
  };
@@ -2756,6 +3031,7 @@ export declare const auth: import("better-auth").Auth<{
2756
3031
  }>;
2757
3032
  }, {
2758
3033
  id: "last-login-method";
3034
+ version: string;
2759
3035
  init(ctx: import("better-auth").AuthContext): {
2760
3036
  options: {
2761
3037
  databaseHooks: {
@@ -2803,15 +3079,16 @@ export declare const auth: import("better-auth").Auth<{
2803
3079
  hooks: {
2804
3080
  after: {
2805
3081
  matcher(): true;
2806
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
3082
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
2807
3083
  }[];
2808
3084
  };
2809
3085
  schema: undefined;
2810
3086
  options: NoInfer<import("better-auth/plugins").LastLoginMethodOptions>;
2811
3087
  }, {
2812
3088
  id: "multi-session";
3089
+ version: string;
2813
3090
  endpoints: {
2814
- listDeviceSessions: import("better-auth").StrictEndpoint<"/multi-session/list-device-sessions", {
3091
+ listDeviceSessions: import("better-call").StrictEndpoint<"/multi-session/list-device-sessions", {
2815
3092
  method: "GET";
2816
3093
  requireHeaders: true;
2817
3094
  }, {
@@ -2835,35 +3112,12 @@ export declare const auth: import("better-auth").Auth<{
2835
3112
  image?: string | null | undefined;
2836
3113
  };
2837
3114
  }[]>;
2838
- setActiveSession: import("better-auth").StrictEndpoint<"/multi-session/set-active", {
3115
+ setActiveSession: import("better-call").StrictEndpoint<"/multi-session/set-active", {
2839
3116
  method: "POST";
2840
- body: import("better-auth").ZodObject<{
2841
- sessionToken: import("better-auth").ZodString;
2842
- }, import("better-auth").$strip>;
3117
+ body: import("zod").ZodObject<{
3118
+ sessionToken: import("zod").ZodString;
3119
+ }, import("zod/v4/core").$strip>;
2843
3120
  requireHeaders: true;
2844
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2845
- session: {
2846
- session: Record<string, any> & {
2847
- id: string;
2848
- createdAt: Date;
2849
- updatedAt: Date;
2850
- userId: string;
2851
- expiresAt: Date;
2852
- token: string;
2853
- ipAddress?: string | null | undefined;
2854
- userAgent?: string | null | undefined;
2855
- };
2856
- user: Record<string, any> & {
2857
- id: string;
2858
- createdAt: Date;
2859
- updatedAt: Date;
2860
- email: string;
2861
- emailVerified: boolean;
2862
- name: string;
2863
- image?: string | null | undefined;
2864
- };
2865
- };
2866
- }>)[];
2867
3121
  metadata: {
2868
3122
  openapi: {
2869
3123
  description: string;
@@ -2907,13 +3161,13 @@ export declare const auth: import("better-auth").Auth<{
2907
3161
  image?: string | null | undefined;
2908
3162
  } & Record<string, any>;
2909
3163
  }>;
2910
- revokeDeviceSession: import("better-auth").StrictEndpoint<"/multi-session/revoke", {
3164
+ revokeDeviceSession: import("better-call").StrictEndpoint<"/multi-session/revoke", {
2911
3165
  method: "POST";
2912
- body: import("better-auth").ZodObject<{
2913
- sessionToken: import("better-auth").ZodString;
2914
- }, import("better-auth").$strip>;
3166
+ body: import("zod").ZodObject<{
3167
+ sessionToken: import("zod").ZodString;
3168
+ }, import("zod/v4/core").$strip>;
2915
3169
  requireHeaders: true;
2916
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3170
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2917
3171
  session: {
2918
3172
  session: Record<string, any> & {
2919
3173
  id: string;
@@ -2965,17 +3219,18 @@ export declare const auth: import("better-auth").Auth<{
2965
3219
  hooks: {
2966
3220
  after: {
2967
3221
  matcher: (context: import("better-auth").HookEndpointContext) => boolean;
2968
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
3222
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
2969
3223
  }[];
2970
3224
  };
2971
3225
  options: import("better-auth/plugins").MultiSessionConfig | undefined;
2972
3226
  $ERROR_CODES: {
2973
- readonly INVALID_SESSION_TOKEN: "Invalid session token";
3227
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
2974
3228
  };
2975
3229
  }, {
2976
3230
  id: "open-api";
3231
+ version: string;
2977
3232
  endpoints: {
2978
- generateOpenAPISchema: import("better-auth").StrictEndpoint<"/open-api/generate-schema", {
3233
+ generateOpenAPISchema: import("better-call").StrictEndpoint<"/open-api/generate-schema", {
2979
3234
  method: "GET";
2980
3235
  }, {
2981
3236
  openapi: string;
@@ -3015,7 +3270,7 @@ export declare const auth: import("better-auth").Auth<{
3015
3270
  }[];
3016
3271
  paths: Record<string, import("better-auth/plugins").Path>;
3017
3272
  }>;
3018
- openAPIReference: import("better-auth").StrictEndpoint<"/reference", {
3273
+ openAPIReference: import("better-call").StrictEndpoint<import("better-auth").LiteralString | "/reference", {
3019
3274
  method: "GET";
3020
3275
  metadata: {
3021
3276
  readonly scope: "server";