better-auth 1.4.4-beta.3 → 1.4.5

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 +2 -3
  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 +15 -16
  13. package/dist/client/plugins/index.d.mts +23 -23
  14. package/dist/client/react/index.d.mts +2 -3
  15. package/dist/client/solid/index.d.mts +15 -16
  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-CGBSkAO7.d.mts → index-0IRW2A1b.d.mts} +11 -11
  21. package/dist/{index-DrEnqtuQ.d.mts → index-B64ouu9a.d.mts} +6 -6
  22. package/dist/{index-B_1KAoYv.d.mts → index-BMrJpdkv.d.mts} +4 -4
  23. package/dist/{index-0xgBgtem.d.mts → index-BaZax_le.d.mts} +3 -3
  24. package/dist/{index-wHdZCXFM.d.mts → index-Bv2nWTrZ.d.mts} +3 -3
  25. package/dist/{index-COEqRbac.d.mts → index-CCnWzVSV.d.mts} +10 -10
  26. package/dist/{index-Br01_oSy.d.mts → index-CMfXEnyA.d.mts} +7 -7
  27. package/dist/{index-CJ4w3OzO.d.mts → index-COnelCGa.d.mts} +160 -352
  28. package/dist/{index-WXoTnrFA.d.mts → index-CWcnHbjn.d.mts} +2 -2
  29. package/dist/{index-BsRgjUAv.d.mts → index-CmcoO98i.d.mts} +5 -5
  30. package/dist/{index-BVJL9NCo.d.mts → index-D2CJIZCI.d.mts} +6 -6
  31. package/dist/{index-DgwGZQ6M.d.mts → index-DLNLFTLS.d.mts} +8 -8
  32. package/dist/{index-BkD9iyuk.d.mts → index-DSwTw61P.d.mts} +8 -8
  33. package/dist/{index-Dy2g8XKv.d.mts → index-DUa0239y.d.mts} +6 -6
  34. package/dist/{index-DqkPFN8B.d.mts → index-Dk2q2Dnr.d.mts} +4 -4
  35. package/dist/{index-K2ZMxFny.d.mts → index-DoUxtZgO.d.mts} +2 -2
  36. package/dist/{index-DAPxdOKi.d.mts → index-Drqkvf7w.d.mts} +30 -30
  37. package/dist/{index-CujXvEf8.d.mts → index-F8qM450o.d.mts} +3 -3
  38. package/dist/{index-BGKXL3Av.d.mts → index-FTghQK8_.d.mts} +1 -1
  39. package/dist/{index-CL-QZ1hb.d.mts → index-alnYeOxT.d.mts} +11 -11
  40. package/dist/{index-CnSDnpiK.d.mts → index-cgrDi8bR.d.mts} +13 -13
  41. package/dist/{index-Hid3pW0N.d.mts → index-t-jeKL1G.d.mts} +9 -9
  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 +4 -4
  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 +3 -4
  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
