better-auth 1.4.4-beta.3 → 1.4.6-beta.2

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 (78) hide show
  1. package/dist/{adapter-factory-CXEYdBBi.mjs → adapter-factory-HF3JB9cT.mjs} +2 -0
  2. package/dist/adapters/drizzle-adapter/index.mjs +1 -1
  3. package/dist/adapters/index.d.mts +6 -7
  4. package/dist/adapters/index.mjs +1 -1
  5. package/dist/adapters/kysely-adapter/index.mjs +1 -1
  6. package/dist/adapters/memory-adapter/index.mjs +1 -1
  7. package/dist/adapters/mongodb-adapter/index.mjs +1 -1
  8. package/dist/adapters/prisma-adapter/index.mjs +1 -1
  9. package/dist/api/index.d.mts +2 -3
  10. package/dist/auth/minimal.d.mts +2 -3
  11. package/dist/client/index.d.mts +201 -4
  12. package/dist/client/lynx/index.d.mts +17 -18
  13. package/dist/client/plugins/index.d.mts +44 -44
  14. package/dist/client/react/index.d.mts +15 -16
  15. package/dist/client/solid/index.d.mts +2 -3
  16. package/dist/client/svelte/index.d.mts +17 -18
  17. package/dist/client/vue/index.d.mts +17 -18
  18. package/dist/cookies/index.d.mts +3 -4
  19. package/dist/db/index.d.mts +2 -3
  20. package/dist/{index-BsRgjUAv.d.mts → index--dkKT2P2.d.mts} +5 -5
  21. package/dist/{index-BVJL9NCo.d.mts → index-73Iin-Jq.d.mts} +6 -6
  22. package/dist/{index-B_1KAoYv.d.mts → index-BVpFCwyn.d.mts} +4 -4
  23. package/dist/{index-CL-QZ1hb.d.mts → index-BcnaxwZM.d.mts} +9 -9
  24. package/dist/{index-CnSDnpiK.d.mts → index-Be0syNaw.d.mts} +13 -13
  25. package/dist/{index-CJ4w3OzO.d.mts → index-BevOkArW.d.mts} +155 -347
  26. package/dist/{index-Br01_oSy.d.mts → index-BfHctM9K.d.mts} +7 -7
  27. package/dist/{index-Hid3pW0N.d.mts → index-Bqj2Kztr.d.mts} +9 -9
  28. package/dist/{index-DAPxdOKi.d.mts → index-Bt92FfJd.d.mts} +32 -32
  29. package/dist/{index-Dy2g8XKv.d.mts → index-BvZWUEoC.d.mts} +6 -6
  30. package/dist/{index-0xgBgtem.d.mts → index-CGKooORC.d.mts} +3 -3
  31. package/dist/{index-BkD9iyuk.d.mts → index-CLll1XPI.d.mts} +8 -8
  32. package/dist/{index-WXoTnrFA.d.mts → index-CWcnHbjn.d.mts} +2 -2
  33. package/dist/{index-DrEnqtuQ.d.mts → index-CfdutUAu.d.mts} +6 -6
  34. package/dist/{index-COEqRbac.d.mts → index-D0UwTS5_.d.mts} +15 -15
  35. package/dist/{index-BGKXL3Av.d.mts → index-DA5jLHwS.d.mts} +1 -1
  36. package/dist/{index-CGBSkAO7.d.mts → index-DlOKn_yt.d.mts} +11 -11
  37. package/dist/{index-CujXvEf8.d.mts → index-Dqjfj0PE.d.mts} +344 -344
  38. package/dist/{index-wHdZCXFM.d.mts → index-RbmRVtaI.d.mts} +3 -3
  39. package/dist/{index-DgwGZQ6M.d.mts → index-akAuJUJt.d.mts} +8 -8
  40. package/dist/{index-DqkPFN8B.d.mts → index-hBQ1qSDX.d.mts} +4 -4
  41. package/dist/{index-K2ZMxFny.d.mts → index-pQ7I9EOb.d.mts} +2 -2
  42. package/dist/index.d.mts +4 -5
  43. package/dist/integrations/next-js.d.mts +4 -4
  44. package/dist/integrations/node.d.mts +2 -3
  45. package/dist/integrations/svelte-kit.d.mts +4 -5
  46. package/dist/integrations/tanstack-start.d.mts +2 -2
  47. package/dist/oauth2/index.d.mts +2 -3
  48. package/dist/plugins/access/index.d.mts +1 -1
  49. package/dist/plugins/admin/access/index.d.mts +23 -23
  50. package/dist/plugins/admin/index.d.mts +23 -23
  51. package/dist/plugins/anonymous/index.d.mts +3 -4
  52. package/dist/plugins/bearer/index.d.mts +1 -1
  53. package/dist/plugins/captcha/index.d.mts +1 -1
  54. package/dist/plugins/custom-session/index.d.mts +3 -4
  55. package/dist/plugins/device-authorization/index.d.mts +1 -1
  56. package/dist/plugins/email-otp/index.d.mts +1 -1
  57. package/dist/plugins/generic-oauth/index.d.mts +3 -4
  58. package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
  59. package/dist/plugins/index.d.mts +23 -23
  60. package/dist/plugins/jwt/index.d.mts +3 -4
  61. package/dist/plugins/magic-link/index.d.mts +1 -1
  62. package/dist/plugins/multi-session/index.d.mts +1 -1
  63. package/dist/plugins/oauth-proxy/index.d.mts +1 -1
  64. package/dist/plugins/oidc-provider/index.d.mts +23 -23
  65. package/dist/plugins/one-tap/index.d.mts +1 -1
  66. package/dist/plugins/one-time-token/index.d.mts +3 -4
  67. package/dist/plugins/open-api/index.d.mts +1 -1
  68. package/dist/plugins/organization/access/index.d.mts +23 -23
  69. package/dist/plugins/organization/index.d.mts +23 -23
  70. package/dist/plugins/phone-number/index.d.mts +3 -4
  71. package/dist/plugins/siwe/index.d.mts +3 -4
  72. package/dist/plugins/two-factor/index.d.mts +3 -4
  73. package/dist/plugins/username/index.d.mts +2 -2
  74. package/dist/test-utils/index.d.mts +1152 -1153
  75. package/dist/types/index.d.mts +4 -5
  76. package/package.json +3 -3
  77. /package/dist/{index-D8MBzSjs.d.mts → index-rnNTrfA7.d.mts} +0 -0
  78. /package/dist/{plugins-SfZpwDiz.d.mts → plugins-Dmw3tk5H.d.mts} +0 -0
