better-auth 1.6.26 → 1.6.28

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 (210) hide show
  1. package/dist/adapters/index.d.mts +6 -1
  2. package/dist/api/dispatch.d.mts +1 -0
  3. package/dist/api/index.d.mts +508 -505
  4. package/dist/api/middlewares/authorization.d.mts +10 -14
  5. package/dist/api/middlewares/authorization.mjs +1 -2
  6. package/dist/api/middlewares/index.d.mts +1 -2
  7. package/dist/api/middlewares/origin-check.d.mts +5 -3
  8. package/dist/api/routes/account.d.mts +16 -13
  9. package/dist/api/routes/callback.d.mts +3 -1
  10. package/dist/api/routes/email-verification.d.mts +8 -4
  11. package/dist/api/routes/error.d.mts +3 -1
  12. package/dist/api/routes/index.d.mts +1 -2
  13. package/dist/api/routes/ok.d.mts +3 -1
  14. package/dist/api/routes/password.d.mts +10 -8
  15. package/dist/api/routes/session.d.mts +32 -30
  16. package/dist/api/routes/session.mjs +2 -3
  17. package/dist/api/routes/sign-in.d.mts +5 -3
  18. package/dist/api/routes/sign-out.d.mts +3 -1
  19. package/dist/api/routes/sign-up.d.mts +4 -3
  20. package/dist/api/routes/update-session.d.mts +5 -4
  21. package/dist/api/routes/update-user.d.mts +19 -18
  22. package/dist/auth/full.d.mts +1 -1
  23. package/dist/auth/minimal.d.mts +1 -1
  24. package/dist/client/config.d.mts +14 -12
  25. package/dist/client/config.mjs +2 -2
  26. package/dist/client/equality.d.mts +1 -0
  27. package/dist/client/index.d.mts +5 -6
  28. package/dist/client/lynx/index.d.mts +5 -4
  29. package/dist/client/lynx/lynx-store.d.mts +2 -1
  30. package/dist/client/parser.d.mts +3 -7
  31. package/dist/client/path-to-object.d.mts +4 -3
  32. package/dist/client/plugins/index.d.mts +1 -1
  33. package/dist/client/plugins/infer-plugin.d.mts +1 -0
  34. package/dist/client/query.d.mts +1 -0
  35. package/dist/client/react/index.d.mts +5 -4
  36. package/dist/client/react/react-store.d.mts +2 -1
  37. package/dist/client/session-atom.mjs +59 -46
  38. package/dist/client/session-refresh.d.mts +1 -0
  39. package/dist/client/solid/index.d.mts +5 -4
  40. package/dist/client/svelte/index.d.mts +5 -4
  41. package/dist/client/types.d.mts +2 -2
  42. package/dist/client/vanilla.d.mts +2 -1
  43. package/dist/client/vue/index.d.mts +5 -4
  44. package/dist/context/create-context.mjs +3 -3
  45. package/dist/context/helpers.mjs +2 -2
  46. package/dist/cookies/index.d.mts +7 -6
  47. package/dist/cookies/session-store.d.mts +0 -1
  48. package/dist/cookies/session-store.mjs +1 -2
  49. package/dist/crypto/index.d.mts +9 -2
  50. package/dist/crypto/jwt.d.mts +1 -0
  51. package/dist/crypto/password.d.mts +5 -1
  52. package/dist/db/adapter-base.d.mts +1 -0
  53. package/dist/db/adapter-kysely.d.mts +1 -0
  54. package/dist/db/field-converter.d.mts +1 -0
  55. package/dist/db/field.d.mts +10 -9
  56. package/dist/db/get-migration.d.mts +1 -0
  57. package/dist/db/get-schema.d.mts +1 -0
  58. package/dist/db/internal-adapter.d.mts +1 -0
  59. package/dist/db/internal-adapter.mjs +1 -2
  60. package/dist/db/revoke-unproven-account-access.d.mts +1 -0
  61. package/dist/db/schema.d.mts +2 -2
  62. package/dist/db/to-zod.d.mts +7 -3
  63. package/dist/db/with-hooks.d.mts +1 -0
  64. package/dist/index.d.mts +3 -4
  65. package/dist/integrations/next-js.d.mts +7 -4
  66. package/dist/integrations/node.d.mts +3 -2
  67. package/dist/integrations/svelte-kit.d.mts +9 -2
  68. package/dist/integrations/tanstack-start-solid.d.mts +5 -2
  69. package/dist/integrations/tanstack-start.d.mts +5 -2
  70. package/dist/oauth2/link-account.d.mts +1 -1
  71. package/dist/oauth2/state.d.mts +1 -0
  72. package/dist/oauth2/utils.d.mts +1 -0
  73. package/dist/package.mjs +1 -1
  74. package/dist/plugins/access/access.d.mts +1 -0
  75. package/dist/plugins/access/types.d.mts +5 -4
  76. package/dist/plugins/additional-fields/client.d.mts +1 -0
  77. package/dist/plugins/admin/access/statement.d.mts +0 -1
  78. package/dist/plugins/admin/admin.d.mts +137 -132
  79. package/dist/plugins/admin/client.d.mts +30 -30
  80. package/dist/plugins/admin/client.mjs +1 -1
  81. package/dist/plugins/admin/error-codes.d.mts +25 -23
  82. package/dist/plugins/admin/index.d.mts +1 -1
  83. package/dist/plugins/admin/schema.d.mts +1 -1
  84. package/dist/plugins/admin/types.d.mts +2 -3
  85. package/dist/plugins/anonymous/client.d.mts +11 -9
  86. package/dist/plugins/anonymous/client.mjs +1 -1
  87. package/dist/plugins/anonymous/error-codes.d.mts +10 -8
  88. package/dist/plugins/anonymous/index.d.mts +19 -15
  89. package/dist/plugins/anonymous/types.d.mts +1 -1
  90. package/dist/plugins/bearer/index.d.mts +8 -5
  91. package/dist/plugins/captcha/index.d.mts +8 -5
  92. package/dist/plugins/captcha/types.d.mts +1 -0
  93. package/dist/plugins/custom-session/client.d.mts +1 -0
  94. package/dist/plugins/custom-session/index.d.mts +12 -7
  95. package/dist/plugins/device-authorization/client.d.mts +1 -0
  96. package/dist/plugins/device-authorization/index.d.mts +22 -19
  97. package/dist/plugins/email-otp/client.d.mts +6 -4
  98. package/dist/plugins/email-otp/client.mjs +1 -1
  99. package/dist/plugins/email-otp/error-codes.d.mts +5 -3
  100. package/dist/plugins/email-otp/index.d.mts +76 -69
  101. package/dist/plugins/email-otp/types.d.mts +1 -0
  102. package/dist/plugins/generic-oauth/client.d.mts +11 -10
  103. package/dist/plugins/generic-oauth/client.mjs +1 -1
  104. package/dist/plugins/generic-oauth/error-codes.d.mts +10 -8
  105. package/dist/plugins/generic-oauth/index.d.mts +45 -41
  106. package/dist/plugins/generic-oauth/providers/auth0.d.mts +1 -0
  107. package/dist/plugins/generic-oauth/providers/gumroad.d.mts +1 -0
  108. package/dist/plugins/generic-oauth/providers/hubspot.d.mts +1 -0
  109. package/dist/plugins/generic-oauth/providers/index.d.mts +1 -2
  110. package/dist/plugins/generic-oauth/providers/keycloak.d.mts +1 -0
  111. package/dist/plugins/generic-oauth/providers/line.d.mts +1 -0
  112. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +1 -0
  113. package/dist/plugins/generic-oauth/providers/okta.d.mts +1 -0
  114. package/dist/plugins/generic-oauth/providers/patreon.d.mts +1 -0
  115. package/dist/plugins/generic-oauth/providers/slack.d.mts +1 -0
  116. package/dist/plugins/generic-oauth/providers/yandex.d.mts +1 -0
  117. package/dist/plugins/generic-oauth/types.d.mts +2 -1
  118. package/dist/plugins/haveibeenpwned/index.d.mts +6 -3
  119. package/dist/plugins/index.d.mts +1 -4
  120. package/dist/plugins/jwt/client.d.mts +2 -1
  121. package/dist/plugins/jwt/index.d.mts +12 -9
  122. package/dist/plugins/jwt/sign.d.mts +2 -2
  123. package/dist/plugins/jwt/types.d.mts +1 -1
  124. package/dist/plugins/jwt/utils.d.mts +4 -2
  125. package/dist/plugins/jwt/verify.d.mts +1 -0
  126. package/dist/plugins/last-login-method/index.d.mts +6 -3
  127. package/dist/plugins/magic-link/client.d.mts +1 -0
  128. package/dist/plugins/magic-link/index.d.mts +6 -4
  129. package/dist/plugins/mcp/client/adapters.d.mts +1 -0
  130. package/dist/plugins/mcp/client/index.mjs +2 -4
  131. package/dist/plugins/mcp/index.d.mts +12 -11
  132. package/dist/plugins/multi-session/client.d.mts +4 -2
  133. package/dist/plugins/multi-session/client.mjs +1 -1
  134. package/dist/plugins/multi-session/error-codes.d.mts +3 -1
  135. package/dist/plugins/multi-session/index.d.mts +12 -8
  136. package/dist/plugins/oauth-popup/client.d.mts +12 -6
  137. package/dist/plugins/oauth-popup/client.mjs +3 -5
  138. package/dist/plugins/oauth-popup/error-codes.d.mts +6 -4
  139. package/dist/plugins/oauth-popup/index.d.mts +12 -8
  140. package/dist/plugins/oauth-popup/index.mjs +1 -1
  141. package/dist/plugins/oauth-popup/types.d.mts +2 -1
  142. package/dist/plugins/oauth-proxy/index.d.mts +9 -6
  143. package/dist/plugins/oauth-proxy/index.mjs +2 -2
  144. package/dist/plugins/oidc-provider/client.d.mts +2 -1
  145. package/dist/plugins/oidc-provider/index.d.mts +20 -18
  146. package/dist/plugins/oidc-provider/schema.d.mts +1 -0
  147. package/dist/plugins/oidc-provider/types.d.mts +1 -1
  148. package/dist/plugins/one-tap/client.d.mts +3 -1
  149. package/dist/plugins/one-tap/index.d.mts +3 -1
  150. package/dist/plugins/one-time-token/client.d.mts +2 -1
  151. package/dist/plugins/one-time-token/index.d.mts +7 -6
  152. package/dist/plugins/open-api/generator.d.mts +1 -0
  153. package/dist/plugins/open-api/generator.mjs +5 -5
  154. package/dist/plugins/open-api/index.d.mts +5 -3
  155. package/dist/plugins/organization/access/statement.d.mts +0 -1
  156. package/dist/plugins/organization/adapter.d.mts +82 -56
  157. package/dist/plugins/organization/client.d.mts +103 -104
  158. package/dist/plugins/organization/client.mjs +4 -7
  159. package/dist/plugins/organization/error-codes.d.mts +61 -59
  160. package/dist/plugins/organization/has-permission.d.mts +1 -0
  161. package/dist/plugins/organization/has-permission.mjs +1 -1
  162. package/dist/plugins/organization/index.d.mts +1 -1
  163. package/dist/plugins/organization/organization.d.mts +33 -9
  164. package/dist/plugins/organization/organization.mjs +1 -1
  165. package/dist/plugins/organization/permission.d.mts +2 -2
  166. package/dist/plugins/organization/routes/crud-access-control.d.mts +147 -27
  167. package/dist/plugins/organization/routes/crud-invites.d.mts +186 -65
  168. package/dist/plugins/organization/routes/crud-invites.mjs +1 -1
  169. package/dist/plugins/organization/routes/crud-members.d.mts +178 -56
  170. package/dist/plugins/organization/routes/crud-members.mjs +1 -1
  171. package/dist/plugins/organization/routes/crud-org.d.mts +130 -57
  172. package/dist/plugins/organization/routes/crud-team.d.mts +235 -66
  173. package/dist/plugins/organization/schema.d.mts +4 -4
  174. package/dist/plugins/organization/schema.mjs +1 -1
  175. package/dist/plugins/organization/types.d.mts +14 -14
  176. package/dist/plugins/phone-number/client.d.mts +15 -13
  177. package/dist/plugins/phone-number/client.mjs +1 -1
  178. package/dist/plugins/phone-number/error-codes.d.mts +14 -12
  179. package/dist/plugins/phone-number/index.d.mts +47 -41
  180. package/dist/plugins/phone-number/types.d.mts +1 -1
  181. package/dist/plugins/siwe/client.d.mts +1 -0
  182. package/dist/plugins/siwe/index.d.mts +5 -4
  183. package/dist/plugins/test-utils/index.d.mts +4 -2
  184. package/dist/plugins/test-utils/types.d.mts +0 -1
  185. package/dist/plugins/two-factor/backup-codes/index.d.mts +7 -5
  186. package/dist/plugins/two-factor/backup-codes/index.mjs +1 -1
  187. package/dist/plugins/two-factor/client.d.mts +15 -12
  188. package/dist/plugins/two-factor/client.mjs +1 -1
  189. package/dist/plugins/two-factor/error-code.d.mts +12 -10
  190. package/dist/plugins/two-factor/index.d.mts +36 -32
  191. package/dist/plugins/two-factor/otp/index.d.mts +4 -2
  192. package/dist/plugins/two-factor/totp/index.d.mts +7 -5
  193. package/dist/plugins/two-factor/types.d.mts +1 -1
  194. package/dist/plugins/username/client.d.mts +11 -9
  195. package/dist/plugins/username/client.mjs +1 -1
  196. package/dist/plugins/username/error-codes.d.mts +10 -8
  197. package/dist/plugins/username/index.d.mts +22 -17
  198. package/dist/plugins/username/schema.d.mts +5 -3
  199. package/dist/state.d.mts +1 -0
  200. package/dist/test-utils/test-instance.d.mts +3 -5
  201. package/dist/types/adapter.d.mts +1 -1
  202. package/dist/types/api.d.mts +2 -1
  203. package/dist/types/auth.d.mts +1 -0
  204. package/dist/types/helper.d.mts +5 -5
  205. package/dist/types/index.d.mts +2 -2
  206. package/dist/types/models.d.mts +1 -0
  207. package/dist/types/plugins.d.mts +3 -2
  208. package/dist/utils/index.d.mts +1 -2
  209. package/dist/utils/url.d.mts +1 -0
  210. package/package.json +12 -11
