better-auth 1.4.2-beta.5 → 1.4.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.
- package/dist/adapters/index.d.mts +5 -5
- package/dist/{admin-CZ-flJgu.mjs → admin-DRb3NuGP.mjs} +1 -1
- package/dist/{anonymous-D9kn2HbT.mjs → anonymous-DE68m7D9.mjs} +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/{api-B5UtMGAu.mjs → api-SIcH7loJ.mjs} +2 -1
- package/dist/auth/minimal.d.mts +1 -1
- package/dist/auth/minimal.mjs +2 -2
- package/dist/{auth-BrFsX_UB.mjs → auth-BTZUtYcv.mjs} +1 -1
- package/dist/{base-7VKD3kzc.mjs → base-Dz2MGspW.mjs} +1 -1
- package/dist/{chunk-DbI2OXuS.mjs → chunk-09eW3CcW.mjs} +12 -27
- package/dist/client/index.d.mts +1 -1
- package/dist/client/lynx/index.d.mts +15 -15
- package/dist/client/plugins/index.d.mts +41 -41
- package/dist/client/react/index.d.mts +15 -15
- package/dist/client/solid/index.d.mts +15 -15
- package/dist/client/svelte/index.d.mts +17 -17
- package/dist/client/vue/index.d.mts +17 -17
- package/dist/cookies/index.d.mts +2 -2
- package/dist/db/index.d.mts +1 -1
- package/dist/{email-otp-BKks5yU6.mjs → email-otp-Ci5bUa5A.mjs} +1 -1
- package/dist/{esm-DkLFGBDk.mjs → esm-vGSrBWV-.mjs} +1 -1
- package/dist/{generic-oauth-DgHm0dTu.mjs → generic-oauth-Cwp2Wzmr.mjs} +3 -3
- package/dist/{haveibeenpwned-DZOcS0Ic.mjs → haveibeenpwned-_gQr5euw.mjs} +1 -1
- package/dist/{index-BIcv-sL5.d.mts → index-B07NY0Qd.d.mts} +341 -359
- package/dist/{index-DEnoipSq.d.mts → index-B17C87x4.d.mts} +3 -3
- package/dist/{index-DwPcLYsl.d.mts → index-B1K7VDim.d.mts} +5 -5
- package/dist/{index-BhwYHhVB.d.mts → index-B5cYsEzG.d.mts} +167 -164
- package/dist/{index-DoRkYJ4V.d.mts → index-BFOwcUV-.d.mts} +15 -15
- package/dist/{index-IqEa9fTn.d.mts → index-BSIZszGr.d.mts} +3 -3
- package/dist/{index-CIC5bfUf.d.mts → index-BeJkyaAb.d.mts} +7 -7
- package/dist/{index-CjudmcX7.d.mts → index-BfO-uaZu.d.mts} +6 -6
- package/dist/{index-D4AbEqQQ.d.mts → index-C5K0Taww.d.mts} +4 -4
- package/dist/{index-CVaCsjno.d.mts → index-CBZz3bwR.d.mts} +2 -2
- package/dist/{index-B-t_1ri_.d.mts → index-CL8RWvJ3.d.mts} +73 -667
- package/dist/{index-C1_lAkC9.d.mts → index-CTtQLxVk.d.mts} +3 -3
- package/dist/{index-DBcQnmQv.d.mts → index-CaCX-TO7.d.mts} +3 -3
- package/dist/{index-C-sxiFWD.d.mts → index-Cga0xJdy.d.mts} +6 -6
- package/dist/{index-BliOeY_4.d.mts → index-Co37f-WU.d.mts} +1 -1
- package/dist/{index-BIrjmAsK.d.mts → index-CvTScBp4.d.mts} +15 -15
- package/dist/{index-BAw-71vg.d.mts → index-DC-Q1vHe.d.mts} +10 -10
- package/dist/{index-0yDS8SvM.d.mts → index-DGnTyGCm.d.mts} +10 -10
- package/dist/{index-C0J62OzE.d.mts → index-Datsk5CT.d.mts} +8 -8
- package/dist/{index-DSP91HEJ.d.mts → index-aVmHQcxt.d.mts} +14 -14
- package/dist/{index-CKaBc8Ol.d.mts → index-gd10Jo_Z.d.mts} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/svelte-kit.d.mts +3 -3
- package/dist/integrations/tanstack-start.d.mts +2 -2
- package/dist/integrations/tanstack-start.mjs +1 -1
- package/dist/{jwt-BmGDikrB.mjs → jwt-w0aE3Gx0.mjs} +1 -1
- package/dist/{magic-link-j1Uulv5Q.mjs → magic-link-DgRXH5bS.mjs} +1 -1
- package/dist/{multi-session-CJDA6BnE.mjs → multi-session-BQiKowgN.mjs} +1 -1
- package/dist/{oauth-proxy-Bcg_vy_Q.mjs → oauth-proxy-BBGLeOu2.mjs} +1 -1
- package/dist/oauth2/index.d.mts +1 -1
- package/dist/oauth2/index.mjs +1 -1
- package/dist/{oidc-provider-DJooCY6z.mjs → oidc-provider-DbD7btYN.mjs} +2 -2
- package/dist/{one-tap-DE4Eb0Sz.mjs → one-tap-Pg8x9T-2.mjs} +1 -1
- package/dist/{open-api-uE45DSpR.mjs → open-api-D2GzqXOq.mjs} +1 -1
- package/dist/{organization-BxVHa1C_.mjs → organization-CLqMWARX.mjs} +2 -21
- package/dist/plugins/admin/access/index.d.mts +20 -20
- package/dist/plugins/admin/index.d.mts +20 -20
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.d.mts +2 -2
- package/dist/plugins/anonymous/index.mjs +2 -2
- 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 +2 -2
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.mjs +2 -2
- package/dist/plugins/generic-oauth/index.d.mts +3 -3
- package/dist/plugins/generic-oauth/index.mjs +2 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +2 -2
- package/dist/plugins/index.d.mts +21 -21
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/jwt/index.d.mts +2 -2
- package/dist/plugins/jwt/index.mjs +2 -2
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +2 -2
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.mjs +2 -2
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +2 -2
- package/dist/plugins/oidc-provider/index.d.mts +20 -20
- package/dist/plugins/oidc-provider/index.mjs +3 -3
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +2 -2
- package/dist/plugins/one-time-token/index.d.mts +3 -3
- package/dist/plugins/one-time-token/index.mjs +17 -17
- package/dist/plugins/open-api/index.d.mts +1 -1
- package/dist/plugins/open-api/index.mjs +2 -2
- package/dist/plugins/organization/access/index.d.mts +20 -20
- package/dist/plugins/organization/index.d.mts +20 -20
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/phone-number/index.d.mts +2 -2
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/siwe/index.d.mts +2 -2
- package/dist/plugins/siwe/index.mjs +2 -2
- package/dist/plugins/two-factor/index.d.mts +3 -3
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/plugins/username/index.mjs +2 -2
- package/dist/{plugins-4mReK1VZ.mjs → plugins-BFWt77ux.mjs} +9 -6
- package/dist/{promise-B9Mgup-x.mjs → promise-LNBdnXqN.mjs} +1 -2
- package/dist/{server-B9SCp3Db.mjs → server-CCi1nVxo.mjs} +3 -3
- package/dist/{siwe-CkeLFk98.mjs → siwe-CMgzoTPg.mjs} +1 -1
- package/dist/test-utils/index.d.mts +298 -292
- package/dist/test-utils/index.mjs +22 -22
- package/dist/types/index.d.mts +1 -1
- package/dist/{username-3cs0umlt.mjs → username-CZyOfQnw.mjs} +1 -1
- package/package.json +6 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $t as AdapterSchemaCreation, an as Where$1, in as TransactionAdapter } from "../index-
|
|
1
|
+
import { $t as AdapterSchemaCreation, an as Where$1, in as TransactionAdapter } from "../index-B5cYsEzG.mjs";
|
|
2
2
|
import "../types-CRiHq5rJ.mjs";
|
|
3
3
|
import { u as Prettify } from "../helper-DU33OcfW.mjs";
|
|
4
4
|
import "../index-CNCxG_Zo.mjs";
|
|
5
5
|
import "../plugins-Brc8BsoZ.mjs";
|
|
6
6
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
7
|
-
import * as
|
|
7
|
+
import * as _better_auth_core_db131 from "@better-auth/core/db";
|
|
8
8
|
import { BetterAuthDBSchema, DBFieldAttribute } from "@better-auth/core/db";
|
|
9
9
|
import { CustomAdapter as CustomAdapter$1, DBAdapter, DBAdapterFactoryConfig, JoinConfig } from "@better-auth/core/db/adapter";
|
|
10
10
|
export * from "@better-auth/core/db/adapter";
|
|
@@ -54,7 +54,7 @@ declare const initGetFieldAttributes: ({
|
|
|
54
54
|
}: {
|
|
55
55
|
model: string;
|
|
56
56
|
field: string;
|
|
57
|
-
}) =>
|
|
57
|
+
}) => _better_auth_core_db131.DBFieldAttribute<_better_auth_core_db131.DBFieldType>;
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/adapters/adapter-factory/get-field-name.d.ts
|
|
60
60
|
declare const initGetFieldName: ({
|
|
@@ -96,8 +96,8 @@ declare const initGetIdField: ({
|
|
|
96
96
|
forceAllowId?: boolean;
|
|
97
97
|
}) => {
|
|
98
98
|
transform: {
|
|
99
|
-
input: (value:
|
|
100
|
-
output: (value:
|
|
99
|
+
input: (value: _better_auth_core_db131.DBPrimitive) => string | number | true | Date | unknown[] | Record<string, unknown> | undefined;
|
|
100
|
+
output: (value: _better_auth_core_db131.DBPrimitive) => string | undefined;
|
|
101
101
|
};
|
|
102
102
|
defaultValue?: (() => string | false | undefined) | undefined;
|
|
103
103
|
type: "string" | "number";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as parseUserOutput, t as mergeSchema, u as getDate } from "./schema-CSB7dlK0.mjs";
|
|
2
|
-
import { t as APIError } from "./api-
|
|
2
|
+
import { t as APIError } from "./api-SIcH7loJ.mjs";
|
|
3
3
|
import { c as setSessionCookie, n as deleteSessionCookie } from "./cookies-m6bKaTlj.mjs";
|
|
4
4
|
import { r as getSessionFromCtx } from "./session-BO-S7wVw.mjs";
|
|
5
5
|
import { t as hasPermission } from "./has-permission-DN8I_Icv.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as generateId } from "./utils-DBbaShi0.mjs";
|
|
2
2
|
import { t as mergeSchema } from "./schema-CSB7dlK0.mjs";
|
|
3
|
-
import { t as APIError } from "./api-
|
|
3
|
+
import { t as APIError } from "./api-SIcH7loJ.mjs";
|
|
4
4
|
import { c as setSessionCookie, l as parseSetCookieHeader } from "./cookies-m6bKaTlj.mjs";
|
|
5
5
|
import { r as getSessionFromCtx } from "./session-BO-S7wVw.mjs";
|
|
6
6
|
import { defineErrorCodes } from "@better-auth/core/utils";
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-B5cYsEzG.mjs";
|
|
2
2
|
import "../types-CRiHq5rJ.mjs";
|
|
3
3
|
import "../helper-DU33OcfW.mjs";
|
|
4
4
|
import "../index-CNCxG_Zo.mjs";
|
package/dist/api/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import "../schema-CSB7dlK0.mjs";
|
|
|
9
9
|
import { t as getIp } from "../get-request-ip-RYTz2Uba.mjs";
|
|
10
10
|
import "../json-_HMgPUVh.mjs";
|
|
11
11
|
import "../url-C4fqRUH1.mjs";
|
|
12
|
-
import { A as getAccessToken, C as createEmailVerificationToken, D as callbackOAuth, E as verifyEmail, L as originCheck, M as listUserAccounts, N as refreshToken, P as unlinkAccount, R as originCheckMiddleware, S as error, T as sendVerificationEmailFn, _ as signInSocial, a as getEndpoints, b as resetPassword, c as changeEmail, d as deleteUserCallback, f as setPassword, g as signInEmail, h as signOut, i as createAuthMiddleware, j as linkSocialAccount, k as accountInfo, l as changePassword, m as signUpEmail, n as checkEndpointConflicts, o as optionsMiddleware, p as updateUser, r as createAuthEndpoint, s as router, t as APIError, u as deleteUser, v as requestPasswordReset, w as sendVerificationEmail, x as ok, y as requestPasswordResetCallback } from "../api-
|
|
12
|
+
import { A as getAccessToken, C as createEmailVerificationToken, D as callbackOAuth, E as verifyEmail, L as originCheck, M as listUserAccounts, N as refreshToken, P as unlinkAccount, R as originCheckMiddleware, S as error, T as sendVerificationEmailFn, _ as signInSocial, a as getEndpoints, b as resetPassword, c as changeEmail, d as deleteUserCallback, f as setPassword, g as signInEmail, h as signOut, i as createAuthMiddleware, j as linkSocialAccount, k as accountInfo, l as changePassword, m as signUpEmail, n as checkEndpointConflicts, o as optionsMiddleware, p as updateUser, r as createAuthEndpoint, s as router, t as APIError, u as deleteUser, v as requestPasswordReset, w as sendVerificationEmail, x as ok, y as requestPasswordResetCallback } from "../api-SIcH7loJ.mjs";
|
|
13
13
|
import "../cookies-m6bKaTlj.mjs";
|
|
14
14
|
import { a as requestOnlySessionMiddleware, c as revokeSessions, i as listSessions, l as sensitiveSessionMiddleware, n as getSession, o as revokeOtherSessions, r as getSessionFromCtx, s as revokeSession, t as freshSessionMiddleware, u as sessionMiddleware } from "../session-BO-S7wVw.mjs";
|
|
15
15
|
|
|
@@ -1821,12 +1821,13 @@ function redirectCallback(ctx, callbackURL, query) {
|
|
|
1821
1821
|
}
|
|
1822
1822
|
const requestPasswordReset = createAuthEndpoint("/request-password-reset", {
|
|
1823
1823
|
method: "POST",
|
|
1824
|
+
operationId: "forgetPassword",
|
|
1824
1825
|
body: z.object({
|
|
1825
1826
|
email: z.email().meta({ description: "The email address of the user to send a password reset email to" }),
|
|
1826
1827
|
redirectTo: z.string().meta({ description: "The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN" }).optional()
|
|
1827
1828
|
}),
|
|
1828
1829
|
metadata: { openapi: {
|
|
1829
|
-
operationId: "
|
|
1830
|
+
operationId: "forgetPassword",
|
|
1830
1831
|
description: "Send a password reset email to the user",
|
|
1831
1832
|
responses: { "200": {
|
|
1832
1833
|
description: "Success",
|
package/dist/auth/minimal.d.mts
CHANGED
package/dist/auth/minimal.mjs
CHANGED
|
@@ -9,10 +9,10 @@ import "../schema-CSB7dlK0.mjs";
|
|
|
9
9
|
import "../get-request-ip-RYTz2Uba.mjs";
|
|
10
10
|
import "../json-_HMgPUVh.mjs";
|
|
11
11
|
import "../url-C4fqRUH1.mjs";
|
|
12
|
-
import "../api-
|
|
12
|
+
import "../api-SIcH7loJ.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-Dz2MGspW.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
2
|
import { t as getMigrations, u as getAdapter } from "./get-migration-6ewabxRC.mjs";
|
|
3
|
-
import { n as createAuthContext, t as createBetterAuth } from "./base-
|
|
3
|
+
import { n as createAuthContext, t as createBetterAuth } from "./base-Dz2MGspW.mjs";
|
|
4
4
|
import { BetterAuthError } from "@better-auth/core/error";
|
|
5
5
|
|
|
6
6
|
//#region src/context/init.ts
|
|
@@ -3,7 +3,7 @@ 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";
|
|
6
|
-
import { a as getEndpoints, n as checkEndpointConflicts, s as router } from "./api-
|
|
6
|
+
import { a as getEndpoints, n as checkEndpointConflicts, s as router } from "./api-SIcH7loJ.mjs";
|
|
7
7
|
import { i as getCookies, t as createCookieGetter } from "./cookies-m6bKaTlj.mjs";
|
|
8
8
|
import { t as checkPassword } from "./password-DBH2q5D6.mjs";
|
|
9
9
|
import { runWithAdapter } from "@better-auth/core/context";
|
|
@@ -10,40 +10,25 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
10
10
|
var __commonJS = (cb, mod) => function() {
|
|
11
11
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
12
|
};
|
|
13
|
-
var __export = (all
|
|
13
|
+
var __export = (all) => {
|
|
14
14
|
let target = {};
|
|
15
|
-
for (var name in all) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
if (symbols) {
|
|
22
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
23
|
-
}
|
|
15
|
+
for (var name in all) __defProp(target, name, {
|
|
16
|
+
get: all[name],
|
|
17
|
+
enumerable: true
|
|
18
|
+
});
|
|
24
19
|
return target;
|
|
25
20
|
};
|
|
26
21
|
var __copyProps = (to, from, except, desc) => {
|
|
27
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
23
|
+
key = keys[i];
|
|
24
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
25
|
+
get: ((k) => from[k]).bind(null, key),
|
|
26
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
27
|
+
});
|
|
37
28
|
}
|
|
38
29
|
return to;
|
|
39
30
|
};
|
|
40
|
-
var __reExport = (target, mod, secondTarget,
|
|
41
|
-
if (symbols) {
|
|
42
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
43
|
-
secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
|
|
44
|
-
}
|
|
45
|
-
__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
46
|
-
};
|
|
31
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
47
32
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
48
33
|
value: mod,
|
|
49
34
|
enumerable: true
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-B5cYsEzG.mjs";
|
|
2
2
|
import "../types-CRiHq5rJ.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-DU33OcfW.mjs";
|
|
4
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bn as SessionQueryParams, fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-
|
|
1
|
+
import { bn as SessionQueryParams, fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-B5cYsEzG.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
4
|
import "../../index-CNCxG_Zo.mjs";
|
|
@@ -7,7 +7,7 @@ import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/co
|
|
|
7
7
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
8
|
import * as nanostores2 from "nanostores";
|
|
9
9
|
import { Store, StoreValue } from "nanostores";
|
|
10
|
-
import * as
|
|
10
|
+
import * as _better_fetch_fetch67 from "@better-fetch/fetch";
|
|
11
11
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
12
12
|
import { DependencyList } from "@lynx-js/react";
|
|
13
13
|
export * from "nanostores";
|
|
@@ -96,27 +96,27 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
96
96
|
error: null;
|
|
97
97
|
} ? S : Res : never>;
|
|
98
98
|
};
|
|
99
|
-
$fetch:
|
|
100
|
-
plugins: (
|
|
99
|
+
$fetch: _better_fetch_fetch67.BetterFetch<{
|
|
100
|
+
plugins: (_better_fetch_fetch67.BetterFetchPlugin | {
|
|
101
101
|
id: string;
|
|
102
102
|
name: string;
|
|
103
103
|
hooks: {
|
|
104
|
-
onSuccess(context:
|
|
104
|
+
onSuccess(context: _better_fetch_fetch67.SuccessContext<any>): void;
|
|
105
105
|
};
|
|
106
106
|
} | {
|
|
107
107
|
id: string;
|
|
108
108
|
name: string;
|
|
109
109
|
hooks: {
|
|
110
|
-
onRequest<T extends Record<string, any>>(context:
|
|
110
|
+
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch67.RequestContext<T>): void;
|
|
111
111
|
};
|
|
112
112
|
} | {
|
|
113
113
|
id: string;
|
|
114
114
|
name: string;
|
|
115
115
|
hooks: {
|
|
116
|
-
onSuccess: ((context:
|
|
117
|
-
onError: ((context:
|
|
118
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
119
|
-
onResponse: ((context:
|
|
116
|
+
onSuccess: ((context: _better_fetch_fetch67.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
117
|
+
onError: ((context: _better_fetch_fetch67.ErrorContext) => Promise<void> | void) | undefined;
|
|
118
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch67.RequestContext<T>) => Promise<_better_fetch_fetch67.RequestContext | void> | _better_fetch_fetch67.RequestContext | void) | undefined;
|
|
119
|
+
onResponse: ((context: _better_fetch_fetch67.ResponseContext) => Promise<Response | void | _better_fetch_fetch67.ResponseContext> | Response | _better_fetch_fetch67.ResponseContext | void) | undefined;
|
|
120
120
|
};
|
|
121
121
|
})[];
|
|
122
122
|
cache?: RequestCache | undefined;
|
|
@@ -136,12 +136,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
136
136
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
137
137
|
signal?: (AbortSignal | null) | undefined;
|
|
138
138
|
window?: null | undefined;
|
|
139
|
-
onRetry?: ((response:
|
|
139
|
+
onRetry?: ((response: _better_fetch_fetch67.ResponseContext) => Promise<void> | void) | undefined;
|
|
140
140
|
hookOptions?: {
|
|
141
141
|
cloneResponse?: boolean;
|
|
142
142
|
} | undefined;
|
|
143
143
|
timeout?: number | undefined;
|
|
144
|
-
customFetchImpl:
|
|
144
|
+
customFetchImpl: _better_fetch_fetch67.FetchEsque;
|
|
145
145
|
baseURL: string;
|
|
146
146
|
throw?: boolean | undefined;
|
|
147
147
|
auth?: ({
|
|
@@ -161,10 +161,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
161
161
|
params?: any;
|
|
162
162
|
duplex?: "full" | "half" | undefined;
|
|
163
163
|
jsonParser: (text: string) => Promise<any> | any;
|
|
164
|
-
retry?:
|
|
164
|
+
retry?: _better_fetch_fetch67.RetryOptions | undefined;
|
|
165
165
|
retryAttempt?: number | undefined;
|
|
166
|
-
output?: (
|
|
167
|
-
errorSchema?:
|
|
166
|
+
output?: (_better_fetch_fetch67.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
167
|
+
errorSchema?: _better_fetch_fetch67.StandardSchemaV1 | undefined;
|
|
168
168
|
disableValidation?: boolean | undefined;
|
|
169
169
|
disableSignal?: boolean | undefined;
|
|
170
170
|
}, unknown, unknown, {}>;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { Un as InferAdditionalFieldsFromPluginOptions, bn as SessionQueryParams, r as BetterAuthOptions$1 } from "../../index-
|
|
1
|
+
import { Un as InferAdditionalFieldsFromPluginOptions, bn as SessionQueryParams, r as BetterAuthOptions$1 } from "../../index-B5cYsEzG.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
4
|
import { a as Role, i as AccessControl, o as Statements } from "../../index-CNCxG_Zo.mjs";
|
|
5
5
|
import "../../plugins-Brc8BsoZ.mjs";
|
|
6
|
-
import { B as OrganizationOptions, C as Organization, D as Team, T as OrganizationRole, _ as InferTeam,
|
|
7
|
-
import {
|
|
8
|
-
import "../../index-
|
|
9
|
-
import "../../index-
|
|
10
|
-
import "../../index-
|
|
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-B07NY0Qd.mjs";
|
|
7
|
+
import { t as anonymous } from "../../index-BeJkyaAb.mjs";
|
|
8
|
+
import "../../index-CTtQLxVk.mjs";
|
|
9
|
+
import "../../index-CBZz3bwR.mjs";
|
|
10
|
+
import "../../index-Cga0xJdy.mjs";
|
|
11
11
|
import { n as deviceAuthorization } from "../../index-BwH_uMEC.mjs";
|
|
12
|
-
import { n as emailOTP } from "../../index-
|
|
13
|
-
import {
|
|
14
|
-
import "../../index-
|
|
15
|
-
import {
|
|
16
|
-
import { n as magicLink } from "../../index-
|
|
17
|
-
import {
|
|
18
|
-
import "../../index-
|
|
19
|
-
import "../../index-
|
|
20
|
-
import {
|
|
21
|
-
import "../../index-
|
|
22
|
-
import {
|
|
23
|
-
import { n as siwe } from "../../index-
|
|
24
|
-
import {
|
|
25
|
-
import { n as username } from "../../index-
|
|
26
|
-
import * as
|
|
12
|
+
import { n as emailOTP } from "../../index-BFOwcUV-.mjs";
|
|
13
|
+
import { r as genericOAuth } from "../../index-Datsk5CT.mjs";
|
|
14
|
+
import "../../index-CaCX-TO7.mjs";
|
|
15
|
+
import { t as jwt } from "../../index-DGnTyGCm.mjs";
|
|
16
|
+
import { n as magicLink } from "../../index-C5K0Taww.mjs";
|
|
17
|
+
import { t as multiSession } from "../../index-CvTScBp4.mjs";
|
|
18
|
+
import "../../index-B1K7VDim.mjs";
|
|
19
|
+
import "../../index-gd10Jo_Z.mjs";
|
|
20
|
+
import { t as oneTimeToken } from "../../index-BfO-uaZu.mjs";
|
|
21
|
+
import "../../index-BSIZszGr.mjs";
|
|
22
|
+
import { t as phoneNumber } from "../../index-DC-Q1vHe.mjs";
|
|
23
|
+
import { n as siwe } from "../../index-B17C87x4.mjs";
|
|
24
|
+
import { n as twoFactorClient } from "../../index-CL8RWvJ3.mjs";
|
|
25
|
+
import { n as username } from "../../index-aVmHQcxt.mjs";
|
|
26
|
+
import * as _better_auth_core23 from "@better-auth/core";
|
|
27
27
|
import { BetterAuthOptions, BetterAuthPlugin, ClientFetchOption } from "@better-auth/core";
|
|
28
28
|
import { DBFieldAttribute } from "@better-auth/core/db";
|
|
29
29
|
import { JSONWebKeySet } from "jose";
|
|
30
|
-
import * as
|
|
31
|
-
import * as
|
|
30
|
+
import * as nanostores3 from "nanostores";
|
|
31
|
+
import * as _better_fetch_fetch84 from "@better-fetch/fetch";
|
|
32
32
|
import { Auth } from "better-auth";
|
|
33
33
|
|
|
34
34
|
//#region src/plugins/additional-fields/client.d.ts
|
|
@@ -265,7 +265,7 @@ declare const jwtClient: (options?: JwtClientOptions) => {
|
|
|
265
265
|
pathMethods: {
|
|
266
266
|
[x: string]: "GET";
|
|
267
267
|
};
|
|
268
|
-
getActions: ($fetch:
|
|
268
|
+
getActions: ($fetch: _better_fetch_fetch84.BetterFetch) => {
|
|
269
269
|
jwks: (fetchOptions?: any) => Promise<{
|
|
270
270
|
data: null;
|
|
271
271
|
error: {
|
|
@@ -415,10 +415,10 @@ interface GoogleOneTapActionOptions extends Omit<GoogleOneTapOptions, "clientId"
|
|
|
415
415
|
}
|
|
416
416
|
declare const oneTapClient: (options: GoogleOneTapOptions) => {
|
|
417
417
|
id: "one-tap";
|
|
418
|
-
getActions: ($fetch:
|
|
418
|
+
getActions: ($fetch: _better_fetch_fetch84.BetterFetch, _: _better_auth_core23.ClientStore) => {
|
|
419
419
|
oneTap: (opts?: GoogleOneTapActionOptions | undefined, fetchOptions?: ClientFetchOption | undefined) => Promise<void>;
|
|
420
420
|
};
|
|
421
|
-
getAtoms($fetch:
|
|
421
|
+
getAtoms($fetch: _better_fetch_fetch84.BetterFetch): {};
|
|
422
422
|
};
|
|
423
423
|
//#endregion
|
|
424
424
|
//#region src/plugins/one-time-token/client.d.ts
|
|
@@ -517,7 +517,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
517
517
|
} ? true : false;
|
|
518
518
|
};
|
|
519
519
|
}>;
|
|
520
|
-
getActions: ($fetch:
|
|
520
|
+
getActions: ($fetch: _better_fetch_fetch84.BetterFetch, _$store: _better_auth_core23.ClientStore, co: _better_auth_core23.BetterAuthClientOptions | undefined) => {
|
|
521
521
|
$Infer: {
|
|
522
522
|
ActiveOrganization: CO["teams"] extends {
|
|
523
523
|
enabled: true;
|
|
@@ -601,12 +601,12 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
601
601
|
}) => boolean;
|
|
602
602
|
};
|
|
603
603
|
};
|
|
604
|
-
getAtoms: ($fetch:
|
|
605
|
-
$listOrg:
|
|
606
|
-
$activeOrgSignal:
|
|
607
|
-
$activeMemberSignal:
|
|
608
|
-
$activeMemberRoleSignal:
|
|
609
|
-
activeOrganization:
|
|
604
|
+
getAtoms: ($fetch: _better_fetch_fetch84.BetterFetch) => {
|
|
605
|
+
$listOrg: nanostores3.PreinitializedWritableAtom<boolean> & object;
|
|
606
|
+
$activeOrgSignal: nanostores3.PreinitializedWritableAtom<boolean> & object;
|
|
607
|
+
$activeMemberSignal: nanostores3.PreinitializedWritableAtom<boolean> & object;
|
|
608
|
+
$activeMemberRoleSignal: nanostores3.PreinitializedWritableAtom<boolean> & object;
|
|
609
|
+
activeOrganization: nanostores3.PreinitializedWritableAtom<{
|
|
610
610
|
data: Prettify<({
|
|
611
611
|
id: string;
|
|
612
612
|
name: string;
|
|
@@ -618,14 +618,14 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
618
618
|
members: InferMember<CO, false>[];
|
|
619
619
|
invitations: InferInvitation<CO, false>[];
|
|
620
620
|
}> | null;
|
|
621
|
-
error: null |
|
|
621
|
+
error: null | _better_fetch_fetch84.BetterFetchError;
|
|
622
622
|
isPending: boolean;
|
|
623
623
|
isRefetching: boolean;
|
|
624
624
|
refetch: (queryParams?: {
|
|
625
625
|
query?: SessionQueryParams;
|
|
626
626
|
} | undefined) => Promise<void>;
|
|
627
627
|
}> & object;
|
|
628
|
-
listOrganizations:
|
|
628
|
+
listOrganizations: nanostores3.PreinitializedWritableAtom<{
|
|
629
629
|
data: ({
|
|
630
630
|
id: string;
|
|
631
631
|
name: string;
|
|
@@ -634,14 +634,14 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
634
634
|
logo?: string | null | undefined;
|
|
635
635
|
metadata?: any;
|
|
636
636
|
} & InferAdditionalFieldsFromPluginOptions<"organization", CO, false> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never)[] | null;
|
|
637
|
-
error: null |
|
|
637
|
+
error: null | _better_fetch_fetch84.BetterFetchError;
|
|
638
638
|
isPending: boolean;
|
|
639
639
|
isRefetching: boolean;
|
|
640
640
|
refetch: (queryParams?: {
|
|
641
641
|
query?: SessionQueryParams;
|
|
642
642
|
} | undefined) => Promise<void>;
|
|
643
643
|
}> & object;
|
|
644
|
-
activeMember:
|
|
644
|
+
activeMember: nanostores3.PreinitializedWritableAtom<{
|
|
645
645
|
data: {
|
|
646
646
|
id: string;
|
|
647
647
|
organizationId: string;
|
|
@@ -649,18 +649,18 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
649
649
|
role: string;
|
|
650
650
|
createdAt: Date;
|
|
651
651
|
} | null;
|
|
652
|
-
error: null |
|
|
652
|
+
error: null | _better_fetch_fetch84.BetterFetchError;
|
|
653
653
|
isPending: boolean;
|
|
654
654
|
isRefetching: boolean;
|
|
655
655
|
refetch: (queryParams?: {
|
|
656
656
|
query?: SessionQueryParams;
|
|
657
657
|
} | undefined) => Promise<void>;
|
|
658
658
|
}> & object;
|
|
659
|
-
activeMemberRole:
|
|
659
|
+
activeMemberRole: nanostores3.PreinitializedWritableAtom<{
|
|
660
660
|
data: {
|
|
661
661
|
role: string;
|
|
662
662
|
} | null;
|
|
663
|
-
error: null |
|
|
663
|
+
error: null | _better_fetch_fetch84.BetterFetchError;
|
|
664
664
|
isPending: boolean;
|
|
665
665
|
isRefetching: boolean;
|
|
666
666
|
refetch: (queryParams?: {
|
|
@@ -821,4 +821,4 @@ declare const InferServerPlugin: <AuthOrOption extends BetterAuthOptions | {
|
|
|
821
821
|
} ? P : never : never;
|
|
822
822
|
};
|
|
823
823
|
//#endregion
|
|
824
|
-
export {
|
|
824
|
+
export { ApiKeyClientPlugin, Awaitable, DeepPartial, Expand, GoogleOneTapActionOptions, GoogleOneTapOptions, HasRequiredKeys, InferServerPlugin, LastLoginMethodClientConfig, LiteralNumber, LiteralString, LiteralUnion, OidcClientPlugin, OmitId, PreserveJSDoc, Prettify, PrettifyDeep, Primitive, RequiredKeysOf, StripEmptyObjects, UnionToIntersection, WithoutEmpty, adminClient, anonymousClient, apiKeyClient, clientSideHasPermission, customSessionClient, deviceAuthorizationClient, emailOTPClient, genericOAuthClient, inferAdditionalFields, inferOrgAdditionalFields, jwtClient, lastLoginMethodClient, magicLinkClient, multiSessionClient, oidcClient, oneTapClient, oneTimeTokenClient, organizationClient, phoneNumberClient, siweClient, twoFactorClient, usernameClient };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bn as SessionQueryParams, fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-
|
|
1
|
+
import { bn as SessionQueryParams, fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-B5cYsEzG.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
4
|
import "../../index-CNCxG_Zo.mjs";
|
|
@@ -7,7 +7,7 @@ import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/co
|
|
|
7
7
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
8
|
import * as nanostores0 from "nanostores";
|
|
9
9
|
import { Store, StoreValue } from "nanostores";
|
|
10
|
-
import * as
|
|
10
|
+
import * as _better_fetch_fetch16 from "@better-fetch/fetch";
|
|
11
11
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
12
12
|
import { DependencyList } from "react";
|
|
13
13
|
export * from "nanostores";
|
|
@@ -97,27 +97,27 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
97
97
|
error: null;
|
|
98
98
|
} ? S : Res : never>;
|
|
99
99
|
};
|
|
100
|
-
$fetch:
|
|
101
|
-
plugins: (
|
|
100
|
+
$fetch: _better_fetch_fetch16.BetterFetch<{
|
|
101
|
+
plugins: (_better_fetch_fetch16.BetterFetchPlugin | {
|
|
102
102
|
id: string;
|
|
103
103
|
name: string;
|
|
104
104
|
hooks: {
|
|
105
|
-
onSuccess(context:
|
|
105
|
+
onSuccess(context: _better_fetch_fetch16.SuccessContext<any>): void;
|
|
106
106
|
};
|
|
107
107
|
} | {
|
|
108
108
|
id: string;
|
|
109
109
|
name: string;
|
|
110
110
|
hooks: {
|
|
111
|
-
onRequest<T extends Record<string, any>>(context:
|
|
111
|
+
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch16.RequestContext<T>): void;
|
|
112
112
|
};
|
|
113
113
|
} | {
|
|
114
114
|
id: string;
|
|
115
115
|
name: string;
|
|
116
116
|
hooks: {
|
|
117
|
-
onSuccess: ((context:
|
|
118
|
-
onError: ((context:
|
|
119
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
120
|
-
onResponse: ((context:
|
|
117
|
+
onSuccess: ((context: _better_fetch_fetch16.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
118
|
+
onError: ((context: _better_fetch_fetch16.ErrorContext) => Promise<void> | void) | undefined;
|
|
119
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch16.RequestContext<T>) => Promise<_better_fetch_fetch16.RequestContext | void> | _better_fetch_fetch16.RequestContext | void) | undefined;
|
|
120
|
+
onResponse: ((context: _better_fetch_fetch16.ResponseContext) => Promise<Response | void | _better_fetch_fetch16.ResponseContext> | Response | _better_fetch_fetch16.ResponseContext | void) | undefined;
|
|
121
121
|
};
|
|
122
122
|
})[];
|
|
123
123
|
cache?: RequestCache | undefined;
|
|
@@ -137,12 +137,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
137
137
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
138
138
|
signal?: (AbortSignal | null) | undefined;
|
|
139
139
|
window?: null | undefined;
|
|
140
|
-
onRetry?: ((response:
|
|
140
|
+
onRetry?: ((response: _better_fetch_fetch16.ResponseContext) => Promise<void> | void) | undefined;
|
|
141
141
|
hookOptions?: {
|
|
142
142
|
cloneResponse?: boolean;
|
|
143
143
|
} | undefined;
|
|
144
144
|
timeout?: number | undefined;
|
|
145
|
-
customFetchImpl:
|
|
145
|
+
customFetchImpl: _better_fetch_fetch16.FetchEsque;
|
|
146
146
|
baseURL: string;
|
|
147
147
|
throw?: boolean | undefined;
|
|
148
148
|
auth?: ({
|
|
@@ -162,10 +162,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
162
162
|
params?: any;
|
|
163
163
|
duplex?: "full" | "half" | undefined;
|
|
164
164
|
jsonParser: (text: string) => Promise<any> | any;
|
|
165
|
-
retry?:
|
|
165
|
+
retry?: _better_fetch_fetch16.RetryOptions | undefined;
|
|
166
166
|
retryAttempt?: number | undefined;
|
|
167
|
-
output?: (
|
|
168
|
-
errorSchema?:
|
|
167
|
+
output?: (_better_fetch_fetch16.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
168
|
+
errorSchema?: _better_fetch_fetch16.StandardSchemaV1 | undefined;
|
|
169
169
|
disableValidation?: boolean | undefined;
|
|
170
170
|
disableSignal?: boolean | undefined;
|
|
171
171
|
}, unknown, unknown, {}>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-
|
|
1
|
+
import { fn as InferActions, hn as InferErrorCodes, mn as InferClientAPI, yn as IsSignal } from "../../index-B5cYsEzG.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
4
|
import "../../index-CNCxG_Zo.mjs";
|
|
5
5
|
import "../../plugins-Brc8BsoZ.mjs";
|
|
6
6
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
7
7
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
|
-
import * as
|
|
8
|
+
import * as _better_fetch_fetch50 from "@better-fetch/fetch";
|
|
9
9
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
10
10
|
import { Accessor } from "solid-js";
|
|
11
11
|
export * from "nanostores";
|
|
@@ -49,27 +49,27 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
49
49
|
error: null;
|
|
50
50
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
51
51
|
};
|
|
52
|
-
$fetch:
|
|
53
|
-
plugins: (
|
|
52
|
+
$fetch: _better_fetch_fetch50.BetterFetch<{
|
|
53
|
+
plugins: (_better_fetch_fetch50.BetterFetchPlugin | {
|
|
54
54
|
id: string;
|
|
55
55
|
name: string;
|
|
56
56
|
hooks: {
|
|
57
|
-
onSuccess(context:
|
|
57
|
+
onSuccess(context: _better_fetch_fetch50.SuccessContext<any>): void;
|
|
58
58
|
};
|
|
59
59
|
} | {
|
|
60
60
|
id: string;
|
|
61
61
|
name: string;
|
|
62
62
|
hooks: {
|
|
63
|
-
onRequest<T extends Record<string, any>>(context:
|
|
63
|
+
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch50.RequestContext<T>): void;
|
|
64
64
|
};
|
|
65
65
|
} | {
|
|
66
66
|
id: string;
|
|
67
67
|
name: string;
|
|
68
68
|
hooks: {
|
|
69
|
-
onSuccess: ((context:
|
|
70
|
-
onError: ((context:
|
|
71
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
72
|
-
onResponse: ((context:
|
|
69
|
+
onSuccess: ((context: _better_fetch_fetch50.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
70
|
+
onError: ((context: _better_fetch_fetch50.ErrorContext) => Promise<void> | void) | undefined;
|
|
71
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch50.RequestContext<T>) => Promise<_better_fetch_fetch50.RequestContext | void> | _better_fetch_fetch50.RequestContext | void) | undefined;
|
|
72
|
+
onResponse: ((context: _better_fetch_fetch50.ResponseContext) => Promise<Response | void | _better_fetch_fetch50.ResponseContext> | Response | _better_fetch_fetch50.ResponseContext | void) | undefined;
|
|
73
73
|
};
|
|
74
74
|
})[];
|
|
75
75
|
cache?: RequestCache | undefined;
|
|
@@ -89,12 +89,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
89
89
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
90
90
|
signal?: (AbortSignal | null) | undefined;
|
|
91
91
|
window?: null | undefined;
|
|
92
|
-
onRetry?: ((response:
|
|
92
|
+
onRetry?: ((response: _better_fetch_fetch50.ResponseContext) => Promise<void> | void) | undefined;
|
|
93
93
|
hookOptions?: {
|
|
94
94
|
cloneResponse?: boolean;
|
|
95
95
|
} | undefined;
|
|
96
96
|
timeout?: number | undefined;
|
|
97
|
-
customFetchImpl:
|
|
97
|
+
customFetchImpl: _better_fetch_fetch50.FetchEsque;
|
|
98
98
|
baseURL: string;
|
|
99
99
|
throw?: boolean | undefined;
|
|
100
100
|
auth?: ({
|
|
@@ -114,10 +114,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
114
114
|
params?: any;
|
|
115
115
|
duplex?: "full" | "half" | undefined;
|
|
116
116
|
jsonParser: (text: string) => Promise<any> | any;
|
|
117
|
-
retry?:
|
|
117
|
+
retry?: _better_fetch_fetch50.RetryOptions | undefined;
|
|
118
118
|
retryAttempt?: number | undefined;
|
|
119
|
-
output?: (
|
|
120
|
-
errorSchema?:
|
|
119
|
+
output?: (_better_fetch_fetch50.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
120
|
+
errorSchema?: _better_fetch_fetch50.StandardSchemaV1 | undefined;
|
|
121
121
|
disableValidation?: boolean | undefined;
|
|
122
122
|
disableSignal?: boolean | undefined;
|
|
123
123
|
}, unknown, unknown, {}>;
|