@@ -1,13 +1,12 @@
1
- import { bn as SessionQueryParams, fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-CJ4w3OzO.mjs";
1
+ import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions, tn as SessionQueryParams } from "../../index-BevOkArW.mjs";
2
2
  import "../../types-CEepZ-RG.mjs";
3
3
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
4
- import "../../index-D8MBzSjs.mjs";
5
- import "../../plugins-SfZpwDiz.mjs";
4
+ import "../../plugins-Dmw3tk5H.mjs";
6
5
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
7
6
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
8
7
  import * as nanostores0 from "nanostores";
9
8
  import { Store, StoreValue } from "nanostores";
10
- import * as _better_fetch_fetch0 from "@better-fetch/fetch";
9
+ import * as _better_fetch_fetch15 from "@better-fetch/fetch";
11
10
  import { BetterFetchError } from "@better-fetch/fetch";
12
11
  import { DependencyList } from "react";
13
12
  export * from "nanostores";
@@ -97,21 +96,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
97
96
  error: null;
98
97
  } ? S : Res : never>;
99
98
  };
100
- $fetch: _better_fetch_fetch0.BetterFetch<{
101
- plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
99
+ $fetch: _better_fetch_fetch15.BetterFetch<{
100
+ plugins: (_better_fetch_fetch15.BetterFetchPlugin | {
102
101
  id: string;
103
102
  name: string;
104
103
  hooks: {
105
- onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
104
+ onSuccess(context: _better_fetch_fetch15.SuccessContext<any>): void;
106
105
  };
107
106
  } | {
108
107
  id: string;
109
108
  name: string;
110
109
  hooks: {
111
- onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
112
- onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
113
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
114
- onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
110
+ onSuccess: ((context: _better_fetch_fetch15.SuccessContext<any>) => Promise<void> | void) | undefined;
111
+ onError: ((context: _better_fetch_fetch15.ErrorContext) => Promise<void> | void) | undefined;
112
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch15.RequestContext<T>) => Promise<_better_fetch_fetch15.RequestContext | void> | _better_fetch_fetch15.RequestContext | void) | undefined;
113
+ onResponse: ((context: _better_fetch_fetch15.ResponseContext) => Promise<Response | void | _better_fetch_fetch15.ResponseContext> | Response | _better_fetch_fetch15.ResponseContext | void) | undefined;
115
114
  };
116
115
  })[];
117
116
  cache?: RequestCache | undefined;
@@ -131,12 +130,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
131
130
  referrerPolicy?: ReferrerPolicy | undefined;
132
131
  signal?: (AbortSignal | null) | undefined;
133
132
  window?: null | undefined;
134
- onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
133
+ onRetry?: ((response: _better_fetch_fetch15.ResponseContext) => Promise<void> | void) | undefined;
135
134
  hookOptions?: {
136
135
  cloneResponse?: boolean;
137
136
  } | undefined;
138
137
  timeout?: number | undefined;
139
- customFetchImpl: _better_fetch_fetch0.FetchEsque;
138
+ customFetchImpl: _better_fetch_fetch15.FetchEsque;
140
139
  baseURL: string;