@@ -1,10 +1,9 @@
1
1
  import { Session as Session$1, User as User$1 } from "../../types/models.mjs";
2
- import "../../types/index.mjs";
3
2
  import { AccessControl, Role } from "../access/types.mjs";
4
- import "../access/index.mjs";
5
3
  import { Invitation, Member, Organization, OrganizationRole, Team, TeamMember } from "./schema.mjs";
6
4
  import { AuthContext, Awaitable, GenericEndpointContext } from "@better-auth/core";
7
5
  import { DBFieldAttribute } from "@better-auth/core/db";
6
+
8
7
  //#region src/plugins/organization/types.d.ts
9
8
  interface OrganizationOptions {
10
9
  /**
@@ -60,7 +59,7 @@ interface OrganizationOptions {
60
59
  /**
61
60
  * Custom permissions for roles.
62
61
  */
63
- roles?: { [key in string]?: Role<any>; } | undefined;
62
+ roles?: { [key in string]?: Role<any> } | undefined;
64
63
  /**
65
64
  * Dynamic access control for the organization plugin.
66
65
  */
@@ -243,6 +242,7 @@ interface OrganizationOptions {
243
242
  /**
244
243
  * The request object
245
244
  */
245
+
246
246
  request?: Request) => Promise<void>) | undefined;