@@ -227,6 +227,7 @@ const createAdapterFactory = ({ adapter: customAdapter, config: cfg }) => (optio
227
227
  if (fieldAttributes.references?.field === "id" && useNumberId) if (Array.isArray(newValue)) newValue = newValue.map((x) => x !== null ? Number(x) : null);
228
228
  else newValue = newValue !== null ? Number(newValue) : null;
229
229
  else if (config.supportsJSON === false && typeof newValue === "object" && fieldAttributes.type === "json") newValue = JSON.stringify(newValue);
230
+ else if (config.supportsJSON === false && Array.isArray(newValue) && (fieldAttributes.type === "string[]" || fieldAttributes.type === "number[]")) newValue = JSON.stringify(newValue);
230
231
  else if (config.supportsDates === false && newValue instanceof Date && fieldAttributes.type === "date") newValue = newValue.toISOString();
231
232
  else if (config.supportsBooleans === false && typeof newValue === "boolean") newValue = newValue ? 1 : 0;
232
233
  if (config.customTransformInput) newValue = config.customTransformInput({
@@ -261,6 +262,7 @@ const createAdapterFactory = ({ adapter: customAdapter, config: cfg }) => (optio
261
262
  if (originalKey === "id" || field.references?.field === "id") {
262
263
  if (typeof newValue !== "undefined" && newValue !== null) newValue = String(newValue);
263
264
  } else if (config.supportsJSON === false && typeof newValue === "string" && field.type === "json") newValue = safeJSONParse(newValue);
265
+ else if (config.supportsJSON === false && typeof newValue === "string" && (field.type === "string[]" || field.type === "number[]")) newValue = safeJSONParse(newValue);
264
266
  else if (config.supportsDates === false && typeof newValue === "string" && field.type === "date") newValue = new Date(newValue);
265
267
  else if (config.supportsBooleans === false && typeof newValue === "number" && field.type === "boolean") newValue = newValue === 1;
266
268
  if (config.customTransformOutput) newValue = config.customTransformOutput({
@@ -3,7 +3,7 @@ import "../../utils-db7gNqd-.mjs";
3
3
  import "../../crypto-CFUhAR9W.mjs";
4
4
  import "../../misc-BwNc0MKr.mjs";
5
5
  import "../../json-CnHxKYpj.mjs";
6
- import { t as createAdapterFactory } from "../../adapter-factory-CXEYdBBi.mjs";
6
+ import { t as createAdapterFactory } from "../../adapter-factory-HF3JB9cT.mjs";
7
7
  import { logger } from "@better-auth/core/env";
8
8
  import { BetterAuthError } from "@better-auth/core/error";
9
9
  import { and, asc, count, desc, eq, gt, gte, inArray, like, lt, lte, ne, notInArray, or, sql } from "drizzle-orm";
@@ -1,8 +1,7 @@
1
- import { $t as AdapterSchemaCreation, an as Where$1, in as TransactionAdapter } from "../index-CJ4w3OzO.mjs";
1
+ import { Bt as Where$1, Pt as AdapterSchemaCreation, zt as TransactionAdapter } from "../index-COnelCGa.mjs";
2
2
  import "../types-CEepZ-RG.mjs";
3
3
  import { 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 { BetterAuthOptions } from "@better-auth/core";
7
6
  import * as _better_auth_core_db23 from "@better-auth/core/db";
8
7
  import { BetterAuthDBSchema, DBFieldAttribute } from "@better-auth/core/db";
@@ -3,7 +3,7 @@ import "../utils-db7gNqd-.mjs";
3
3
  import "../crypto-CFUhAR9W.mjs";
4
4
  import "../misc-BwNc0MKr.mjs";
5
5
  import "../json-CnHxKYpj.mjs";
6
- import { n as initGetFieldAttributes, r as initGetIdField, t as createAdapterFactory } from "../adapter-factory-CXEYdBBi.mjs";
6
+ import { n as initGetFieldAttributes, r as initGetIdField, t as createAdapterFactory } from "../adapter-factory-HF3JB9cT.mjs";
7
7
 
8
8
  export * from "@better-auth/core/db/adapter"
9
9
 
@@ -4,7 +4,7 @@ import "../../utils-db7gNqd-.mjs";
4
4
  import "../../crypto-CFUhAR9W.mjs";
5
5
  import "../../misc-BwNc0MKr.mjs";
6
6
  import "../../json-CnHxKYpj.mjs";
7
- import { t as createAdapterFactory } from "../../adapter-factory-CXEYdBBi.mjs";
7
+ import { t as createAdapterFactory } from "../../adapter-factory-HF3JB9cT.mjs";
8
8
  import { sql } from "kysely";
9
9
 
10
10
  //#region src/adapters/kysely-adapter/kysely-adapter.ts
@@ -3,7 +3,7 @@ import "../../utils-db7gNqd-.mjs";
3
3
  import "../../crypto-CFUhAR9W.mjs";
4
4
  import "../../misc-BwNc0MKr.mjs";
5
5
  import "../../json-CnHxKYpj.mjs";
6
- import { t as createAdapterFactory } from "../../adapter-factory-CXEYdBBi.mjs";
6
+ import { t as createAdapterFactory } from "../../adapter-factory-HF3JB9cT.mjs";
7
7
  import { logger } from "@better-auth/core/env";
8
8
 
9
9
  //#region src/adapters/memory-adapter/memory-adapter.ts
@@ -3,7 +3,7 @@ import "../../utils-db7gNqd-.mjs";
3
3
  import "../../crypto-CFUhAR9W.mjs";
4
4
  import "../../misc-BwNc0MKr.mjs";
5
5
  import "../../json-CnHxKYpj.mjs";
6
- import { t as createAdapterFactory } from "../../adapter-factory-CXEYdBBi.mjs";
6
+ import { t as createAdapterFactory } from "../../adapter-factory-HF3JB9cT.mjs";
7
7
  import { ObjectId } from "mongodb";
8
8
 
9
9
  //#region src/adapters/mongodb-adapter/mongodb-adapter.ts
@@ -3,7 +3,7 @@ import "../../utils-db7gNqd-.mjs";
3
3
  import "../../crypto-CFUhAR9W.mjs";
4
4
  import "../../misc-BwNc0MKr.mjs";
5
5
  import "../../json-CnHxKYpj.mjs";
6
- import { t as createAdapterFactory } from "../../adapter-factory-CXEYdBBi.mjs";
6
+ import { t as createAdapterFactory } from "../../adapter-factory-HF3JB9cT.mjs";
7
7
  import { BetterAuthError } from "@better-auth/core/error";
8
8
 
9
9
  //#region src/adapters/prisma-adapter/prisma-adapter.ts
@@ -1,6 +1,5 @@
1
- import { $ as createEmailVerificationToken, A as deleteUser, B as getSessionFromCtx, C as createAuthEndpoint, D as router, E as optionsMiddleware, F as signOut, G as revokeSessions, H as requestOnlySessionMiddleware, I as signInEmail, J as requestPasswordReset, K as sensitiveSessionMiddleware, L as signInSocial, M as setPassword, N as updateUser, O as changeEmail, P as signUpEmail, Q as error, R as freshSessionMiddleware, S as checkEndpointConflicts, T as getEndpoints, U as revokeOtherSessions, V as listSessions, W as revokeSession, X as resetPassword, Y as requestPasswordResetCallback, Z as ok, at as getAccessToken, b as AuthEndpoint, ct as refreshToken, dt as originCheckMiddleware, et as sendVerificationEmail, ft as getOAuthState, it as accountInfo, j as deleteUserCallback, k as changePassword, lt as unlinkAccount, nt as verifyEmail, ot as linkSocialAccount, pt as getIp, q as sessionMiddleware, rt as callbackOAuth, st as listUserAccounts, tt as sendVerificationEmailFn, ut as originCheck, w as createAuthMiddleware, x as AuthMiddleware, y as APIError, z as getSession } from "../index-CJ4w3OzO.mjs";
1
+ import { $ as createEmailVerificationToken, A as deleteUser, B as getSessionFromCtx, C as createAuthEndpoint, D as router, E as optionsMiddleware, F as signOut, G as revokeSessions, H as requestOnlySessionMiddleware, I as signInEmail, J as requestPasswordReset, K as sensitiveSessionMiddleware, L as signInSocial, M as setPassword, N as updateUser, O as changeEmail, P as signUpEmail, Q as error, R as freshSessionMiddleware, S as checkEndpointConflicts, T as getEndpoints, U as revokeOtherSessions, V as listSessions, W as revokeSession, X as resetPassword, Y as requestPasswordResetCallback, Z as ok, at as getAccessToken, b as AuthEndpoint, ct as refreshToken, dt as originCheckMiddleware, et as sendVerificationEmail, ft as getOAuthState, it as accountInfo, j as deleteUserCallback, k as changePassword, lt as unlinkAccount, nt as verifyEmail, ot as linkSocialAccount, pt as getIp, q as sessionMiddleware, rt as callbackOAuth, st as listUserAccounts, tt as sendVerificationEmailFn, ut as originCheck, w as createAuthMiddleware, x as AuthMiddleware, y as APIError, z as getSession } from "../index-COnelCGa.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 { APIError, AuthEndpoint, AuthMiddleware, accountInfo, callbackOAuth, changeEmail, changePassword, checkEndpointConflicts, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, error, freshSessionMiddleware, getAccessToken, getEndpoints, getIp, getOAuthState, getSession, getSessionFromCtx, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, refreshToken, requestOnlySessionMiddleware, requestPasswordReset, requestPasswordResetCallback, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sensitiveSessionMiddleware, sessionMiddleware, setPassword, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail };
@@ -1,8 +1,7 @@
1
- import { o as Auth } from "../index-CJ4w3OzO.mjs";
1
+ import { o as Auth } from "../index-COnelCGa.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
  import { BetterAuthOptions } from "@better-auth/core";
7
6
 
8
7
  //#region src/auth/minimal.d.ts
@@ -1,9 +1,206 @@
1
- import { At as BroadcastMessage, Ct as OnlineManager, Dt as kFocusManager, Et as FocusManager, Mt as kBroadcastChannel, Ot as BroadcastChannel, St as OnlineListener, Tt as FocusListener, _n as InferSessionFromClient, _t as AuthClient, bn as SessionQueryParams, bt as createSessionRefreshManager, cn as BetterAuthClientPlugin, dn as ClientStore, fn as InferActions, gn as InferPluginsFromClient, gt as Primitive, hn as InferErrorCodes, ht as InferPlugin, jt as getGlobalBroadcastChannel, kt as BroadcastListener, ln as ClientAtomListener, mn as InferClientAPI, mt as InferAuth, on as AtomListener, pn as InferAdditionalFromClient, sn as BetterAuthClientOptions, un as ClientOptions, vn as InferUserFromClient, vt as createAuthClient, wt as kOnlineManager, xn as Store, xt as useAuthQuery, yn as IsSignal, yt as SessionRefreshOptions } from "../index-CJ4w3OzO.mjs";
1
+ import { $t as InferUserFromClient, Gt as ClientOptions, Ht as BetterAuthClientOptions, Jt as InferAdditionalFromClient, Kt as ClientStore, Qt as InferSessionFromClient, Ut as BetterAuthClientPlugin, Vt as AtomListener, Wt as ClientAtomListener, Xt as InferErrorCodes, Yt as InferClientAPI, Zt as InferPluginsFromClient, en as IsSignal, nn as Store, qt as InferActions, tn as SessionQueryParams } from "../index-COnelCGa.mjs";
2
2
  import "../types-CEepZ-RG.mjs";
3
3
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, 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 { a as Role, c as Subset, i as AccessControl, n as createAccessControl, o as Statements, r as role, s as SubArray, t as AuthorizeResponse } from "../index-D8MBzSjs.mjs";
5
- import "../plugins-SfZpwDiz.mjs";
4
+ import "../plugins-Dmw3tk5H.mjs";
5
+ import { a as Role, c as Subset, i as AccessControl, n as createAccessControl, o as Statements, r as role, s as SubArray, t as AuthorizeResponse } from "../index-rnNTrfA7.mjs";
6
+ import { BetterAuthClientOptions as BetterAuthClientOptions$1, BetterAuthClientPlugin as BetterAuthClientPlugin$1, BetterAuthOptions, BetterAuthPlugin, ClientFetchOption } from "@better-auth/core";
7
+ import { Primitive } from "@better-auth/core/db";
8
+ import { BASE_ERROR_CODES } from "@better-auth/core/error";
9
+ import * as nanostores5 from "nanostores";
10
+ import { Atom, PreinitializedWritableAtom, WritableAtom } from "nanostores";
11
+ import * as _better_fetch_fetch95 from "@better-fetch/fetch";
12
+ import { BetterFetch, BetterFetchError } from "@better-fetch/fetch";
6
13
  export * from "@better-auth/core/db";
7
14
  export * from "nanostores";
8
15
  export * from "@better-fetch/fetch";
9
- export { AccessControl, AtomListener, AuthClient, AuthorizeResponse, Awaitable, BetterAuthClientOptions, BetterAuthClientPlugin, BroadcastChannel, BroadcastListener, BroadcastMessage, ClientAtomListener, ClientOptions, ClientStore, DeepPartial, Expand, FocusListener, FocusManager, HasRequiredKeys, InferActions, InferAdditionalFromClient, InferAuth, InferClientAPI, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, IsSignal, LiteralNumber, LiteralString, LiteralUnion, OmitId, OnlineListener, OnlineManager, PreserveJSDoc, Prettify, PrettifyDeep, Primitive, RequiredKeysOf, Role, SessionQueryParams, SessionRefreshOptions, Statements, Store, StripEmptyObjects, SubArray, Subset, UnionToIntersection, WithoutEmpty, createAccessControl, createAuthClient, createSessionRefreshManager, getGlobalBroadcastChannel, kBroadcastChannel, kFocusManager, kOnlineManager, role, useAuthQuery };
16
+
17
+ //#region src/client/broadcast-channel.d.ts
18
+ interface BroadcastMessage {
19
+ event?: "session" | undefined;
20
+ data?: {
21
+ trigger?: "signout" | "getSession" | "updateUser";
22
+ } | undefined;
23
+ clientId: string;
24
+ timestamp: number;
25
+ }
26
+ type BroadcastListener = (message: BroadcastMessage) => void;
27
+ declare const kBroadcastChannel: unique symbol;
28
+ interface BroadcastChannel {
29
+ post(message: Record<string, unknown>): void;
30
+ subscribe(listener: BroadcastListener): () => void;
31
+ setup(): () => void;
32
+ }
33
+ declare function getGlobalBroadcastChannel(name?: string): BroadcastChannel;
34
+ //#endregion
35
+ //#region src/client/focus-manager.d.ts
36
+ type FocusListener = (focused: boolean) => void;
37
+ declare const kFocusManager: unique symbol;
38
+ interface FocusManager {
39
+ setFocused(focused: boolean): void;
40
+ subscribe(listener: FocusListener): () => void;
41
+ setup(): () => void;
42
+ }
43
+ //#endregion
44
+ //#region src/client/online-manager.d.ts
45
+ type OnlineListener = (online: boolean) => void;
46
+ declare const kOnlineManager: unique symbol;
47
+ interface OnlineManager {
48
+ setOnline(online: boolean): void;
49
+ isOnline: boolean;
50
+ subscribe(listener: OnlineListener): () => void;
51
+ setup(): () => void;
52
+ }
53
+ //#endregion
54
+ //#region src/client/query.d.ts
55
+ declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: (((value: {
56
+ data: null | T;
57
+ error: null | BetterFetchError;
58
+ isPending: boolean;
59
+ }) => ClientFetchOption) | ClientFetchOption) | undefined) => PreinitializedWritableAtom<{
60
+ data: null | T;
61
+ error: null | BetterFetchError;
62
+ isPending: boolean;
63
+ isRefetching: boolean;
64
+ refetch: (queryParams?: {
65
+ query?: SessionQueryParams;
66
+ } | undefined) => Promise<void>;
67
+ }> & object;
68
+ //#endregion
69
+ //#region src/client/session-refresh.d.ts
70
+ interface SessionRefreshOptions {
71
+ sessionAtom: WritableAtom<any>;
72
+ sessionSignal: WritableAtom<boolean>;
73
+ $fetch: BetterFetch;
74
+ options?: BetterAuthClientOptions$1 | undefined;
75
+ }
76
+ declare function createSessionRefreshManager(opts: SessionRefreshOptions): {
77
+ init: () => void;
78
+ cleanup: () => void;
79
+ triggerRefetch: (event?: {
80
+ event?: "poll" | "visibilitychange" | "storage";
81
+ } | undefined) => void;
82
+ broadcastSessionUpdate: (trigger: "signout" | "getSession" | "updateUser") => void;
83
+ };
84
+ //#endregion
85
+ //#region src/client/vanilla.d.ts
86
+ type InferResolvedHooks<O extends BetterAuthClientOptions$1> = O extends {
87
+ plugins: Array<infer Plugin>;
88
+ } ? UnionToIntersection<Plugin extends BetterAuthClientPlugin$1 ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: Atoms[key] } : {} : {} : {}> : {};
89
+ declare function createAuthClient<Option extends BetterAuthClientOptions$1>(options?: Option | undefined): UnionToIntersection<InferResolvedHooks<Option>> & InferClientAPI<Option> & InferActions<Option> & {
90
+ useSession: Atom<{
91
+ data: InferClientAPI<Option> extends {
92
+ getSession: () => Promise<infer Res>;
93
+ } ? Res extends {
94
+ data: null;
95
+ error: {
96
+ message?: string | undefined;
97
+ status: number;
98
+ statusText: string;
99
+ };
100
+ } | {
101
+ data: infer S;
102
+ error: null;
103
+ } ? S : Res extends Record<string, any> ? Res : never : never;
104
+ error: BetterFetchError | null;
105
+ isPending: boolean;
106
+ }>;
107
+ $fetch: _better_fetch_fetch95.BetterFetch<{
108
+ plugins: (_better_fetch_fetch95.BetterFetchPlugin | {
109
+ id: string;
110
+ name: string;
111
+ hooks: {
112
+ onSuccess(context: _better_fetch_fetch95.SuccessContext<any>): void;
113
+ };
114
+ } | {
115
+ id: string;
116
+ name: string;
117
+ hooks: {
118
+ onSuccess: ((context: _better_fetch_fetch95.SuccessContext<any>) => Promise<void> | void) | undefined;
119
+ onError: ((context: _better_fetch_fetch95.ErrorContext) => Promise<void> | void) | undefined;
120
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch95.RequestContext<T>) => Promise<_better_fetch_fetch95.RequestContext | void> | _better_fetch_fetch95.RequestContext | void) | undefined;
121
+ onResponse: ((context: _better_fetch_fetch95.ResponseContext) => Promise<Response | void | _better_fetch_fetch95.ResponseContext> | Response | _better_fetch_fetch95.ResponseContext | void) | undefined;
122
+ };
123
+ })[];
124
+ cache?: RequestCache | undefined;
125
+ method: string;
126
+ headers?: (HeadersInit & (HeadersInit | {
127
+ accept: "application/json" | "text/plain" | "application/octet-stream";
128
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
129
+ authorization: "Bearer" | "Basic";
130
+ })) | undefined;
131
+ redirect?: RequestRedirect | undefined;
132
+ credentials?: RequestCredentials;
133
+ integrity?: string | undefined;
134
+ keepalive?: boolean | undefined;
135
+ mode?: RequestMode | undefined;
136
+ priority?: RequestPriority | undefined;
137
+ referrer?: string | undefined;
138
+ referrerPolicy?: ReferrerPolicy | undefined;
139
+ signal?: (AbortSignal | null) | undefined;
140
+ window?: null | undefined;
141
+ onRetry?: ((response: _better_fetch_fetch95.ResponseContext) => Promise<void> | void) | undefined;
142
+ hookOptions?: {
143
+ cloneResponse?: boolean;
144
+ } | undefined;
145
+ timeout?: number | undefined;
146
+ customFetchImpl: _better_fetch_fetch95.FetchEsque;
147
+ baseURL: string;
148
+ throw?: boolean | undefined;
149
+ auth?: ({
150
+ type: "Bearer";
151
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
152
+ } | {
153
+ type: "Basic";
154
+ username: string | (() => string | undefined) | undefined;
155
+ password: string | (() => string | undefined) | undefined;
156
+ } | {
157
+ type: "Custom";
158
+ prefix: string | (() => string | undefined) | undefined;
159
+ value: string | (() => string | undefined) | undefined;
160
+ }) | undefined;
161
+ body?: any;
162
+ query?: any;
163
+ params?: any;
164
+ duplex?: "full" | "half" | undefined;
165
+ jsonParser: (text: string) => Promise<any> | any;
166
+ retry?: _better_fetch_fetch95.RetryOptions | undefined;
167
+ retryAttempt?: number | undefined;
168
+ output?: (_better_fetch_fetch95.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
169
+ errorSchema?: _better_fetch_fetch95.StandardSchemaV1 | undefined;
170
+ disableValidation?: boolean | undefined;
171
+ disableSignal?: boolean | undefined;
172
+ }, unknown, unknown, {}>;
173
+ $store: {
174
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
175
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
176
+ atoms: Record<string, nanostores5.WritableAtom<any>>;
177
+ };
178
+ $Infer: {
179
+ Session: NonNullable<InferClientAPI<Option> extends {
180
+ getSession: () => Promise<infer Res>;
181
+ } ? Res extends {
182
+ data: null;
183
+ error: {
184
+ message?: string | undefined;
185
+ status: number;
186
+ statusText: string;
187
+ };
188
+ } | {
189
+ data: infer S;
190
+ error: null;
191
+ } ? S : Res extends Record<string, any> ? Res : never : never>;
192
+ };
193
+ $ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
194
+ };
195
+ type AuthClient<Option extends BetterAuthClientOptions$1> = ReturnType<typeof createAuthClient<Option>>;
196
+ //#endregion
197
+ //#region src/client/index.d.ts
198
+ declare const InferPlugin: <T extends BetterAuthPlugin>() => {
199
+ id: "infer-server-plugin";
200
+ $InferServerPlugin: T;
201
+ };
202
+ declare function InferAuth<O extends {
203
+ options: BetterAuthOptions;
204
+ }>(): O["options"];
205
+ //#endregion
206
+ export { AccessControl, AtomListener, AuthClient, AuthorizeResponse, Awaitable, BetterAuthClientOptions, BetterAuthClientPlugin, BroadcastChannel, BroadcastListener, BroadcastMessage, ClientAtomListener, ClientOptions, ClientStore, DeepPartial, Expand, type FocusListener, type FocusManager, HasRequiredKeys, InferActions, InferAdditionalFromClient, InferAuth, InferClientAPI, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, IsSignal, LiteralNumber, LiteralString, LiteralUnion, OmitId, type OnlineListener, type OnlineManager, PreserveJSDoc, Prettify, PrettifyDeep, type Primitive, RequiredKeysOf, Role, SessionQueryParams, SessionRefreshOptions, Statements, Store, StripEmptyObjects, SubArray, Subset, type UnionToIntersection, WithoutEmpty, createAccessControl, createAuthClient, createSessionRefreshManager, getGlobalBroadcastChannel, kBroadcastChannel, kFocusManager, kOnlineManager, role, useAuthQuery };
@@ -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-COnelCGa.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_fetch15 from "@better-fetch/fetch";
9
+ import * as _better_fetch_fetch31 from "@better-fetch/fetch";
11
10
  import { BetterFetchError } from "@better-fetch/fetch";
12
11
  import { DependencyList } from "@lynx-js/react";
13
12
  export * from "nanostores";
@@ -96,21 +95,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
96
95
  error: null;
97
96
  } ? S : Res : never>;
98
97
  };
99
- $fetch: _better_fetch_fetch15.BetterFetch<{
100
- plugins: (_better_fetch_fetch15.BetterFetchPlugin | {
98
+ $fetch: _better_fetch_fetch31.BetterFetch<{
99
+ plugins: (_better_fetch_fetch31.BetterFetchPlugin | {
101
100
  id: string;
102
101
  name: string;
103
102
  hooks: {
104
- onSuccess(context: _better_fetch_fetch15.SuccessContext<any>): void;
103
+ onSuccess(context: _better_fetch_fetch31.SuccessContext<any>): void;
105
104
  };
106
105
  } | {
107
106
  id: string;
108
107
  name: string;
109
108
  hooks: {
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;
109
+ onSuccess: ((context: _better_fetch_fetch31.SuccessContext<any>) => Promise<void> | void) | undefined;
110
+ onError: ((context: _better_fetch_fetch31.ErrorContext) => Promise<void> | void) | undefined;
111
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch31.RequestContext<T>) => Promise<_better_fetch_fetch31.RequestContext | void> | _better_fetch_fetch31.RequestContext | void) | undefined;
112
+ onResponse: ((context: _better_fetch_fetch31.ResponseContext) => Promise<Response | void | _better_fetch_fetch31.ResponseContext> | Response | _better_fetch_fetch31.ResponseContext | void) | undefined;
114
113
  };
115
114
  })[];
116
115
  cache?: RequestCache | undefined;
@@ -130,12 +129,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
130
129
  referrerPolicy?: ReferrerPolicy | undefined;
131
130
  signal?: (AbortSignal | null) | undefined;
132
131
  window?: null | undefined;
133
- onRetry?: ((response: _better_fetch_fetch15.ResponseContext) => Promise<void> | void) | undefined;
132
+ onRetry?: ((response: _better_fetch_fetch31.ResponseContext) => Promise<void> | void) | undefined;
134
133
  hookOptions?: {
135
134
  cloneResponse?: boolean;
136
135
  } | undefined;
137
136
  timeout?: number | undefined;
138
- customFetchImpl: _better_fetch_fetch15.FetchEsque;
137
+ customFetchImpl: _better_fetch_fetch31.FetchEsque;
139
138
  baseURL: string;
140
139
  throw?: boolean | undefined;
141
140
  auth?: ({
@@ -155,10 +154,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
155
154
  params?: any;
156
155
  duplex?: "full" | "half" | undefined;
157
156
  jsonParser: (text: string) => Promise<any> | any;
158
- retry?: _better_fetch_fetch15.RetryOptions | undefined;
157
+ retry?: _better_fetch_fetch31.RetryOptions | undefined;
159
158
  retryAttempt?: number | undefined;
160
- output?: (_better_fetch_fetch15.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
161
- errorSchema?: _better_fetch_fetch15.StandardSchemaV1 | undefined;
159
+ output?: (_better_fetch_fetch31.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
160
+ errorSchema?: _better_fetch_fetch31.StandardSchemaV1 | undefined;
162
161
  disableValidation?: boolean | undefined;
163
162
  disableSignal?: boolean | undefined;
164
163
  }, unknown, unknown, {}>;
@@ -1,28 +1,28 @@
1
- import { Un as InferAdditionalFieldsFromPluginOptions, bn as SessionQueryParams, r as BetterAuthOptions$1 } from "../../index-CJ4w3OzO.mjs";
1
+ import { r as BetterAuthOptions$1, tn as SessionQueryParams, wn as InferAdditionalFieldsFromPluginOptions } from "../../index-COnelCGa.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 { a as Role, i as AccessControl, o as Statements } from "../../index-D8MBzSjs.mjs";
5
- import "../../plugins-SfZpwDiz.mjs";
6
- import { B as OrganizationOptions, C as Organization, D as Team, T as OrganizationRole, _ as InferTeam, _t as admin, at as OAuthAccessToken, bt as SessionWithImpersonatedBy, c as OrganizationPlugin, ct as TokenBody, f as InferInvitation, gt as ApiKeyOptions, ht as ApiKey, it as CodeVerificationValue, k as TeamMember, m as InferOrganization, nt as AuthorizationQuery, ot as OIDCMetadata, p as InferMember, pt as apiKey, rt as Client, st as OIDCOptions, tt as oidcProvider, v as Invitation, vt as AdminOptions, x as Member, xt as UserWithRole, yt as InferAdminRolesFromOption } from "../../index-CujXvEf8.mjs";
7
- import { i as schema, n as AnonymousOptions, r as UserWithAnonymous, t as anonymous } from "../../index-Br01_oSy.mjs";
8
- import "../../index-DrEnqtuQ.mjs";
9
- import "../../index-WXoTnrFA.mjs";
10
- import "../../index-Dy2g8XKv.mjs";
11
- import { n as deviceAuthorization } from "../../index-BVJL9NCo.mjs";
12
- import { n as emailOTP } from "../../index-CnSDnpiK.mjs";
13
- import { _ as Auth0Options, a as SlackOptions, c as okta, d as LineOptions, f as line, g as hubspot, h as HubSpotOptions, i as genericOAuth, l as MicrosoftEntraIdOptions, m as keycloak, n as GenericOAuthConfig, o as slack, p as KeycloakOptions, r as GenericOAuthOptions, s as OktaOptions, t as BaseOAuthProviderOptions, u as microsoftEntraId, v as auth0 } from "../../index-DgwGZQ6M.mjs";
14
- import "../../index-wHdZCXFM.mjs";
15
- import { c as Jwk, l as JwtOptions, o as JWKOptions, s as JWSAlgorithms, t as jwt } from "../../index-CGBSkAO7.mjs";
16
- import { n as magicLink } from "../../index-B_1KAoYv.mjs";
17
- import { n as multiSession, t as MultiSessionConfig } from "../../index-Hid3pW0N.mjs";
18
- import "../../index-BkD9iyuk.mjs";
19
- import "../../index-K2ZMxFny.mjs";
20
- import { n as oneTimeToken, t as OneTimeTokenOptions } from "../../index-BsRgjUAv.mjs";
21
- import "../../index-0xgBgtem.mjs";
22
- import { n as PhoneNumberOptions, r as UserWithPhoneNumber, t as phoneNumber } from "../../index-CL-QZ1hb.mjs";
23
- import { n as siwe } from "../../index-DqkPFN8B.mjs";
24
- import { a as TwoFactorProvider, c as TOTPOptions, d as otp2fa, f as BackupCodeOptions, g as verifyBackupCode, h as getBackupCodes, i as TwoFactorOptions, l as totp2fa, m as generateBackupCodes, n as twoFactorClient, o as TwoFactorTable, p as backupCode2fa, s as UserWithTwoFactor, u as OTPOptions } from "../../index-DAPxdOKi.mjs";
25
- import { n as username } from "../../index-COEqRbac.mjs";
4
+ import "../../plugins-Dmw3tk5H.mjs";
5
+ import { a as Role, i as AccessControl, o as Statements } from "../../index-rnNTrfA7.mjs";
6
+ import { B as OrganizationOptions, C as Organization, D as Team, T as OrganizationRole, _ as InferTeam, _t as admin, at as OAuthAccessToken, bt as SessionWithImpersonatedBy, c as OrganizationPlugin, ct as TokenBody, f as InferInvitation, gt as ApiKeyOptions, ht as ApiKey, it as CodeVerificationValue, k as TeamMember, m as InferOrganization, nt as AuthorizationQuery, ot as OIDCMetadata, p as InferMember, pt as apiKey, rt as Client, st as OIDCOptions, tt as oidcProvider, v as Invitation, vt as AdminOptions, x as Member, xt as UserWithRole, yt as InferAdminRolesFromOption } from "../../index-F8qM450o.mjs";
7
+ import { i as schema, n as AnonymousOptions, r as UserWithAnonymous, t as anonymous } from "../../index-CMfXEnyA.mjs";
8
+ import "../../index-B64ouu9a.mjs";
9
+ import "../../index-CWcnHbjn.mjs";
10
+ import "../../index-DUa0239y.mjs";
11
+ import { n as deviceAuthorization } from "../../index-D2CJIZCI.mjs";
12
+ import { n as emailOTP } from "../../index-cgrDi8bR.mjs";
13
+ import { _ as Auth0Options, a as SlackOptions, c as okta, d as LineOptions, f as line, g as hubspot, h as HubSpotOptions, i as genericOAuth, l as MicrosoftEntraIdOptions, m as keycloak, n as GenericOAuthConfig, o as slack, p as KeycloakOptions, r as GenericOAuthOptions, s as OktaOptions, t as BaseOAuthProviderOptions, u as microsoftEntraId, v as auth0 } from "../../index-DLNLFTLS.mjs";
14
+ import "../../index-Bv2nWTrZ.mjs";
15
+ import { c as Jwk, l as JwtOptions, o as JWKOptions, s as JWSAlgorithms, t as jwt } from "../../index-0IRW2A1b.mjs";
16
+ import { n as magicLink } from "../../index-BMrJpdkv.mjs";
17
+ import { n as multiSession, t as MultiSessionConfig } from "../../index-t-jeKL1G.mjs";
18
+ import "../../index-DSwTw61P.mjs";
19
+ import "../../index-DoUxtZgO.mjs";
20
+ import { n as oneTimeToken, t as OneTimeTokenOptions } from "../../index-CmcoO98i.mjs";
21
+ import "../../index-BaZax_le.mjs";
22
+ import { n as PhoneNumberOptions, r as UserWithPhoneNumber, t as phoneNumber } from "../../index-alnYeOxT.mjs";
23
+ import { n as siwe } from "../../index-Dk2q2Dnr.mjs";
24
+ import { a as TwoFactorProvider, c as TOTPOptions, d as otp2fa, f as BackupCodeOptions, g as verifyBackupCode, h as getBackupCodes, i as TwoFactorOptions, l as totp2fa, m as generateBackupCodes, n as twoFactorClient, o as TwoFactorTable, p as backupCode2fa, s as UserWithTwoFactor, u as OTPOptions } from "../../index-Drqkvf7w.mjs";
25
+ import { n as username } from "../../index-CCnWzVSV.mjs";
26
26
  import * as _better_auth_core28 from "@better-auth/core";
27
27
  import { BetterAuthOptions, BetterAuthPlugin, ClientFetchOption } from "@better-auth/core";
28
28
  import { DBFieldAttribute } from "@better-auth/core/db";
@@ -1,8 +1,7 @@
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-COnelCGa.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";
@@ -1,11 +1,10 @@
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-COnelCGa.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 _better_fetch_fetch31 from "@better-fetch/fetch";
7
+ import * as _better_fetch_fetch15 from "@better-fetch/fetch";
9
8
  import { BetterFetchError } from "@better-fetch/fetch";
10
9
  import { Accessor } from "solid-js";
11
10
  export * from "nanostores";
@@ -49,21 +48,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
49
48
  error: null;
50
49
  } ? S : Res extends Record<string, any> ? Res : never : never>;
51
50
  };
52
- $fetch: _better_fetch_fetch31.BetterFetch<{
53
- plugins: (_better_fetch_fetch31.BetterFetchPlugin | {
51
+ $fetch: _better_fetch_fetch15.BetterFetch<{
52
+ plugins: (_better_fetch_fetch15.BetterFetchPlugin | {
54
53
  id: string;
55
54
  name: string;
56
55
  hooks: {
57
- onSuccess(context: _better_fetch_fetch31.SuccessContext<any>): void;
56
+ onSuccess(context: _better_fetch_fetch15.SuccessContext<any>): void;
58
57
  };
59
58
  } | {
60
59
  id: string;
61
60
  name: string;
62
61
  hooks: {
63
- onSuccess: ((context: _better_fetch_fetch31.SuccessContext<any>) => Promise<void> | void) | undefined;
64
- onError: ((context: _better_fetch_fetch31.ErrorContext) => Promise<void> | void) | undefined;
65
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch31.RequestContext<T>) => Promise<_better_fetch_fetch31.RequestContext | void> | _better_fetch_fetch31.RequestContext | void) | undefined;
66
- onResponse: ((context: _better_fetch_fetch31.ResponseContext) => Promise<Response | void | _better_fetch_fetch31.ResponseContext> | Response | _better_fetch_fetch31.ResponseContext | void) | undefined;
62
+ onSuccess: ((context: _better_fetch_fetch15.SuccessContext<any>) => Promise<void> | void) | undefined;
63
+ onError: ((context: _better_fetch_fetch15.ErrorContext) => Promise<void> | void) | undefined;
64
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch15.RequestContext<T>) => Promise<_better_fetch_fetch15.RequestContext | void> | _better_fetch_fetch15.RequestContext | void) | undefined;
65
+ onResponse: ((context: _better_fetch_fetch15.ResponseContext) => Promise<Response | void | _better_fetch_fetch15.ResponseContext> | Response | _better_fetch_fetch15.ResponseContext | void) | undefined;
67
66
  };
68
67
  })[];
69
68
  cache?: RequestCache | undefined;
@@ -83,12 +82,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
83
82
  referrerPolicy?: ReferrerPolicy | undefined;
84
83
  signal?: (AbortSignal | null) | undefined;
85
84
  window?: null | undefined;
86
- onRetry?: ((response: _better_fetch_fetch31.ResponseContext) => Promise<void> | void) | undefined;
85
+ onRetry?: ((response: _better_fetch_fetch15.ResponseContext) => Promise<void> | void) | undefined;
87
86
  hookOptions?: {
88
87
  cloneResponse?: boolean;
89
88
  } | undefined;
90
89
  timeout?: number | undefined;
91
- customFetchImpl: _better_fetch_fetch31.FetchEsque;
90
+ customFetchImpl: _better_fetch_fetch15.FetchEsque;
92
91
  baseURL: string;
93
92
  throw?: boolean | undefined;
94
93
  auth?: ({
@@ -108,10 +107,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
108
107
  params?: any;
109
108
  duplex?: "full" | "half" | undefined;
110
109
  jsonParser: (text: string) => Promise<any> | any;
111
- retry?: _better_fetch_fetch31.RetryOptions | undefined;
110
+ retry?: _better_fetch_fetch15.RetryOptions | undefined;
112
111
  retryAttempt?: number | undefined;
113
- output?: (_better_fetch_fetch31.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
114
- errorSchema?: _better_fetch_fetch31.StandardSchemaV1 | undefined;
112
+ output?: (_better_fetch_fetch15.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
113
+ errorSchema?: _better_fetch_fetch15.StandardSchemaV1 | undefined;
115
114
  disableValidation?: boolean | undefined;
116
115
  disableSignal?: boolean | undefined;
117
116
  }, unknown, unknown, {}>;