141
140
  throw?: boolean | undefined;
142
141
  auth?: ({
@@ -156,10 +155,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
156
155
  params?: any;
157
156
  duplex?: "full" | "half" | undefined;
158
157
  jsonParser: (text: string) => Promise<any> | any;
159
- retry?: _better_fetch_fetch0.RetryOptions | undefined;
158
+ retry?: _better_fetch_fetch15.RetryOptions | undefined;
160
159
  retryAttempt?: number | undefined;
161
- output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
162
- errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
160
+ output?: (_better_fetch_fetch15.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
161
+ errorSchema?: _better_fetch_fetch15.StandardSchemaV1 | undefined;
163
162
  disableValidation?: boolean | undefined;
164
163
  disableSignal?: boolean | undefined;
165
164
  }, unknown, unknown, {}>;
@@ -1,8 +1,7 @@
1
- import { fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-CJ4w3OzO.mjs";
1
+ import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions } from "../../index-BevOkArW.mjs";
2
2
  import "../../types-CEepZ-RG.mjs";
3
3
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
4
- import "../../index-D8MBzSjs.mjs";
5
- import "../../plugins-SfZpwDiz.mjs";
4
+ import "../../plugins-Dmw3tk5H.mjs";
6
5
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
7
6
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
8
7
  import * as _better_fetch_fetch31 from "@better-fetch/fetch";
@@ -1,13 +1,12 @@
1
- import { fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-CJ4w3OzO.mjs";
1
+ import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions } from "../../index-BevOkArW.mjs";
2
2
  import "../../types-CEepZ-RG.mjs";
3
3
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
4
- import "../../index-D8MBzSjs.mjs";
5
- import "../../plugins-SfZpwDiz.mjs";
4
+ import "../../plugins-Dmw3tk5H.mjs";
6
5
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
7
6
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
8
- import * as nanostores1 from "nanostores";
7
+ import * as nanostores2 from "nanostores";
9
8
  import { Atom } from "nanostores";
10
- import * as _better_fetch_fetch47 from "@better-fetch/fetch";
9
+ import * as _better_fetch_fetch63 from "@better-fetch/fetch";
11
10
  import { BetterFetchError } from "@better-fetch/fetch";
12
11
  export * from "nanostores";
13
12
  export * from "@better-fetch/fetch";
@@ -35,21 +34,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
35
34
  isPending: boolean;
36
35
  isRefetching: boolean;
37
36
  }>;
38
- $fetch: _better_fetch_fetch47.BetterFetch<{
39
- plugins: (_better_fetch_fetch47.BetterFetchPlugin | {
37
+ $fetch: _better_fetch_fetch63.BetterFetch<{
38
+ plugins: (_better_fetch_fetch63.BetterFetchPlugin | {
40
39
  id: string;
41
40
  name: string;
42
41
  hooks: {
43
- onSuccess(context: _better_fetch_fetch47.SuccessContext<any>): void;
42
+ onSuccess(context: _better_fetch_fetch63.SuccessContext<any>): void;
44
43
  };
45
44
  } | {
46
45
  id: string;
47
46
  name: string;
48
47
  hooks: {
49
- onSuccess: ((context: _better_fetch_fetch47.SuccessContext<any>) => Promise<void> | void) | undefined;
50
- onError: ((context: _better_fetch_fetch47.ErrorContext) => Promise<void> | void) | undefined;
51
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch47.RequestContext<T>) => Promise<_better_fetch_fetch47.RequestContext | void> | _better_fetch_fetch47.RequestContext | void) | undefined;
52
- onResponse: ((context: _better_fetch_fetch47.ResponseContext) => Promise<Response | void | _better_fetch_fetch47.ResponseContext> | Response | _better_fetch_fetch47.ResponseContext | void) | undefined;
48
+ onSuccess: ((context: _better_fetch_fetch63.SuccessContext<any>) => Promise<void> | void) | undefined;
49
+ onError: ((context: _better_fetch_fetch63.ErrorContext) => Promise<void> | void) | undefined;
50
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch63.RequestContext<T>) => Promise<_better_fetch_fetch63.RequestContext | void> | _better_fetch_fetch63.RequestContext | void) | undefined;
51
+ onResponse: ((context: _better_fetch_fetch63.ResponseContext) => Promise<Response | void | _better_fetch_fetch63.ResponseContext> | Response | _better_fetch_fetch63.ResponseContext | void) | undefined;
53
52
  };
54
53
  })[];
55
54
  cache?: RequestCache | undefined;
@@ -69,12 +68,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
69
68
  referrerPolicy?: ReferrerPolicy | undefined;
70
69
  signal?: (AbortSignal | null) | undefined;
71
70
  window?: null | undefined;
72
- onRetry?: ((response: _better_fetch_fetch47.ResponseContext) => Promise<void> | void) | undefined;
71
+ onRetry?: ((response: _better_fetch_fetch63.ResponseContext) => Promise<void> | void) | undefined;
73
72
  hookOptions?: {
74
73
  cloneResponse?: boolean;
75
74
  } | undefined;
76
75
  timeout?: number | undefined;
77
- customFetchImpl: _better_fetch_fetch47.FetchEsque;
76
+ customFetchImpl: _better_fetch_fetch63.FetchEsque;
78
77
  baseURL: string;
79
78
  throw?: boolean | undefined;
80
79
  auth?: ({
@@ -94,17 +93,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
94
93
  params?: any;
95
94
  duplex?: "full" | "half" | undefined;
96
95
  jsonParser: (text: string) => Promise<any> | any;
97
- retry?: _better_fetch_fetch47.RetryOptions | undefined;
96
+ retry?: _better_fetch_fetch63.RetryOptions | undefined;
98
97
  retryAttempt?: number | undefined;
99
- output?: (_better_fetch_fetch47.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
100
- errorSchema?: _better_fetch_fetch47.StandardSchemaV1 | undefined;
98
+ output?: (_better_fetch_fetch63.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
99
+ errorSchema?: _better_fetch_fetch63.StandardSchemaV1 | undefined;
101
100
  disableValidation?: boolean | undefined;
102
101
  disableSignal?: boolean | undefined;
103
102
  }, unknown, unknown, {}>;
104
103
  $store: {
105
104
  notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
106
105
  listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
107
- atoms: Record<string, nanostores1.WritableAtom<any>>;
106
+ atoms: Record<string, nanostores2.WritableAtom<any>>;
108
107
  };
109
108
  $Infer: {
110
109
  Session: NonNullable<InferClientAPI<Option> extends {
@@ -1,12 +1,11 @@
1
- import { fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-CJ4w3OzO.mjs";
1
+ import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions } from "../../index-BevOkArW.mjs";
2
2
  import "../../types-CEepZ-RG.mjs";
3
3
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
4
- import "../../index-D8MBzSjs.mjs";
5
- import "../../plugins-SfZpwDiz.mjs";
4
+ import "../../plugins-Dmw3tk5H.mjs";
6
5
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
7
6
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
8
- import * as nanostores2 from "nanostores";
9
- import * as _better_fetch_fetch63 from "@better-fetch/fetch";
7
+ import * as nanostores0 from "nanostores";
8
+ import * as _better_fetch_fetch0 from "@better-fetch/fetch";
10
9
  import { BetterFetchError } from "@better-fetch/fetch";
11
10
  import { DeepReadonly, Ref } from "vue";
12
11
  export * from "nanostores";
@@ -73,21 +72,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
73
72
  error: null;
74
73
  } ? S : Res extends Record<string, any> ? Res : never : never>;
75
74
  };
76
- $fetch: _better_fetch_fetch63.BetterFetch<{
77
- plugins: (_better_fetch_fetch63.BetterFetchPlugin | {
75
+ $fetch: _better_fetch_fetch0.BetterFetch<{
76
+ plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
78
77
  id: string;
79
78
  name: string;
80
79
  hooks: {
81
- onSuccess(context: _better_fetch_fetch63.SuccessContext<any>): void;
80
+ onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
82
81
  };
83
82
  } | {
84
83
  id: string;
85
84
  name: string;
86
85
  hooks: {
87
- onSuccess: ((context: _better_fetch_fetch63.SuccessContext<any>) => Promise<void> | void) | undefined;
88
- onError: ((context: _better_fetch_fetch63.ErrorContext) => Promise<void> | void) | undefined;
89
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch63.RequestContext<T>) => Promise<_better_fetch_fetch63.RequestContext | void> | _better_fetch_fetch63.RequestContext | void) | undefined;
90
- onResponse: ((context: _better_fetch_fetch63.ResponseContext) => Promise<Response | void | _better_fetch_fetch63.ResponseContext> | Response | _better_fetch_fetch63.ResponseContext | void) | undefined;
86
+ onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
87
+ onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
88
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
89
+ onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
91
90
  };
92
91
  })[];
93
92
  cache?: RequestCache | undefined;
@@ -107,12 +106,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
107
106
  referrerPolicy?: ReferrerPolicy | undefined;
108
107
  signal?: (AbortSignal | null) | undefined;
109
108
  window?: null | undefined;
110
- onRetry?: ((response: _better_fetch_fetch63.ResponseContext) => Promise<void> | void) | undefined;
109
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
111
110
  hookOptions?: {
112
111
  cloneResponse?: boolean;
113
112
  } | undefined;
114
113
  timeout?: number | undefined;
115
- customFetchImpl: _better_fetch_fetch63.FetchEsque;
114
+ customFetchImpl: _better_fetch_fetch0.FetchEsque;
116
115
  baseURL: string;
117
116
  throw?: boolean | undefined;
118
117
  auth?: ({
@@ -132,17 +131,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
132
131
  params?: any;
133
132
  duplex?: "full" | "half" | undefined;
134
133
  jsonParser: (text: string) => Promise<any> | any;
135
- retry?: _better_fetch_fetch63.RetryOptions | undefined;
134
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
136
135
  retryAttempt?: number | undefined;
137
- output?: (_better_fetch_fetch63.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
138
- errorSchema?: _better_fetch_fetch63.StandardSchemaV1 | undefined;
136
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
137
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
139
138
  disableValidation?: boolean | undefined;
140
139
  disableSignal?: boolean | undefined;
141
140
  }, unknown, unknown, {}>;
142
141
  $store: {
143
142
  notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
144
143
  listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
145
- atoms: Record<string, nanostores2.WritableAtom<any>>;
144
+ atoms: Record<string, nanostores0.WritableAtom<any>>;
146
145
  };
147
146
  $ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
148
147
  };
@@ -1,7 +1,6 @@
1
- import "../index-CJ4w3OzO.mjs";
1
+ import "../index-BevOkArW.mjs";
2
2
  import "../types-CEepZ-RG.mjs";
3
3
  import "../helper-DFzV6jvx.mjs";
4
- import "../index-D8MBzSjs.mjs";
5
- import "../plugins-SfZpwDiz.mjs";
6
- import { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-BGKXL3Av.mjs";
4
+ import "../plugins-Dmw3tk5H.mjs";
5
+ import { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-DA5jLHwS.mjs";
7
6
  export { EligibleCookies, createCookieGetter, createSessionStore, deleteSessionCookie, getChunkedCookie, getCookieCache, getCookies, getSessionCookie, parseCookies, parseSetCookieHeader, setCookieCache, setCookieToHeader, setSessionCookie };
@@ -1,7 +1,6 @@
1
- import { $n as getBaseAdapter, An as parseInputData, Bn as convertFromDB, Cn as getWithHooks, Dn as parseAccountInput, En as mergeSchema, Fn as createInternalAdapter, Gn as InferFieldsFromPlugins, Hn as FieldAttributeToObject, In as getAuthTables, Jn as InferFieldsOutput, Kn as InferFieldsInput, Ln as getSchema, Mn as parseSessionOutput, Nn as parseUserInput, On as parseAccountOutput, Pn as parseUserOutput, Qn as getAdapter, Rn as getMigrations, Tn as toZodSchema, Un as InferAdditionalFieldsFromPluginOptions, Vn as convertToDB, Wn as InferFieldsFromOptions, Xn as PluginFieldAttribute, Yn as InferValueType, Zn as createFieldAttribute, jn as parseSessionInput, kn as parseAdditionalUserInput, qn as InferFieldsInputClient, wn as FieldAttributeToSchema, zn as matchType } from "../index-CJ4w3OzO.mjs";
1
+ import { An as InferValueType, Cn as FieldAttributeToObject, Dn as InferFieldsInput, En as InferFieldsFromPlugins, Mn as createFieldAttribute, Nn as getAdapter, On as InferFieldsInputClient, Pn as getBaseAdapter, Sn as convertToDB, Tn as InferFieldsFromOptions, _n as getAuthTables, an as FieldAttributeToSchema, bn as matchType, cn as parseAccountInput, dn as parseInputData, fn as parseSessionInput, gn as createInternalAdapter, hn as parseUserOutput, in as getWithHooks, jn as PluginFieldAttribute, kn as InferFieldsOutput, ln as parseAccountOutput, mn as parseUserInput, on as toZodSchema, pn as parseSessionOutput, sn as mergeSchema, un as parseAdditionalUserInput, vn as getSchema, wn as InferAdditionalFieldsFromPluginOptions, xn as convertFromDB, yn as getMigrations } from "../index-BevOkArW.mjs";
2
2
  import "../types-CEepZ-RG.mjs";
3
3
  import "../helper-DFzV6jvx.mjs";
4
- import "../index-D8MBzSjs.mjs";
5
- import "../plugins-SfZpwDiz.mjs";
4
+ import "../plugins-Dmw3tk5H.mjs";
6
5
  export * from "@better-auth/core/db";
7
6
  export { FieldAttributeToObject, FieldAttributeToSchema, InferAdditionalFieldsFromPluginOptions, InferFieldsFromOptions, InferFieldsFromPlugins, InferFieldsInput, InferFieldsInputClient, InferFieldsOutput, InferValueType, PluginFieldAttribute, convertFromDB, convertToDB, createFieldAttribute, createInternalAdapter, getAdapter, getAuthTables, getBaseAdapter, getMigrations, getSchema, getWithHooks, matchType, mergeSchema, parseAccountInput, parseAccountOutput, parseAdditionalUserInput, parseInputData, parseSessionInput, parseSessionOutput, parseUserInput, parseUserOutput, toZodSchema };
@@ -1,6 +1,6 @@
1
- import { _ as User, g as Session } from "./index-CJ4w3OzO.mjs";
1
+ import { _ as User, g as Session } from "./index-BevOkArW.mjs";
2
2
  import { GenericEndpointContext } from "@better-auth/core";
3
- import * as better_call210 from "better-call";
3
+ import * as better_call203 from "better-call";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/plugins/one-time-token/index.d.ts
@@ -51,9 +51,9 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
51
51
  *
52
52
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-generate)
53
53
  */
54
- generateOneTimeToken: better_call210.StrictEndpoint<"/one-time-token/generate", {
54
+ generateOneTimeToken: better_call203.StrictEndpoint<"/one-time-token/generate", {
55
55
  method: "GET";
56
- use: ((inputContext: better_call210.MiddlewareInputContext<better_call210.MiddlewareOptions>) => Promise<{
56
+ use: ((inputContext: better_call203.MiddlewareInputContext<better_call203.MiddlewareOptions>) => Promise<{
57
57
  session: {
58
58
  session: Record<string, any> & {
59
59
  id: string;
@@ -96,7 +96,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
96
96
  *
97
97
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-verify)
98
98
  */
99
- verifyOneTimeToken: better_call210.StrictEndpoint<"/one-time-token/verify", {
99
+ verifyOneTimeToken: better_call203.StrictEndpoint<"/one-time-token/verify", {
100
100
  method: "POST";
101
101
  body: z.ZodObject<{
102
102
  token: z.ZodString;
@@ -1,4 +1,4 @@
1
- import * as better_call230 from "better-call";
1
+ import * as better_call20 from "better-call";
2
2
  import * as z from "zod";
3
3
  import { StringValue } from "ms";
4
4
 
@@ -91,7 +91,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
91
91
  };
92
92
  };
93
93
  endpoints: {
94
- deviceCode: better_call230.StrictEndpoint<"/device/code", {
94
+ deviceCode: better_call20.StrictEndpoint<"/device/code", {
95
95
  method: "POST";
96
96
  body: z.ZodObject<{
97
97
  client_id: z.ZodString;
@@ -178,7 +178,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
178
178
  expires_in: number;
179
179
  interval: number;
180
180
  }>;
181
- deviceToken: better_call230.StrictEndpoint<"/device/token", {
181
+ deviceToken: better_call20.StrictEndpoint<"/device/token", {
182
182
  method: "POST";
183
183
  body: z.ZodObject<{
184
184
  grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:device_code">;
@@ -248,7 +248,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
248
248
  expires_in: number;
249
249
  scope: string;
250
250
  }>;
251
- deviceVerify: better_call230.StrictEndpoint<"/device", {
251
+ deviceVerify: better_call20.StrictEndpoint<"/device", {
252
252
  method: "GET";
253
253
  query: z.ZodObject<{
254
254
  user_code: z.ZodString;
@@ -293,7 +293,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
293
293
  user_code: string;
294
294
  status: string;
295
295
  }>;
296
- deviceApprove: better_call230.StrictEndpoint<"/device/approve", {
296
+ deviceApprove: better_call20.StrictEndpoint<"/device/approve", {
297
297
  method: "POST";
298
298
  body: z.ZodObject<{
299
299
  userCode: z.ZodString;
@@ -334,7 +334,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
334
334
  }, {
335
335
  success: boolean;
336
336
  }>;
337
- deviceDeny: better_call230.StrictEndpoint<"/device/deny", {
337
+ deviceDeny: better_call20.StrictEndpoint<"/device/deny", {
338
338
  method: "POST";
339
339
  body: z.ZodObject<{
340
340
  userCode: z.ZodString;
@@ -1,5 +1,5 @@
1
1
  import { GenericEndpointContext } from "@better-auth/core";
2
- import * as better_call145 from "better-call";
2
+ import * as better_call40 from "better-call";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/plugins/magic-link/index.d.ts
@@ -68,7 +68,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
68
68
  *
69
69
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/sign-in#api-method-sign-in-magic-link)
70
70
  */
71
- signInMagicLink: better_call145.StrictEndpoint<"/sign-in/magic-link", {
71
+ signInMagicLink: better_call40.StrictEndpoint<"/sign-in/magic-link", {
72
72
  method: "POST";
73
73
  requireHeaders: true;
74
74
  body: z.ZodObject<{
@@ -121,7 +121,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
121
121
  *
122
122
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/magic-link#api-method-magic-link-verify)
123
123
  */
124
- magicLinkVerify: better_call145.StrictEndpoint<"/magic-link/verify", {
124
+ magicLinkVerify: better_call40.StrictEndpoint<"/magic-link/verify", {
125
125
  method: "GET";
126
126
  query: z.ZodObject<{
127
127
  token: z.ZodString;
@@ -129,7 +129,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
129
129
  errorCallbackURL: z.ZodOptional<z.ZodString>;
130
130
  newUserCallbackURL: z.ZodOptional<z.ZodString>;
131
131
  }, z.core.$strip>;
132
- use: ((inputContext: better_call145.MiddlewareInputContext<better_call145.MiddlewareOptions>) => Promise<void>)[];
132
+ use: ((inputContext: better_call40.MiddlewareInputContext<better_call40.MiddlewareOptions>) => Promise<void>)[];
133
133
  requireHeaders: true;
134
134
  metadata: {
135
135
  openapi: {
@@ -1,9 +1,9 @@
1
- import { _ as User } from "./index-CJ4w3OzO.mjs";
1
+ import { _ as User } from "./index-BevOkArW.mjs";
2
2
  import { t as Awaitable } from "./helper-DFzV6jvx.mjs";
3
- import { t as InferOptionSchema } from "./plugins-SfZpwDiz.mjs";
3
+ import { t as InferOptionSchema } from "./plugins-Dmw3tk5H.mjs";
4
4
  import * as _better_auth_core10 from "@better-auth/core";
5
5
  import { GenericEndpointContext } from "@better-auth/core";
6
- import * as better_call183 from "better-call";
6
+ import * as better_call179 from "better-call";
7
7
  import * as z from "zod";
8
8
 
9
9
  //#region src/plugins/phone-number/schema.d.ts
@@ -143,7 +143,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
143
143
  hooks: {
144
144
  before: {
145
145
  matcher: (ctx: _better_auth_core10.HookEndpointContext) => boolean;
146
- handler: (inputContext: better_call183.MiddlewareInputContext<better_call183.MiddlewareOptions>) => Promise<never>;
146
+ handler: (inputContext: better_call179.MiddlewareInputContext<better_call179.MiddlewareOptions>) => Promise<never>;
147
147
  }[];
148
148
  };
149
149
  endpoints: {
@@ -162,7 +162,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
162
162
  *
163
163
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/phone-number#api-method-sign-in-phone-number)
164
164
  */
165
- signInPhoneNumber: better_call183.StrictEndpoint<"/sign-in/phone-number", {
165
+ signInPhoneNumber: better_call179.StrictEndpoint<"/sign-in/phone-number", {
166
166
  method: "POST";
167
167
  body: z.ZodObject<{
168
168
  phoneNumber: z.ZodString;
@@ -219,7 +219,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
219
219
  *
220
220
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/phone-number#api-method-phone-number-send-otp)
221
221
  */
222
- sendPhoneNumberOTP: better_call183.StrictEndpoint<"/phone-number/send-otp", {
222
+ sendPhoneNumberOTP: better_call179.StrictEndpoint<"/phone-number/send-otp", {
223
223
  method: "POST";
224
224
  body: z.ZodObject<{
225
225
  phoneNumber: z.ZodString;
@@ -267,7 +267,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
267
267
  *
268
268
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/phone-number#api-method-phone-number-verify)
269
269
  */
270
- verifyPhoneNumber: better_call183.StrictEndpoint<"/phone-number/verify", {
270
+ verifyPhoneNumber: better_call179.StrictEndpoint<"/phone-number/verify", {
271
271
  method: "POST";
272
272
  body: z.ZodObject<{
273
273
  phoneNumber: z.ZodString;
@@ -372,7 +372,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
372
372
  token: null;
373
373
  user: UserWithPhoneNumber;
374
374
  }>;
375
- requestPasswordResetPhoneNumber: better_call183.StrictEndpoint<"/phone-number/request-password-reset", {
375
+ requestPasswordResetPhoneNumber: better_call179.StrictEndpoint<"/phone-number/request-password-reset", {
376
376
  method: "POST";
377
377
  body: z.ZodObject<{
378
378
  phoneNumber: z.ZodString;
@@ -407,7 +407,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
407
407
  }, {
408
408
  status: boolean;
409
409
  }>;
410
- resetPasswordPhoneNumber: better_call183.StrictEndpoint<"/phone-number/reset-password", {
410
+ resetPasswordPhoneNumber: better_call179.StrictEndpoint<"/phone-number/reset-password", {
411
411
  method: "POST";
412
412
  body: z.ZodObject<{
413
413
  otp: z.ZodString;
@@ -1,7 +1,7 @@
1
- import * as _better_auth_core1 from "@better-auth/core";
1
+ import * as _better_auth_core6 from "@better-auth/core";
2
2
  import { GenericEndpointContext } from "@better-auth/core";
3
3
  import * as _better_auth_core_db0 from "@better-auth/core/db";
4
- import * as better_call127 from "better-call";
4
+ import * as better_call30 from "better-call";
5
5
  import * as z from "zod";
6
6
 
7
7
  //#region src/plugins/email-otp/index.d.ts
@@ -75,7 +75,7 @@ interface EmailOTPOptions {
75
75
  }
76
76
  declare const emailOTP: (options: EmailOTPOptions) => {
77
77
  id: "email-otp";
78
- init(ctx: _better_auth_core1.AuthContext): {
78
+ init(ctx: _better_auth_core6.AuthContext): {
79
79
  options: {
80
80
  emailVerification: {
81
81
  sendVerificationEmail(data: {
@@ -87,7 +87,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
87
87
  };
88
88
  } | undefined;
89
89
  endpoints: {
90
- createVerificationOTP: better_call127.StrictEndpoint<"/email-otp/create-verification-otp", {
90
+ createVerificationOTP: better_call30.StrictEndpoint<"/email-otp/create-verification-otp", {
91
91
  method: "POST";
92
92
  body: z.ZodObject<{
93
93
  email: z.ZodString;
@@ -131,7 +131,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
131
131
  *
132
132
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-get-verification-otp)
133
133
  */
134
- getVerificationOTP: better_call127.StrictEndpoint<"/email-otp/get-verification-otp", {
134
+ getVerificationOTP: better_call30.StrictEndpoint<"/email-otp/get-verification-otp", {
135
135
  method: "GET";
136
136
  query: z.ZodObject<{
137
137
  email: z.ZodString;
@@ -187,7 +187,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
187
187
  *
188
188
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-check-verification-otp)
189
189
  */
190
- checkVerificationOTP: better_call127.StrictEndpoint<"/email-otp/check-verification-otp", {
190
+ checkVerificationOTP: better_call30.StrictEndpoint<"/email-otp/check-verification-otp", {
191
191
  method: "POST";
192
192
  body: z.ZodObject<{
193
193
  email: z.ZodString;
@@ -241,7 +241,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
241
241
  *
242
242
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-verify-email)
243
243
  */
244
- verifyEmailOTP: better_call127.StrictEndpoint<"/email-otp/verify-email", {
244
+ verifyEmailOTP: better_call30.StrictEndpoint<"/email-otp/verify-email", {
245
245
  method: "POST";
246
246
  body: z.ZodObject<{
247
247
  email: z.ZodString;
@@ -322,7 +322,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
322
322
  *
323
323
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-sign-in-email-otp)
324
324
  */
325
- signInEmailOTP: better_call127.StrictEndpoint<"/sign-in/email-otp", {
325
+ signInEmailOTP: better_call30.StrictEndpoint<"/sign-in/email-otp", {
326
326
  method: "POST";
327
327
  body: z.ZodObject<{
328
328
  email: z.ZodString;
@@ -385,7 +385,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
385
385
  *
386
386
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-forget-password-email-otp)
387
387
  */
388
- forgetPasswordEmailOTP: better_call127.StrictEndpoint<"/forget-password/email-otp", {
388
+ forgetPasswordEmailOTP: better_call30.StrictEndpoint<"/forget-password/email-otp", {
389
389
  method: "POST";
390
390
  body: z.ZodObject<{
391
391
  email: z.ZodString;
@@ -434,7 +434,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
434
434
  *
435
435
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-reset-password)
436
436
  */
437
- resetPasswordEmailOTP: better_call127.StrictEndpoint<"/email-otp/reset-password", {
437
+ resetPasswordEmailOTP: better_call30.StrictEndpoint<"/email-otp/reset-password", {
438
438
  method: "POST";
439
439
  body: z.ZodObject<{
440
440
  email: z.ZodString;
@@ -484,7 +484,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
484
484
  *
485
485
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-send-verification-otp)
486
486
  */
487
- sendVerificationOTP: better_call127.StrictEndpoint<"/email-otp/send-verification-otp", {
487
+ sendVerificationOTP: better_call30.StrictEndpoint<"/email-otp/send-verification-otp", {
488
488
  method: "POST";
489
489
  body: z.ZodObject<{
490
490
  email: z.ZodString;
@@ -525,8 +525,8 @@ declare const emailOTP: (options: EmailOTPOptions) => {
525
525
  };
526
526
  hooks: {
527
527
  after: {
528
- matcher(context: _better_auth_core1.HookEndpointContext): boolean;
529
- handler: (inputContext: better_call127.MiddlewareInputContext<better_call127.MiddlewareOptions>) => Promise<void>;
528
+ matcher(context: _better_auth_core6.HookEndpointContext): boolean;
529
+ handler: (inputContext: better_call30.MiddlewareInputContext<better_call30.MiddlewareOptions>) => Promise<void>;
530
530
  }[];
531
531
  };
532
532
  $ERROR_CODES: {