247
247
  /**
248
248
  * The schema for the organization plugin.
@@ -256,32 +256,32 @@ interface OrganizationOptions {
256
256
  };
257
257
  organization?: {
258
258
  modelName?: string;
259
- fields?: { [key in keyof Omit<Organization, "id">]?: string; };
260
- additionalFields?: { [key in string]: DBFieldAttribute; };
259
+ fields?: { [key in keyof Omit<Organization, "id">]?: string };
260
+ additionalFields?: { [key in string]: DBFieldAttribute };
261
261
  };
262
262
  member?: {
263
263
  modelName?: string;
264
- fields?: { [key in keyof Omit<Member, "id">]?: string; };
265
- additionalFields?: { [key in string]: DBFieldAttribute; };
264
+ fields?: { [key in keyof Omit<Member, "id">]?: string };
265
+ additionalFields?: { [key in string]: DBFieldAttribute };
266
266
  };
267
267
  invitation?: {
268
268
  modelName?: string;
269
- fields?: { [key in keyof Omit<Invitation, "id">]?: string; };
270
- additionalFields?: { [key in string]: DBFieldAttribute; };
269
+ fields?: { [key in keyof Omit<Invitation, "id">]?: string };
270
+ additionalFields?: { [key in string]: DBFieldAttribute };
271
271
  };
272
272
  team?: {
273
273
  modelName?: string;
274
- fields?: { [key in keyof Omit<Team, "id">]?: string; };
275
- additionalFields?: { [key in string]: DBFieldAttribute; };
274
+ fields?: { [key in keyof Omit<Team, "id">]?: string };
275
+ additionalFields?: { [key in string]: DBFieldAttribute };
276
276
  };
277
277
  teamMember?: {
278
278
  modelName?: string;
279
- fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
279
+ fields?: { [key in keyof Omit<TeamMember, "id">]?: string };
280
280
  };
281
281
  organizationRole?: {
282
282
  modelName?: string;
283
- fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
284
- additionalFields?: { [key in string]: DBFieldAttribute; };
283
+ fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string };
284
+ additionalFields?: { [key in string]: DBFieldAttribute };
285
285
  };
286
286
  } | undefined;
287
287
  /**
@@ -1,6 +1,8 @@
1
1
  import { PhoneNumberOptions, UserWithPhoneNumber } from "./types.mjs";
2
2
  import { phoneNumber } from "./index.mjs";
3
3
  import { PHONE_NUMBER_ERROR_CODES } from "./error-codes.mjs";
4
+ import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
5
+
4
6
  //#region src/plugins/phone-number/client.d.ts
5
7
  declare const phoneNumberClient: () => {
6
8
  id: "phoneNumber";
@@ -11,19 +13,19 @@ declare const phoneNumberClient: () => {
11
13
  signal: "$sessionSignal";
12
14
  }[];
13
15
  $ERROR_CODES: {
14
- OTP_EXPIRED: import("@better-auth/core/utils/error-codes").RawError<"OTP_EXPIRED">;
15
- INVALID_OTP: import("@better-auth/core/utils/error-codes").RawError<"INVALID_OTP">;
16
- TOO_MANY_ATTEMPTS: import("@better-auth/core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
17
- INVALID_PHONE_NUMBER: import("@better-auth/core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER">;
18
- PHONE_NUMBER_EXIST: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_EXIST">;
19
- PHONE_NUMBER_NOT_EXIST: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_EXIST">;
20
- INVALID_PHONE_NUMBER_OR_PASSWORD: import("@better-auth/core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
21
- UNEXPECTED_ERROR: import("@better-auth/core/utils/error-codes").RawError<"UNEXPECTED_ERROR">;
22
- OTP_NOT_FOUND: import("@better-auth/core/utils/error-codes").RawError<"OTP_NOT_FOUND">;
23
- PHONE_NUMBER_NOT_VERIFIED: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
24
- PHONE_NUMBER_CANNOT_BE_UPDATED: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
25
- SEND_OTP_NOT_IMPLEMENTED: import("@better-auth/core/utils/error-codes").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
16
+ OTP_EXPIRED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_EXPIRED">;
17
+ INVALID_OTP: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_OTP">;
18
+ TOO_MANY_ATTEMPTS: _$_better_auth_core_utils_error_codes0.RawError<"TOO_MANY_ATTEMPTS">;
19
+ INVALID_PHONE_NUMBER: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_PHONE_NUMBER">;
20
+ PHONE_NUMBER_EXIST: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_EXIST">;
21
+ PHONE_NUMBER_NOT_EXIST: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_NOT_EXIST">;
22
+ INVALID_PHONE_NUMBER_OR_PASSWORD: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
23
+ UNEXPECTED_ERROR: _$_better_auth_core_utils_error_codes0.RawError<"UNEXPECTED_ERROR">;
24
+ OTP_NOT_FOUND: _$_better_auth_core_utils_error_codes0.RawError<"OTP_NOT_FOUND">;
25
+ PHONE_NUMBER_NOT_VERIFIED: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_NOT_VERIFIED">;
26
+ PHONE_NUMBER_CANNOT_BE_UPDATED: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
27
+ SEND_OTP_NOT_IMPLEMENTED: _$_better_auth_core_utils_error_codes0.RawError<"SEND_OTP_NOT_IMPLEMENTED">;
26
28
  };
27
29
  };
28
30
  //#endregion
29
- export { PHONE_NUMBER_ERROR_CODES, type PhoneNumberOptions, type UserWithPhoneNumber, phoneNumberClient };
31
+ export { phoneNumberClient };
@@ -16,4 +16,4 @@ const phoneNumberClient = () => {
16
16
  };
17
17
  };
18
18
  //#endregion
19
- export { PHONE_NUMBER_ERROR_CODES, phoneNumberClient };
19
+ export { phoneNumberClient };
@@ -1,17 +1,19 @@
1
+ import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
2
+
1
3
  //#region src/plugins/phone-number/error-codes.d.ts
2
4
  declare const PHONE_NUMBER_ERROR_CODES: {
3
- OTP_EXPIRED: import("@better-auth/core/utils/error-codes").RawError<"OTP_EXPIRED">;
4
- INVALID_OTP: import("@better-auth/core/utils/error-codes").RawError<"INVALID_OTP">;
5
- TOO_MANY_ATTEMPTS: import("@better-auth/core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
6
- INVALID_PHONE_NUMBER: import("@better-auth/core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER">;
7
- PHONE_NUMBER_EXIST: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_EXIST">;
8
- PHONE_NUMBER_NOT_EXIST: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_EXIST">;
9
- INVALID_PHONE_NUMBER_OR_PASSWORD: import("@better-auth/core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
10
- UNEXPECTED_ERROR: import("@better-auth/core/utils/error-codes").RawError<"UNEXPECTED_ERROR">;
11
- OTP_NOT_FOUND: import("@better-auth/core/utils/error-codes").RawError<"OTP_NOT_FOUND">;
12
- PHONE_NUMBER_NOT_VERIFIED: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
13
- PHONE_NUMBER_CANNOT_BE_UPDATED: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
14
- SEND_OTP_NOT_IMPLEMENTED: import("@better-auth/core/utils/error-codes").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
5
+ OTP_EXPIRED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_EXPIRED">;
6
+ INVALID_OTP: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_OTP">;
7
+ TOO_MANY_ATTEMPTS: _$_better_auth_core_utils_error_codes0.RawError<"TOO_MANY_ATTEMPTS">;
8
+ INVALID_PHONE_NUMBER: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_PHONE_NUMBER">;
9
+ PHONE_NUMBER_EXIST: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_EXIST">;
10
+ PHONE_NUMBER_NOT_EXIST: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_NOT_EXIST">;
11
+ INVALID_PHONE_NUMBER_OR_PASSWORD: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
12
+ UNEXPECTED_ERROR: _$_better_auth_core_utils_error_codes0.RawError<"UNEXPECTED_ERROR">;
13
+ OTP_NOT_FOUND: _$_better_auth_core_utils_error_codes0.RawError<"OTP_NOT_FOUND">;
14
+ PHONE_NUMBER_NOT_VERIFIED: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_NOT_VERIFIED">;
15
+ PHONE_NUMBER_CANNOT_BE_UPDATED: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
16
+ SEND_OTP_NOT_IMPLEMENTED: _$_better_auth_core_utils_error_codes0.RawError<"SEND_OTP_NOT_IMPLEMENTED">;
15
17
  };
16
18
  //#endregion
17
19
  export { PHONE_NUMBER_ERROR_CODES };
@@ -1,4 +1,10 @@
1
1
  import { PhoneNumberOptions, UserWithPhoneNumber } from "./types.mjs";
2
+ import * as _$_better_auth_core0 from "@better-auth/core";
3
+ import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
4
+ import * as _$better_call0 from "better-call";
5
+ import * as _$zod from "zod";
6
+ import * as _$zod_v4_core0 from "zod/v4/core";
7
+
2
8
  //#region src/plugins/phone-number/index.d.ts
3
9
  declare module "@better-auth/core" {
4
10
  interface BetterAuthPluginRegistry<AuthOptions, Options> {
@@ -42,18 +48,18 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
42
48
  };
43
49
  hooks: {
44
50
  before: {
45
- matcher: (ctx: import("@better-auth/core").HookEndpointContext) => boolean;
46
- handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never>;
51
+ matcher: (ctx: _$_better_auth_core0.HookEndpointContext) => boolean;
52
+ handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<never>>;
47
53
  }[];
48
54
  };
49
55
  endpoints: {
50
- signInPhoneNumber: import("better-call").StrictEndpoint<"/sign-in/phone-number", {
56
+ signInPhoneNumber: _$better_call0.StrictEndpoint<"/sign-in/phone-number", {
51
57
  method: "POST";
52
- body: import("zod").ZodObject<{
53
- phoneNumber: import("zod").ZodString;
54
- password: import("zod").ZodString;
55
- rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
56
- }, import("zod/v4/core").$strip>;
58
+ body: _$zod.ZodObject<{
59
+ phoneNumber: _$zod.ZodString;
60
+ password: _$zod.ZodString;
61
+ rememberMe: _$zod.ZodOptional<_$zod.ZodBoolean>;
62
+ }, _$zod_v4_core0.$strip>;
57
63
  metadata: {
58
64
  openapi: {
59
65
  summary: string;
@@ -87,11 +93,11 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
87
93
  token: string;
88
94
  user: UserWithPhoneNumber;
89
95
  }>;
90
- sendPhoneNumberOTP: import("better-call").StrictEndpoint<"/phone-number/send-otp", {
96
+ sendPhoneNumberOTP: _$better_call0.StrictEndpoint<"/phone-number/send-otp", {
91
97
  method: "POST";
92
- body: import("zod").ZodObject<{
93
- phoneNumber: import("zod").ZodString;
94
- }, import("zod/v4/core").$strip>;
98
+ body: _$zod.ZodObject<{
99
+ phoneNumber: _$zod.ZodString;
100
+ }, _$zod_v4_core0.$strip>;
95
101
  metadata: {
96
102
  openapi: {
97
103
  summary: string;
@@ -118,14 +124,14 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
118
124
  }, {
119
125
  message: string;
120
126
  }>;
121
- verifyPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/verify", {
127
+ verifyPhoneNumber: _$better_call0.StrictEndpoint<"/phone-number/verify", {
122
128
  method: "POST";
123
- body: import("zod").ZodIntersection<import("zod").ZodObject<{
124
- phoneNumber: import("zod").ZodString;
125
- code: import("zod").ZodString;
126
- disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
127
- updatePhoneNumber: import("zod").ZodOptional<import("zod").ZodBoolean>;
128
- }, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
129
+ body: _$zod.ZodIntersection<_$zod.ZodObject<{
130
+ phoneNumber: _$zod.ZodString;
131
+ code: _$zod.ZodString;
132
+ disableSession: _$zod.ZodOptional<_$zod.ZodBoolean>;
133
+ updatePhoneNumber: _$zod.ZodOptional<_$zod.ZodBoolean>;
134
+ }, _$zod_v4_core0.$strip>, _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
129
135
  metadata: {
130
136
  openapi: {
131
137
  summary: string;
@@ -229,11 +235,11 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
229
235
  token: null;
230
236
  user: UserWithPhoneNumber;
231
237
  }>;
232
- requestPasswordResetPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/request-password-reset", {
238
+ requestPasswordResetPhoneNumber: _$better_call0.StrictEndpoint<"/phone-number/request-password-reset", {
233
239
  method: "POST";
234
- body: import("zod").ZodObject<{
235
- phoneNumber: import("zod").ZodString;
236
- }, import("zod/v4/core").$strip>;
240
+ body: _$zod.ZodObject<{
241
+ phoneNumber: _$zod.ZodString;
242
+ }, _$zod_v4_core0.$strip>;
237
243
  metadata: {
238
244
  openapi: {
239
245
  description: string;
@@ -262,13 +268,13 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
262
268
  }, {
263
269
  status: boolean;
264
270
  }>;
265
- resetPasswordPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/reset-password", {
271
+ resetPasswordPhoneNumber: _$better_call0.StrictEndpoint<"/phone-number/reset-password", {
266
272
  method: "POST";
267
- body: import("zod").ZodObject<{
268
- otp: import("zod").ZodString;
269
- phoneNumber: import("zod").ZodString;
270
- newPassword: import("zod").ZodString;
271
- }, import("zod/v4/core").$strip>;
273
+ body: _$zod.ZodObject<{
274
+ otp: _$zod.ZodString;
275
+ phoneNumber: _$zod.ZodString;
276
+ newPassword: _$zod.ZodString;
277
+ }, _$zod_v4_core0.$strip>;
272
278
  metadata: {
273
279
  openapi: {
274
280
  description: string;
@@ -324,18 +330,18 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
324
330
  }[];
325
331
  options: PhoneNumberOptions | undefined;
326
332
  $ERROR_CODES: {
327
- OTP_EXPIRED: import("@better-auth/core/utils/error-codes").RawError<"OTP_EXPIRED">;
328
- INVALID_OTP: import("@better-auth/core/utils/error-codes").RawError<"INVALID_OTP">;
329
- TOO_MANY_ATTEMPTS: import("@better-auth/core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
330
- INVALID_PHONE_NUMBER: import("@better-auth/core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER">;
331
- PHONE_NUMBER_EXIST: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_EXIST">;
332
- PHONE_NUMBER_NOT_EXIST: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_EXIST">;
333
- INVALID_PHONE_NUMBER_OR_PASSWORD: import("@better-auth/core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
334
- UNEXPECTED_ERROR: import("@better-auth/core/utils/error-codes").RawError<"UNEXPECTED_ERROR">;
335
- OTP_NOT_FOUND: import("@better-auth/core/utils/error-codes").RawError<"OTP_NOT_FOUND">;
336
- PHONE_NUMBER_NOT_VERIFIED: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
337
- PHONE_NUMBER_CANNOT_BE_UPDATED: import("@better-auth/core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
338
- SEND_OTP_NOT_IMPLEMENTED: import("@better-auth/core/utils/error-codes").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
333
+ OTP_EXPIRED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_EXPIRED">;
334
+ INVALID_OTP: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_OTP">;
335
+ TOO_MANY_ATTEMPTS: _$_better_auth_core_utils_error_codes0.RawError<"TOO_MANY_ATTEMPTS">;
336
+ INVALID_PHONE_NUMBER: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_PHONE_NUMBER">;
337
+ PHONE_NUMBER_EXIST: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_EXIST">;
338
+ PHONE_NUMBER_NOT_EXIST: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_NOT_EXIST">;
339
+ INVALID_PHONE_NUMBER_OR_PASSWORD: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
340
+ UNEXPECTED_ERROR: _$_better_auth_core_utils_error_codes0.RawError<"UNEXPECTED_ERROR">;
341
+ OTP_NOT_FOUND: _$_better_auth_core_utils_error_codes0.RawError<"OTP_NOT_FOUND">;
342
+ PHONE_NUMBER_NOT_VERIFIED: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_NOT_VERIFIED">;
343
+ PHONE_NUMBER_CANNOT_BE_UPDATED: _$_better_auth_core_utils_error_codes0.RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
344
+ SEND_OTP_NOT_IMPLEMENTED: _$_better_auth_core_utils_error_codes0.RawError<"SEND_OTP_NOT_IMPLEMENTED">;
339
345
  };
340
346
  };
341
347
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { User } from "../../types/models.mjs";
2
2
  import { InferOptionSchema } from "../../types/plugins.mjs";
3
- import "../../types/index.mjs";
4
3
  import { schema } from "./schema.mjs";
5
4
  import { Awaitable, GenericEndpointContext } from "@better-auth/core";
5
+
6
6
  //#region src/plugins/phone-number/types.d.ts
7
7
  interface UserWithPhoneNumber extends User {
8
8
  phoneNumber: string;
@@ -1,4 +1,5 @@
1
1
  import { siwe } from "./index.mjs";
2
+
2
3
  //#region src/plugins/siwe/client.d.ts
3
4
  declare const siweClient: () => {
4
5
  id: "siwe";
@@ -1,8 +1,9 @@
1
1
  import { InferOptionSchema } from "../../types/plugins.mjs";
2
- import "../../types/index.mjs";
3
2
  import { WalletAddressSchema, schema } from "./schema.mjs";
4
3
  import { ENSLookupArgs, ENSLookupResult, SIWEVerifyMessageArgs } from "./types.mjs";
4
+ import * as _$better_call0 from "better-call";
5
5
  import * as z from "zod";
6
+
6
7
  //#region src/plugins/siwe/index.d.ts
7
8
  declare module "@better-auth/core" {
8
9
  interface BetterAuthPluginRegistry<AuthOptions, Options> {
@@ -25,7 +26,7 @@ declare const siwe: (options: SIWEPluginOptions) => {
25
26
  version: string;
26
27
  schema: WalletAddressSchema;
27
28
  endpoints: {
28
- getSiweNonce: import("better-call").StrictEndpoint<"/siwe/nonce" | "/siwe/get-nonce", {
29
+ getSiweNonce: _$better_call0.StrictEndpoint<"/siwe/nonce" | "/siwe/get-nonce", {
29
30
  method: "POST";
30
31
  body: z.ZodObject<{
31
32
  walletAddress: z.ZodOptional<z.ZodString>;
@@ -35,7 +36,7 @@ declare const siwe: (options: SIWEPluginOptions) => {
35
36
  }, {
36
37
  nonce: string;
37
38
  }>;
38
- getNonce: import("better-call").StrictEndpoint<"/siwe/nonce" | "/siwe/get-nonce", {
39
+ getNonce: _$better_call0.StrictEndpoint<"/siwe/nonce" | "/siwe/get-nonce", {
39
40
  method: "POST";
40
41
  body: z.ZodObject<{
41
42
  walletAddress: z.ZodOptional<z.ZodString>;
@@ -45,7 +46,7 @@ declare const siwe: (options: SIWEPluginOptions) => {
45
46
  }, {
46
47
  nonce: string;
47
48
  }>;
48
- verifySiweMessage: import("better-call").StrictEndpoint<"/siwe/verify", {
49
+ verifySiweMessage: _$better_call0.StrictEndpoint<"/siwe/verify", {
49
50
  method: "POST";
50
51
  body: z.ZodObject<{
51
52
  message: z.ZodString;
@@ -1,4 +1,6 @@
1
1
  import { LoginResult, TestCookie, TestHelpers, TestUtilsOptions } from "./types.mjs";
2
+ import * as _$_better_auth_core0 from "@better-auth/core";
3
+
2
4
  //#region src/plugins/test-utils/index.d.ts
3
5
  declare module "@better-auth/core" {
4
6
  interface BetterAuthPluginRegistry<AuthOptions, Options> {
@@ -48,7 +50,7 @@ declare module "@better-auth/core" {
48
50
  declare const testUtils: (options?: TestUtilsOptions) => {
49
51
  id: "test-utils";
50
52
  version: string;
51
- init(ctx: import("@better-auth/core").AuthContext): {
53
+ init(ctx: _$_better_auth_core0.AuthContext): {
52
54
  context: {
53
55
  test: TestHelpers;
54
56
  };
@@ -68,4 +70,4 @@ declare const testUtils: (options?: TestUtilsOptions) => {
68
70
  options: TestUtilsOptions;
69
71
  };
70
72
  //#endregion
71
- export { type LoginResult, type TestCookie, type TestHelpers, type TestUtilsOptions, testUtils };
73
+ export { testUtils };
@@ -1,5 +1,4 @@
1
1
  import { Session, User } from "../../types/models.mjs";
2
- import "../../types/index.mjs";
3
2
  //#region src/plugins/test-utils/types.d.ts
4
3
  interface TestUtilsOptions {
5
4
  /** Capture OTPs in memory when created (doesn't prevent sending) */
