better-auth 1.4.1 → 1.4.2-beta.1
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.
- package/dist/adapters/index.d.mts +3 -2
- package/dist/api/index.d.mts +3 -2
- package/dist/api/index.mjs +1 -1
- package/dist/auth/minimal.d.mts +3 -2
- package/dist/auth/minimal.mjs +2 -2
- package/dist/{auth-COq2wuZq.mjs → auth-CeQLd3k1.mjs} +2 -2
- package/dist/{base-C0S84LB0.mjs → base-BHA7zdvH.mjs} +1 -1
- package/dist/client/index.d.mts +5 -207
- package/dist/client/index.mjs +2 -2
- package/dist/client/lynx/index.d.mts +5 -4
- package/dist/client/lynx/index.mjs +1 -1
- package/dist/client/plugins/index.d.mts +25 -25
- package/dist/client/plugins/index.mjs +2 -2
- package/dist/client/react/index.d.mts +19 -18
- package/dist/client/react/index.mjs +1 -1
- package/dist/client/solid/index.d.mts +5 -4
- package/dist/client/solid/index.mjs +1 -1
- package/dist/client/svelte/index.d.mts +21 -20
- package/dist/client/svelte/index.mjs +1 -1
- package/dist/client/vue/index.d.mts +21 -20
- package/dist/client/vue/index.mjs +1 -1
- package/dist/{client-D6y29bCu.mjs → client-BikTMh-g.mjs} +1 -1
- package/dist/cookies/index.d.mts +4 -3
- package/dist/db/index.d.mts +3 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{get-migration-C2PG4G2s.mjs → get-migration-6ewabxRC.mjs} +4 -1
- package/dist/{index-BLJzuqKN.d.mts → index-3xdcOhdN.d.mts} +4 -4
- package/dist/{index-DJHJraoc.d.mts → index-BIoUQmIt.d.mts} +1 -1
- package/dist/{index-NYwYi8xD.d.mts → index-BewhEch1.d.mts} +7 -7
- package/dist/{index-BzgT8cQd.d.mts → index-BpMot30d.d.mts} +352 -154
- package/dist/{index-eghn_0Yh.d.mts → index-BwH_uMEC.d.mts} +6 -6
- package/dist/{index-C7v0AYqh.d.mts → index-C1_KK-qX.d.mts} +15 -15
- package/dist/{index-74T5_IsI.d.mts → index-C1_lAkC9.d.mts} +6 -6
- package/dist/{index-cYOD8ePR.d.mts → index-CIQSAazt.d.mts} +14 -14
- package/dist/{index-DflwMIEg.d.mts → index-COU32wym.d.mts} +8 -8
- package/dist/{index-DVrXtIqH.d.mts → index-CjZjd7L9.d.mts} +6 -6
- package/dist/{index-CfImj7fH.d.mts → index-Ct8nsp1o.d.mts} +11 -11
- package/dist/{index-CVhQCf8K.d.mts → index-D3DEzZCu.d.mts} +5 -5
- package/dist/{index-BLP8lbCx.d.mts → index-D800W6ZW.d.mts} +39 -39
- package/dist/{index-PViBvM0U.d.mts → index-D8OPLCTm.d.mts} +2 -2
- package/dist/{index-ClMi8Sht.d.mts → index-DGzN3KKg.d.mts} +3 -3
- package/dist/{index-1ni_0_8A.d.mts → index-DnkzGBwe.d.mts} +11 -11
- package/dist/{index-BGHbvBl4.d.mts → index-G7ilDBSM.d.mts} +10 -10
- package/dist/{index-hjj802-A.d.mts → index-PBVRO-6D.d.mts} +4 -4
- package/dist/{index-kmJy6lr-.d.mts → index-SBjk_96V.d.mts} +20 -20
- package/dist/{index-CXkIWFzZ.d.mts → index-TSOiA9en.d.mts} +2 -2
- package/dist/{index-DNvaBD-J.d.mts → index-d55kTGID.d.mts} +8 -8
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +3 -3
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/node.d.mts +3 -2
- package/dist/integrations/svelte-kit.d.mts +5 -4
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/oauth2/index.d.mts +3 -2
- package/dist/oauth2/index.mjs +1 -1
- package/dist/{organization-CL4Xa8Vi.mjs → organization-3o-DMajL.mjs} +1 -1
- package/dist/plugins/access/index.d.mts +1 -1
- package/dist/plugins/admin/access/index.d.mts +22 -22
- package/dist/plugins/admin/index.d.mts +22 -22
- package/dist/plugins/admin/index.mjs +1 -1
- package/dist/plugins/anonymous/index.d.mts +4 -3
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.mts +4 -3
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/device-authorization/index.mjs +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +4 -3
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.d.mts +22 -22
- package/dist/plugins/index.mjs +2 -2
- package/dist/plugins/jwt/index.d.mts +4 -3
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/oidc-provider/index.d.mts +22 -22
- package/dist/plugins/oidc-provider/index.mjs +1 -1
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/one-time-token/index.d.mts +4 -3
- package/dist/plugins/one-time-token/index.mjs +2 -2
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/access/index.d.mts +22 -22
- package/dist/plugins/organization/index.d.mts +22 -22
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/phone-number/index.d.mts +4 -3
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/siwe/index.d.mts +4 -3
- package/dist/plugins/siwe/index.mjs +1 -1
- package/dist/plugins/two-factor/index.d.mts +4 -3
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.d.mts +2 -2
- package/dist/plugins/username/index.mjs +1 -1
- package/dist/{proxy-DZR0bcsP.mjs → proxy-BMMJa46T.mjs} +0 -3
- package/dist/test-utils/index.d.mts +4 -3
- package/dist/test-utils/index.mjs +6 -6
- package/dist/types/index.d.mts +3 -2
- package/package.json +3 -3
- /package/dist/{index-B45xbAn7.d.mts → index-CNCxG_Zo.d.mts} +0 -0
- /package/dist/{plugins-ClXJF1tD.d.mts → plugins-Brc8BsoZ.d.mts} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as AdapterSchemaCreation, an as Where$1, in as TransactionAdapter } from "../index-BpMot30d.mjs";
|
|
2
2
|
import "../types-CRiHq5rJ.mjs";
|
|
3
3
|
import { u as Prettify } from "../helper-DU33OcfW.mjs";
|
|
4
|
-
import "../
|
|
4
|
+
import "../index-CNCxG_Zo.mjs";
|
|
5
|
+
import "../plugins-Brc8BsoZ.mjs";
|
|
5
6
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
6
7
|
import * as _better_auth_core_db23 from "@better-auth/core/db";
|
|
7
8
|
import { BetterAuthDBSchema, DBFieldAttribute } from "@better-auth/core/db";
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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-
|
|
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-BpMot30d.mjs";
|
|
2
2
|
import "../types-CRiHq5rJ.mjs";
|
|
3
3
|
import "../helper-DU33OcfW.mjs";
|
|
4
|
-
import "../
|
|
4
|
+
import "../index-CNCxG_Zo.mjs";
|
|
5
|
+
import "../plugins-Brc8BsoZ.mjs";
|
|
5
6
|
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 };
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../dialect-BvcuosDD.mjs";
|
|
2
2
|
import "../get-model-name-D4DUV7S2.mjs";
|
|
3
|
-
import "../get-migration-
|
|
3
|
+
import "../get-migration-6ewabxRC.mjs";
|
|
4
4
|
import { a as getOAuthState } from "../utils-DBbaShi0.mjs";
|
|
5
5
|
import "../crypto-BQxYXGGX.mjs";
|
|
6
6
|
import "../jwt-DzuIBp7t.mjs";
|
package/dist/auth/minimal.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { o as Auth } from "../index-
|
|
1
|
+
import { o as Auth } from "../index-BpMot30d.mjs";
|
|
2
2
|
import "../types-CRiHq5rJ.mjs";
|
|
3
3
|
import "../helper-DU33OcfW.mjs";
|
|
4
|
-
import "../
|
|
4
|
+
import "../index-CNCxG_Zo.mjs";
|
|
5
|
+
import "../plugins-Brc8BsoZ.mjs";
|
|
5
6
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
6
7
|
|
|
7
8
|
//#region src/auth/minimal.d.ts
|
package/dist/auth/minimal.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../dialect-BvcuosDD.mjs";
|
|
2
2
|
import "../get-model-name-D4DUV7S2.mjs";
|
|
3
|
-
import { d as getBaseAdapter } from "../get-migration-
|
|
3
|
+
import { d as getBaseAdapter } from "../get-migration-6ewabxRC.mjs";
|
|
4
4
|
import "../utils-DBbaShi0.mjs";
|
|
5
5
|
import "../crypto-BQxYXGGX.mjs";
|
|
6
6
|
import "../jwt-DzuIBp7t.mjs";
|
|
@@ -12,7 +12,7 @@ import "../url-C4fqRUH1.mjs";
|
|
|
12
12
|
import "../api-CE_W4rUg.mjs";
|
|
13
13
|
import "../cookies-m6bKaTlj.mjs";
|
|
14
14
|
import "../session-BO-S7wVw.mjs";
|
|
15
|
-
import { n as createAuthContext, t as createBetterAuth } from "../base-
|
|
15
|
+
import { n as createAuthContext, t as createBetterAuth } from "../base-BHA7zdvH.mjs";
|
|
16
16
|
import "../password-DBH2q5D6.mjs";
|
|
17
17
|
import { BetterAuthError } from "@better-auth/core/error";
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as getKyselyDatabaseType } from "./dialect-BvcuosDD.mjs";
|
|
2
|
-
import { t as getMigrations, u as getAdapter } from "./get-migration-
|
|
3
|
-
import { n as createAuthContext, t as createBetterAuth } from "./base-
|
|
2
|
+
import { t as getMigrations, u as getAdapter } from "./get-migration-6ewabxRC.mjs";
|
|
3
|
+
import { n as createAuthContext, t as createBetterAuth } from "./base-BHA7zdvH.mjs";
|
|
4
4
|
import { BetterAuthError } from "@better-auth/core/error";
|
|
5
5
|
|
|
6
6
|
//#region src/context/init.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as getAuthTables } from "./get-model-name-D4DUV7S2.mjs";
|
|
2
|
-
import { a as createInternalAdapter } from "./get-migration-
|
|
2
|
+
import { a as createInternalAdapter } from "./get-migration-6ewabxRC.mjs";
|
|
3
3
|
import { t as generateId } from "./utils-DBbaShi0.mjs";
|
|
4
4
|
import { a as verifyPassword, i as hashPassword } from "./crypto-BQxYXGGX.mjs";
|
|
5
5
|
import { r as getOrigin, t as getBaseURL } from "./url-C4fqRUH1.mjs";
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,211 +1,9 @@
|
|
|
1
|
-
import {
|
|
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-BpMot30d.mjs";
|
|
2
2
|
import "../types-CRiHq5rJ.mjs";
|
|
3
|
-
import { d as PrettifyDeep, h as UnionToIntersection } from "../helper-DU33OcfW.mjs";
|
|
4
|
-
import "../
|
|
5
|
-
import
|
|
6
|
-
import { BetterAuthClientOptions as BetterAuthClientOptions$1, BetterAuthClientPlugin as BetterAuthClientPlugin$1, BetterAuthOptions, BetterAuthPlugin, ClientFetchOption } from "@better-auth/core";
|
|
7
|
-
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
|
-
import * as nanostores5 from "nanostores";
|
|
9
|
-
import { Atom, PreinitializedWritableAtom, WritableAtom } from "nanostores";
|
|
10
|
-
import * as _better_fetch_fetch101 from "@better-fetch/fetch";
|
|
11
|
-
import { BetterFetch, BetterFetchError } from "@better-fetch/fetch";
|
|
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-DU33OcfW.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-CNCxG_Zo.mjs";
|
|
5
|
+
import "../plugins-Brc8BsoZ.mjs";
|
|
12
6
|
export * from "@better-auth/core/db";
|
|
13
7
|
export * from "nanostores";
|
|
14
8
|
export * from "@better-fetch/fetch";
|
|
15
|
-
|
|
16
|
-
//#region src/client/broadcast-channel.d.ts
|
|
17
|
-
interface BroadcastMessage {
|
|
18
|
-
event?: "session" | undefined;
|
|
19
|
-
data?: {
|
|
20
|
-
trigger?: "signout" | "getSession" | "updateUser";
|
|
21
|
-
} | undefined;
|
|
22
|
-
clientId: string;
|
|
23
|
-
timestamp: number;
|
|
24
|
-
}
|
|
25
|
-
type BroadcastListener = (message: BroadcastMessage) => void;
|
|
26
|
-
declare const kBroadcastChannel: unique symbol;
|
|
27
|
-
interface BroadcastChannel {
|
|
28
|
-
post(message: Record<string, unknown>): void;
|
|
29
|
-
subscribe(listener: BroadcastListener): () => void;
|
|
30
|
-
setup(): () => void;
|
|
31
|
-
}
|
|
32
|
-
declare function getGlobalBroadcastChannel(name?: string): BroadcastChannel;
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/client/focus-manager.d.ts
|
|
35
|
-
type FocusListener = (focused: boolean) => void;
|
|
36
|
-
declare const kFocusManager: unique symbol;
|
|
37
|
-
interface FocusManager {
|
|
38
|
-
setFocused(focused: boolean): void;
|
|
39
|
-
subscribe(listener: FocusListener): () => void;
|
|
40
|
-
setup(): () => void;
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/client/online-manager.d.ts
|
|
44
|
-
type OnlineListener = (online: boolean) => void;
|
|
45
|
-
declare const kOnlineManager: unique symbol;
|
|
46
|
-
interface OnlineManager {
|
|
47
|
-
setOnline(online: boolean): void;
|
|
48
|
-
isOnline: boolean;
|
|
49
|
-
subscribe(listener: OnlineListener): () => void;
|
|
50
|
-
setup(): () => void;
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/client/query.d.ts
|
|
54
|
-
declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: (((value: {
|
|
55
|
-
data: null | T;
|
|
56
|
-
error: null | BetterFetchError;
|
|
57
|
-
isPending: boolean;
|
|
58
|
-
}) => ClientFetchOption) | ClientFetchOption) | undefined) => PreinitializedWritableAtom<{
|
|
59
|
-
data: null | T;
|
|
60
|
-
error: null | BetterFetchError;
|
|
61
|
-
isPending: boolean;
|
|
62
|
-
isRefetching: boolean;
|
|
63
|
-
refetch: (queryParams?: {
|
|
64
|
-
query?: SessionQueryParams;
|
|
65
|
-
} | undefined) => Promise<void>;
|
|
66
|
-
}> & object;
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/client/session-refresh.d.ts
|
|
69
|
-
interface SessionRefreshOptions {
|
|
70
|
-
sessionAtom: WritableAtom<any>;
|
|
71
|
-
sessionSignal: WritableAtom<boolean>;
|
|
72
|
-
$fetch: BetterFetch;
|
|
73
|
-
options?: BetterAuthClientOptions$1 | undefined;
|
|
74
|
-
}
|
|
75
|
-
declare function createSessionRefreshManager(opts: SessionRefreshOptions): {
|
|
76
|
-
init: () => void;
|
|
77
|
-
cleanup: () => void;
|
|
78
|
-
triggerRefetch: (event?: {
|
|
79
|
-
event?: "poll" | "visibilitychange" | "storage";
|
|
80
|
-
} | undefined) => void;
|
|
81
|
-
broadcastSessionUpdate: (trigger: "signout" | "getSession" | "updateUser") => void;
|
|
82
|
-
};
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/client/vanilla.d.ts
|
|
85
|
-
type InferResolvedHooks<O extends BetterAuthClientOptions$1> = O extends {
|
|
86
|
-
plugins: Array<infer Plugin>;
|
|
87
|
-
} ? 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] } : {} : {} : {}> : {};
|
|
88
|
-
declare function createAuthClient<Option extends BetterAuthClientOptions$1>(options?: Option | undefined): UnionToIntersection<InferResolvedHooks<Option>> & InferClientAPI<Option> & InferActions<Option> & {
|
|
89
|
-
useSession: Atom<{
|
|
90
|
-
data: InferClientAPI<Option> extends {
|
|
91
|
-
getSession: () => Promise<infer Res>;
|
|
92
|
-
} ? Res extends {
|
|
93
|
-
data: null;
|
|
94
|
-
error: {
|
|
95
|
-
message?: string | undefined;
|
|
96
|
-
status: number;
|
|
97
|
-
statusText: string;
|
|
98
|
-
};
|
|
99
|
-
} | {
|
|
100
|
-
data: infer S;
|
|
101
|
-
error: null;
|
|
102
|
-
} ? S : Res extends Record<string, any> ? Res : never : never;
|
|
103
|
-
error: BetterFetchError | null;
|
|
104
|
-
isPending: boolean;
|
|
105
|
-
}>;
|
|
106
|
-
$fetch: _better_fetch_fetch101.BetterFetch<{
|
|
107
|
-
plugins: (_better_fetch_fetch101.BetterFetchPlugin | {
|
|
108
|
-
id: string;
|
|
109
|
-
name: string;
|
|
110
|
-
hooks: {
|
|
111
|
-
onSuccess(context: _better_fetch_fetch101.SuccessContext<any>): void;
|
|
112
|
-
};
|
|
113
|
-
} | {
|
|
114
|
-
id: string;
|
|
115
|
-
name: string;
|
|
116
|
-
hooks: {
|
|
117
|
-
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch101.RequestContext<T>): void;
|
|
118
|
-
};
|
|
119
|
-
} | {
|
|
120
|
-
id: string;
|
|
121
|
-
name: string;
|
|
122
|
-
hooks: {
|
|
123
|
-
onSuccess: ((context: _better_fetch_fetch101.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
124
|
-
onError: ((context: _better_fetch_fetch101.ErrorContext) => Promise<void> | void) | undefined;
|
|
125
|
-
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch101.RequestContext<T>) => Promise<_better_fetch_fetch101.RequestContext | void> | _better_fetch_fetch101.RequestContext | void) | undefined;
|
|
126
|
-
onResponse: ((context: _better_fetch_fetch101.ResponseContext) => Promise<Response | void | _better_fetch_fetch101.ResponseContext> | Response | _better_fetch_fetch101.ResponseContext | void) | undefined;
|
|
127
|
-
};
|
|
128
|
-
})[];
|
|
129
|
-
cache?: RequestCache | undefined;
|
|
130
|
-
method: string;
|
|
131
|
-
headers?: (HeadersInit & (HeadersInit | {
|
|
132
|
-
accept: "application/json" | "text/plain" | "application/octet-stream";
|
|
133
|
-
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
|
134
|
-
authorization: "Bearer" | "Basic";
|
|
135
|
-
})) | undefined;
|
|
136
|
-
redirect?: RequestRedirect | undefined;
|
|
137
|
-
credentials?: RequestCredentials;
|
|
138
|
-
integrity?: string | undefined;
|
|
139
|
-
keepalive?: boolean | undefined;
|
|
140
|
-
mode?: RequestMode | undefined;
|
|
141
|
-
priority?: RequestPriority | undefined;
|
|
142
|
-
referrer?: string | undefined;
|
|
143
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
144
|
-
signal?: (AbortSignal | null) | undefined;
|
|
145
|
-
window?: null | undefined;
|
|
146
|
-
onRetry?: ((response: _better_fetch_fetch101.ResponseContext) => Promise<void> | void) | undefined;
|
|
147
|
-
hookOptions?: {
|
|
148
|
-
cloneResponse?: boolean;
|
|
149
|
-
} | undefined;
|
|
150
|
-
timeout?: number | undefined;
|
|
151
|
-
customFetchImpl: _better_fetch_fetch101.FetchEsque;
|
|
152
|
-
baseURL: string;
|
|
153
|
-
throw?: boolean | undefined;
|
|
154
|
-
auth?: ({
|
|
155
|
-
type: "Bearer";
|
|
156
|
-
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
|
157
|
-
} | {
|
|
158
|
-
type: "Basic";
|
|
159
|
-
username: string | (() => string | undefined) | undefined;
|
|
160
|
-
password: string | (() => string | undefined) | undefined;
|
|
161
|
-
} | {
|
|
162
|
-
type: "Custom";
|
|
163
|
-
prefix: string | (() => string | undefined) | undefined;
|
|
164
|
-
value: string | (() => string | undefined) | undefined;
|
|
165
|
-
}) | undefined;
|
|
166
|
-
body?: any;
|
|
167
|
-
query?: any;
|
|
168
|
-
params?: any;
|
|
169
|
-
duplex?: "full" | "half" | undefined;
|
|
170
|
-
jsonParser: (text: string) => Promise<any> | any;
|
|
171
|
-
retry?: _better_fetch_fetch101.RetryOptions | undefined;
|
|
172
|
-
retryAttempt?: number | undefined;
|
|
173
|
-
output?: (_better_fetch_fetch101.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
174
|
-
errorSchema?: _better_fetch_fetch101.StandardSchemaV1 | undefined;
|
|
175
|
-
disableValidation?: boolean | undefined;
|
|
176
|
-
disableSignal?: boolean | undefined;
|
|
177
|
-
}, unknown, unknown, {}>;
|
|
178
|
-
$store: {
|
|
179
|
-
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
180
|
-
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
181
|
-
atoms: Record<string, nanostores5.WritableAtom<any>>;
|
|
182
|
-
};
|
|
183
|
-
$Infer: {
|
|
184
|
-
Session: NonNullable<InferClientAPI<Option> extends {
|
|
185
|
-
getSession: () => Promise<infer Res>;
|
|
186
|
-
} ? Res extends {
|
|
187
|
-
data: null;
|
|
188
|
-
error: {
|
|
189
|
-
message?: string | undefined;
|
|
190
|
-
status: number;
|
|
191
|
-
statusText: string;
|
|
192
|
-
};
|
|
193
|
-
} | {
|
|
194
|
-
data: infer S;
|
|
195
|
-
error: null;
|
|
196
|
-
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
197
|
-
};
|
|
198
|
-
$ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
199
|
-
};
|
|
200
|
-
type AuthClient<Option extends BetterAuthClientOptions$1> = ReturnType<typeof createAuthClient<Option>>;
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region src/client/index.d.ts
|
|
203
|
-
declare const InferPlugin: <T extends BetterAuthPlugin>() => {
|
|
204
|
-
id: "infer-server-plugin";
|
|
205
|
-
$InferServerPlugin: T;
|
|
206
|
-
};
|
|
207
|
-
declare function InferAuth<O extends {
|
|
208
|
-
options: BetterAuthOptions;
|
|
209
|
-
}>(): O["options"];
|
|
210
|
-
//#endregion
|
|
211
|
-
export { AccessControl, AtomListener, AuthClient, AuthorizeResponse, BetterAuthClientOptions, BetterAuthClientPlugin, BroadcastChannel, BroadcastListener, BroadcastMessage, ClientAtomListener, ClientOptions, ClientStore, type FocusListener, type FocusManager, InferActions, InferAdditionalFromClient, InferAuth, InferClientAPI, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, IsSignal, type OnlineListener, type OnlineManager, Role, SessionQueryParams, SessionRefreshOptions, Statements, Store, SubArray, Subset, createAccessControl, createAuthClient, createSessionRefreshManager, getGlobalBroadcastChannel, kBroadcastChannel, kFocusManager, kOnlineManager, role, useAuthQuery };
|
|
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 };
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../misc-D8A8FGv2.mjs";
|
|
2
2
|
import "../url-C4fqRUH1.mjs";
|
|
3
|
-
import { a as kOnlineManager, c as kBroadcastChannel, i as useAuthQuery, o as kFocusManager, r as createSessionRefreshManager, s as getGlobalBroadcastChannel } from "../proxy-
|
|
3
|
+
import { a as kOnlineManager, c as kBroadcastChannel, i as useAuthQuery, o as kFocusManager, r as createSessionRefreshManager, s as getGlobalBroadcastChannel } from "../proxy-BMMJa46T.mjs";
|
|
4
4
|
import "../parser-kwbb5q_C.mjs";
|
|
5
|
-
import { n as InferPlugin, r as createAuthClient, t as InferAuth } from "../client-
|
|
5
|
+
import { n as InferPlugin, r as createAuthClient, t as InferAuth } from "../client-BikTMh-g.mjs";
|
|
6
6
|
|
|
7
7
|
export { InferAuth, InferPlugin, createAuthClient, createSessionRefreshManager, getGlobalBroadcastChannel, kBroadcastChannel, kFocusManager, kOnlineManager, useAuthQuery };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bn as SessionQueryParams, fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-BpMot30d.mjs";
|
|
2
2
|
import "../../types-CRiHq5rJ.mjs";
|
|
3
|
-
import { d as PrettifyDeep, h as UnionToIntersection } from "../../helper-DU33OcfW.mjs";
|
|
4
|
-
import "../../
|
|
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-DU33OcfW.mjs";
|
|
4
|
+
import "../../index-CNCxG_Zo.mjs";
|
|
5
|
+
import "../../plugins-Brc8BsoZ.mjs";
|
|
5
6
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
6
7
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
7
8
|
import * as nanostores2 from "nanostores";
|
|
@@ -175,4 +176,4 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
175
176
|
$ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
176
177
|
};
|
|
177
178
|
//#endregion
|
|
178
|
-
export { capitalizeFirstLetter, createAuthClient, useStore };
|
|
179
|
+
export { Awaitable, DeepPartial, Expand, HasRequiredKeys, LiteralNumber, LiteralString, LiteralUnion, OmitId, PreserveJSDoc, Prettify, PrettifyDeep, Primitive, RequiredKeysOf, StripEmptyObjects, type UnionToIntersection, WithoutEmpty, capitalizeFirstLetter, createAuthClient, useStore };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../url-C4fqRUH1.mjs";
|
|
2
|
-
import { n as getClientConfig, t as createDynamicPathProxy } from "../../proxy-
|
|
2
|
+
import { n as getClientConfig, t as createDynamicPathProxy } from "../../proxy-BMMJa46T.mjs";
|
|
3
3
|
import "../../parser-kwbb5q_C.mjs";
|
|
4
4
|
import { listenKeys } from "nanostores";
|
|
5
5
|
import { useCallback, useRef, useSyncExternalStore } from "@lynx-js/react";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Un as InferAdditionalFieldsFromPluginOptions, bn as SessionQueryParams, i as BetterAuthPlugin$1, r as BetterAuthOptions$1 } from "../../index-BpMot30d.mjs";
|
|
2
2
|
import "../../types-CRiHq5rJ.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-DU33OcfW.mjs";
|
|
4
|
-
import "../../
|
|
5
|
-
import
|
|
6
|
-
import { B as OrganizationOptions, C as Organization, D as Team, T as OrganizationRole, _ as InferTeam, c as OrganizationPlugin, f as InferInvitation, ht as admin, k as TeamMember, m as InferOrganization, p as InferMember, pt as apiKey, tt as oidcProvider, v as Invitation, x as Member } from "../../index-
|
|
7
|
-
import { t as anonymous } from "../../index-
|
|
8
|
-
import "../../index-
|
|
9
|
-
import "../../index-
|
|
10
|
-
import "../../index-
|
|
11
|
-
import { n as deviceAuthorization } from "../../index-
|
|
12
|
-
import { n as emailOTP } from "../../index-
|
|
13
|
-
import { r as genericOAuth } from "../../index-
|
|
14
|
-
import "../../index-
|
|
15
|
-
import { t as jwt } from "../../index-
|
|
16
|
-
import { n as magicLink } from "../../index-
|
|
17
|
-
import { t as multiSession } from "../../index-
|
|
18
|
-
import "../../index-
|
|
19
|
-
import "../../index-
|
|
20
|
-
import { t as oneTimeToken } from "../../index-
|
|
4
|
+
import { a as Role, i as AccessControl, o as Statements } from "../../index-CNCxG_Zo.mjs";
|
|
5
|
+
import "../../plugins-Brc8BsoZ.mjs";
|
|
6
|
+
import { B as OrganizationOptions, C as Organization, D as Team, T as OrganizationRole, _ as InferTeam, c as OrganizationPlugin, f as InferInvitation, ht as admin, k as TeamMember, m as InferOrganization, p as InferMember, pt as apiKey, tt as oidcProvider, v as Invitation, x as Member } from "../../index-D800W6ZW.mjs";
|
|
7
|
+
import { t as anonymous } from "../../index-BewhEch1.mjs";
|
|
8
|
+
import "../../index-C1_lAkC9.mjs";
|
|
9
|
+
import "../../index-D8OPLCTm.mjs";
|
|
10
|
+
import "../../index-CjZjd7L9.mjs";
|
|
11
|
+
import { n as deviceAuthorization } from "../../index-BwH_uMEC.mjs";
|
|
12
|
+
import { n as emailOTP } from "../../index-C1_KK-qX.mjs";
|
|
13
|
+
import { r as genericOAuth } from "../../index-COU32wym.mjs";
|
|
14
|
+
import "../../index-DGzN3KKg.mjs";
|
|
15
|
+
import { t as jwt } from "../../index-DnkzGBwe.mjs";
|
|
16
|
+
import { n as magicLink } from "../../index-PBVRO-6D.mjs";
|
|
17
|
+
import { t as multiSession } from "../../index-CIQSAazt.mjs";
|
|
18
|
+
import "../../index-d55kTGID.mjs";
|
|
19
|
+
import "../../index-TSOiA9en.mjs";
|
|
20
|
+
import { t as oneTimeToken } from "../../index-D3DEzZCu.mjs";
|
|
21
21
|
import "../../index-BGVqvXfP.mjs";
|
|
22
|
-
import { t as phoneNumber } from "../../index-
|
|
23
|
-
import { n as siwe } from "../../index-
|
|
24
|
-
import { n as twoFactorClient } from "../../index-
|
|
25
|
-
import { n as username } from "../../index-
|
|
26
|
-
import * as
|
|
22
|
+
import { t as phoneNumber } from "../../index-Ct8nsp1o.mjs";
|
|
23
|
+
import { n as siwe } from "../../index-3xdcOhdN.mjs";
|
|
24
|
+
import { n as twoFactorClient } from "../../index-SBjk_96V.mjs";
|
|
25
|
+
import { n as username } from "../../index-G7ilDBSM.mjs";
|
|
26
|
+
import * as _better_auth_core28 from "@better-auth/core";
|
|
27
27
|
import { BetterAuthOptions, ClientFetchOption } from "@better-auth/core";
|
|
28
28
|
import { DBFieldAttribute } from "@better-auth/core/db";
|
|
29
29
|
import * as nanostores6 from "nanostores";
|
|
@@ -387,7 +387,7 @@ interface GoogleOneTapActionOptions extends Omit<GoogleOneTapOptions, "clientId"
|
|
|
387
387
|
}
|
|
388
388
|
declare const oneTapClient: (options: GoogleOneTapOptions) => {
|
|
389
389
|
id: "one-tap";
|
|
390
|
-
getActions: ($fetch: _better_fetch_fetch118.BetterFetch, _:
|
|
390
|
+
getActions: ($fetch: _better_fetch_fetch118.BetterFetch, _: _better_auth_core28.ClientStore) => {
|
|
391
391
|
oneTap: (opts?: GoogleOneTapActionOptions | undefined, fetchOptions?: ClientFetchOption | undefined) => Promise<void>;
|
|
392
392
|
};
|
|
393
393
|
getAtoms($fetch: _better_fetch_fetch118.BetterFetch): {};
|
|
@@ -489,7 +489,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
489
489
|
} ? true : false;
|
|
490
490
|
};
|
|
491
491
|
}>;
|
|
492
|
-
getActions: ($fetch: _better_fetch_fetch118.BetterFetch, _$store:
|
|
492
|
+
getActions: ($fetch: _better_fetch_fetch118.BetterFetch, _$store: _better_auth_core28.ClientStore, co: _better_auth_core28.BetterAuthClientOptions | undefined) => {
|
|
493
493
|
$Infer: {
|
|
494
494
|
ActiveOrganization: CO["teams"] extends {
|
|
495
495
|
enabled: true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../misc-D8A8FGv2.mjs";
|
|
2
2
|
import "../../url-C4fqRUH1.mjs";
|
|
3
|
-
import { i as useAuthQuery } from "../../proxy-
|
|
3
|
+
import { i as useAuthQuery } from "../../proxy-BMMJa46T.mjs";
|
|
4
4
|
import "../../parser-kwbb5q_C.mjs";
|
|
5
|
-
import "../../client-
|
|
5
|
+
import "../../client-BikTMh-g.mjs";
|
|
6
6
|
import "../../access-DXuPG0DH.mjs";
|
|
7
7
|
import { a as userAc, t as adminAc$1 } from "../../access-Bue6UE97.mjs";
|
|
8
8
|
import { t as hasPermission } from "../../has-permission-DN8I_Icv.mjs";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bn as SessionQueryParams, fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-BpMot30d.mjs";
|
|
2
2
|
import "../../types-CRiHq5rJ.mjs";
|
|
3
|
-
import { d as PrettifyDeep, h as UnionToIntersection } from "../../helper-DU33OcfW.mjs";
|
|
4
|
-
import "../../
|
|
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-DU33OcfW.mjs";
|
|
4
|
+
import "../../index-CNCxG_Zo.mjs";
|
|
5
|
+
import "../../plugins-Brc8BsoZ.mjs";
|
|
5
6
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
6
7
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
7
8
|
import * as nanostores0 from "nanostores";
|
|
8
9
|
import { Store, StoreValue } from "nanostores";
|
|
9
|
-
import * as
|
|
10
|
+
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
10
11
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
11
12
|
import { DependencyList } from "react";
|
|
12
13
|
export * from "nanostores";
|
|
@@ -96,27 +97,27 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
96
97
|
error: null;
|
|
97
98
|
} ? S : Res : never>;
|
|
98
99
|
};
|
|
99
|
-
$fetch:
|
|
100
|
-
plugins: (
|
|
100
|
+
$fetch: _better_fetch_fetch0.BetterFetch<{
|
|
101
|
+
plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
|
|
101
102
|
id: string;
|
|
102
103
|
name: string;
|
|
103
104
|
hooks: {
|
|
104
|
-
onSuccess(context:
|
|
105
|
+
onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
|
|
105
106
|
};
|
|
106
107
|
} | {
|
|
107
108
|
id: string;
|
|
108
109
|
name: string;
|
|
109
110
|
hooks: {
|
|
110
|
-
onRequest<T extends Record<string, any>>(context:
|
|
111
|
+
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>): void;
|
|
111
112
|
};
|
|
112
113
|
} | {
|
|
113
114
|
id: string;
|
|
114
115
|
name: string;
|
|
115
116
|
hooks: {
|
|
116
|
-
onSuccess: ((context:
|
|
117
|
-
onError: ((context:
|
|
118
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
119
|
-
onResponse: ((context:
|
|
117
|
+
onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
118
|
+
onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
|
|
119
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
|
|
120
|
+
onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
|
|
120
121
|
};
|
|
121
122
|
})[];
|
|
122
123
|
cache?: RequestCache | undefined;
|
|
@@ -136,12 +137,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
136
137
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
137
138
|
signal?: (AbortSignal | null) | undefined;
|
|
138
139
|
window?: null | undefined;
|
|
139
|
-
onRetry?: ((response:
|
|
140
|
+
onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
|
|
140
141
|
hookOptions?: {
|
|
141
142
|
cloneResponse?: boolean;
|
|
142
143
|
} | undefined;
|
|
143
144
|
timeout?: number | undefined;
|
|
144
|
-
customFetchImpl:
|
|
145
|
+
customFetchImpl: _better_fetch_fetch0.FetchEsque;
|
|
145
146
|
baseURL: string;
|
|
146
147
|
throw?: boolean | undefined;
|
|
147
148
|
auth?: ({
|
|
@@ -161,10 +162,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
161
162
|
params?: any;
|
|
162
163
|
duplex?: "full" | "half" | undefined;
|
|
163
164
|
jsonParser: (text: string) => Promise<any> | any;
|
|
164
|
-
retry?:
|
|
165
|
+
retry?: _better_fetch_fetch0.RetryOptions | undefined;
|
|
165
166
|
retryAttempt?: number | undefined;
|
|
166
|
-
output?: (
|
|
167
|
-
errorSchema?:
|
|
167
|
+
output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
168
|
+
errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
|
|
168
169
|
disableValidation?: boolean | undefined;
|
|
169
170
|
disableSignal?: boolean | undefined;
|
|
170
171
|
}, unknown, unknown, {}>;
|
|
@@ -176,4 +177,4 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
176
177
|
$ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
177
178
|
};
|
|
178
179
|
//#endregion
|
|
179
|
-
export { capitalizeFirstLetter, createAuthClient, useStore };
|
|
180
|
+
export { Awaitable, DeepPartial, Expand, HasRequiredKeys, LiteralNumber, LiteralString, LiteralUnion, OmitId, PreserveJSDoc, Prettify, PrettifyDeep, Primitive, RequiredKeysOf, StripEmptyObjects, type UnionToIntersection, WithoutEmpty, capitalizeFirstLetter, createAuthClient, useStore };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../url-C4fqRUH1.mjs";
|
|
2
|
-
import { n as getClientConfig, t as createDynamicPathProxy } from "../../proxy-
|
|
2
|
+
import { n as getClientConfig, t as createDynamicPathProxy } from "../../proxy-BMMJa46T.mjs";
|
|
3
3
|
import "../../parser-kwbb5q_C.mjs";
|
|
4
4
|
import { listenKeys } from "nanostores";
|
|
5
5
|
import { useCallback, useRef, useSyncExternalStore } from "react";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-BpMot30d.mjs";
|
|
2
2
|
import "../../types-CRiHq5rJ.mjs";
|
|
3
|
-
import { d as PrettifyDeep, h as UnionToIntersection } from "../../helper-DU33OcfW.mjs";
|
|
4
|
-
import "../../
|
|
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-DU33OcfW.mjs";
|
|
4
|
+
import "../../index-CNCxG_Zo.mjs";
|
|
5
|
+
import "../../plugins-Brc8BsoZ.mjs";
|
|
5
6
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
6
7
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
7
8
|
import * as _better_fetch_fetch50 from "@better-fetch/fetch";
|
|
@@ -123,4 +124,4 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
123
124
|
$ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
124
125
|
};
|
|
125
126
|
//#endregion
|
|
126
|
-
export { createAuthClient };
|
|
127
|
+
export { Awaitable, DeepPartial, Expand, HasRequiredKeys, LiteralNumber, LiteralString, LiteralUnion, OmitId, PreserveJSDoc, Prettify, PrettifyDeep, Primitive, RequiredKeysOf, StripEmptyObjects, type UnionToIntersection, WithoutEmpty, createAuthClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as capitalizeFirstLetter } from "../../misc-D8A8FGv2.mjs";
|
|
2
2
|
import "../../url-C4fqRUH1.mjs";
|
|
3
|
-
import { n as getClientConfig, t as createDynamicPathProxy } from "../../proxy-
|
|
3
|
+
import { n as getClientConfig, t as createDynamicPathProxy } from "../../proxy-BMMJa46T.mjs";
|
|
4
4
|
import "../../parser-kwbb5q_C.mjs";
|
|
5
5
|
import { onCleanup } from "solid-js";
|
|
6
6
|
import { createStore, reconcile } from "solid-js/store";
|