@@ -1,6 +1,8 @@
1
1
  import { SecretConfig } from "../../../crypto/index.mjs";
2
2
  import { UserWithTwoFactor } from "../types.mjs";
3
+ import * as _$better_call0 from "better-call";
3
4
  import * as z from "zod";
5
+
4
6
  //#region src/plugins/two-factor/backup-codes/index.d.ts
5
7
  interface BackupCodeOptions {
6
8
  /**
@@ -69,7 +71,7 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
69
71
  *
70
72
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/2fa#api-method-two-factor-verify-backup-code)
71
73
  */
72
- verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
74
+ verifyBackupCode: _$better_call0.StrictEndpoint<"/two-factor/verify-backup-code", {
73
75
  method: "POST";
74
76
  body: z.ZodObject<{
75
77
  code: z.ZodString;
@@ -195,14 +197,14 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
195
197
  *
196
198
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/2fa#api-method-two-factor-generate-backup-codes)
197
199
  */
198
- generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
200
+ generateBackupCodes: _$better_call0.StrictEndpoint<"/two-factor/generate-backup-codes", {
199
201
  method: "POST";
200
202
  body: z.ZodObject<{
201
203
  password: z.ZodOptional<z.ZodString>;
202
204
  }, z.core.$strip> | z.ZodObject<{
203
205
  password: z.ZodString;
204
206
  }, z.core.$strip>;
205
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
207
+ use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
206
208
  session: {
207
209
  session: Record<string, any> & {
208
210
  id: string;
@@ -224,7 +226,7 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
224
226
  image?: string | null | undefined;
225
227
  };
226
228
  };
227
- }>)[];
229
+ }>>[];
228
230
  metadata: {
229
231
  openapi: {
230
232
  description: string;
@@ -274,7 +276,7 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
274
276
  *
275
277
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/2fa#api-method-two-factor-view-backup-codes)
276
278
  */
277
- viewBackupCodes: import("better-call").StrictEndpoint<string, {
279
+ viewBackupCodes: _$better_call0.StrictEndpoint<string, {
278
280
  method: "POST";
279
281
  body: z.ZodObject<{
280
282
  userId: z.ZodCoercedString<unknown>;
@@ -338,4 +338,4 @@ const backupCode2fa = (opts) => {
338
338
  };
339
339
  };
340
340
  //#endregion
341
- export { backupCode2fa, encodeBackupCodes, generateBackupCodes, getBackupCodes, verifyBackupCode };
341
+ export { backupCode2fa, generateBackupCodes };
@@ -4,6 +4,9 @@ import { TOTPOptions, totp2fa } from "./totp/index.mjs";
4
4
  import { TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor } from "./types.mjs";
5
5
  import { TWO_FACTOR_ERROR_CODES } from "./error-code.mjs";
6
6
  import { twoFactor } from "./index.mjs";
7
+ import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
8
+ import * as _$_better_fetch_fetch0 from "@better-fetch/fetch";
9
+
7
10
  //#region src/plugins/two-factor/client.d.ts
8
11
  declare const twoFactorClient: (options?: {
9
12
  /**
@@ -50,21 +53,21 @@ declare const twoFactorClient: (options?: {
50
53
  id: string;
51
54
  name: string;
52
55
  hooks: {
53
- onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
56
+ onSuccess(context: _$_better_fetch_fetch0.SuccessContext<any>): Promise<void>;
54
57
  };
55
58
  }[];
56
59
  $ERROR_CODES: {
57
- OTP_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"OTP_NOT_ENABLED">;
58
- OTP_HAS_EXPIRED: import("@better-auth/core/utils/error-codes").RawError<"OTP_HAS_EXPIRED">;
59
- TOTP_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"TOTP_NOT_ENABLED">;
60
- TWO_FACTOR_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"TWO_FACTOR_NOT_ENABLED">;
61
- BACKUP_CODES_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"BACKUP_CODES_NOT_ENABLED">;
62
- INVALID_BACKUP_CODE: import("@better-auth/core/utils/error-codes").RawError<"INVALID_BACKUP_CODE">;
63
- INVALID_CODE: import("@better-auth/core/utils/error-codes").RawError<"INVALID_CODE">;
64
- TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("@better-auth/core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
65
- ACCOUNT_TEMPORARILY_LOCKED: import("@better-auth/core/utils/error-codes").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
66
- INVALID_TWO_FACTOR_COOKIE: import("@better-auth/core/utils/error-codes").RawError<"INVALID_TWO_FACTOR_COOKIE">;
60
+ OTP_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_NOT_ENABLED">;
61
+ OTP_HAS_EXPIRED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_HAS_EXPIRED">;
62
+ TOTP_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_ENABLED">;
63
+ TWO_FACTOR_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"TWO_FACTOR_NOT_ENABLED">;
64
+ BACKUP_CODES_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"BACKUP_CODES_NOT_ENABLED">;
65
+ INVALID_BACKUP_CODE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_BACKUP_CODE">;
66
+ INVALID_CODE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_CODE">;
67
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: _$_better_auth_core_utils_error_codes0.RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
68
+ ACCOUNT_TEMPORARILY_LOCKED: _$_better_auth_core_utils_error_codes0.RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
69
+ INVALID_TWO_FACTOR_COOKIE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_TWO_FACTOR_COOKIE">;
67
70
  };
68
71
  };
69
72
  //#endregion
70
- export { type BackupCodeOptions, type OTPOptions, type TOTPOptions, TWO_FACTOR_ERROR_CODES, type TwoFactorOptions, type TwoFactorProvider, type TwoFactorTable, type UserWithTwoFactor, type backupCode2fa, type encodeBackupCodes, type generateBackupCodes, type getBackupCodes, type otp2fa, type totp2fa, twoFactorClient, type verifyBackupCode };
73
+ export { twoFactorClient };
@@ -38,4 +38,4 @@ const twoFactorClient = (options) => {
38
38
  };
39
39
  };
40
40
  //#endregion
41
- export { TWO_FACTOR_ERROR_CODES, twoFactorClient };
41
+ export { twoFactorClient };
@@ -1,15 +1,17 @@
1
+ import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
2
+
1
3
  //#region src/plugins/two-factor/error-code.d.ts
2
4
  declare const TWO_FACTOR_ERROR_CODES: {
3
- OTP_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"OTP_NOT_ENABLED">;
4
- OTP_HAS_EXPIRED: import("@better-auth/core/utils/error-codes").RawError<"OTP_HAS_EXPIRED">;
5
- TOTP_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"TOTP_NOT_ENABLED">;
6
- TWO_FACTOR_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"TWO_FACTOR_NOT_ENABLED">;
7
- BACKUP_CODES_NOT_ENABLED: import("@better-auth/core/utils/error-codes").RawError<"BACKUP_CODES_NOT_ENABLED">;
8
- INVALID_BACKUP_CODE: import("@better-auth/core/utils/error-codes").RawError<"INVALID_BACKUP_CODE">;
9
- INVALID_CODE: import("@better-auth/core/utils/error-codes").RawError<"INVALID_CODE">;
10
- TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("@better-auth/core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
11
- ACCOUNT_TEMPORARILY_LOCKED: import("@better-auth/core/utils/error-codes").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
12
- INVALID_TWO_FACTOR_COOKIE: import("@better-auth/core/utils/error-codes").RawError<"INVALID_TWO_FACTOR_COOKIE">;
5
+ OTP_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_NOT_ENABLED">;
6
+ OTP_HAS_EXPIRED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_HAS_EXPIRED">;
7
+ TOTP_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_ENABLED">;
8
+ TWO_FACTOR_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"TWO_FACTOR_NOT_ENABLED">;
9
+ BACKUP_CODES_NOT_ENABLED: _$_better_auth_core_utils_error_codes0.RawError<"BACKUP_CODES_NOT_ENABLED">;
10
+ INVALID_BACKUP_CODE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_BACKUP_CODE">;
11
+ INVALID_CODE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_CODE">;
12
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: _$_better_auth_core_utils_error_codes0.RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
13
+ ACCOUNT_TEMPORARILY_LOCKED: _$_better_auth_core_utils_error_codes0.RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
14
+ INVALID_TWO_FACTOR_COOKIE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_TWO_FACTOR_COOKIE">;
13
15
  };
14
16
  //#endregion
15
17
  export { TWO_FACTOR_ERROR_CODES };