better-auth 1.6.26 → 1.6.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.mts +6 -1
- package/dist/api/dispatch.d.mts +1 -0
- package/dist/api/index.d.mts +508 -505
- package/dist/api/middlewares/authorization.d.mts +10 -14
- package/dist/api/middlewares/authorization.mjs +1 -2
- package/dist/api/middlewares/index.d.mts +1 -2
- package/dist/api/middlewares/origin-check.d.mts +5 -3
- package/dist/api/routes/account.d.mts +16 -13
- package/dist/api/routes/callback.d.mts +3 -1
- package/dist/api/routes/email-verification.d.mts +8 -4
- package/dist/api/routes/error.d.mts +3 -1
- package/dist/api/routes/index.d.mts +1 -2
- package/dist/api/routes/ok.d.mts +3 -1
- package/dist/api/routes/password.d.mts +10 -8
- package/dist/api/routes/session.d.mts +32 -30
- package/dist/api/routes/session.mjs +2 -3
- package/dist/api/routes/sign-in.d.mts +5 -3
- package/dist/api/routes/sign-out.d.mts +3 -1
- package/dist/api/routes/sign-up.d.mts +4 -3
- package/dist/api/routes/update-session.d.mts +5 -4
- package/dist/api/routes/update-user.d.mts +19 -18
- package/dist/auth/full.d.mts +1 -1
- package/dist/auth/minimal.d.mts +1 -1
- package/dist/client/config.d.mts +14 -12
- package/dist/client/config.mjs +2 -2
- package/dist/client/equality.d.mts +1 -0
- package/dist/client/index.d.mts +5 -6
- package/dist/client/lynx/index.d.mts +5 -4
- package/dist/client/lynx/lynx-store.d.mts +2 -1
- package/dist/client/parser.d.mts +3 -7
- package/dist/client/path-to-object.d.mts +4 -3
- package/dist/client/plugins/index.d.mts +1 -1
- package/dist/client/plugins/infer-plugin.d.mts +1 -0
- package/dist/client/query.d.mts +1 -0
- package/dist/client/react/index.d.mts +5 -4
- package/dist/client/react/react-store.d.mts +2 -1
- package/dist/client/session-atom.mjs +59 -46
- package/dist/client/session-refresh.d.mts +1 -0
- package/dist/client/solid/index.d.mts +5 -4
- package/dist/client/svelte/index.d.mts +5 -4
- package/dist/client/types.d.mts +2 -2
- package/dist/client/vanilla.d.mts +2 -1
- package/dist/client/vue/index.d.mts +5 -4
- package/dist/context/create-context.mjs +3 -3
- package/dist/context/helpers.mjs +2 -2
- package/dist/cookies/index.d.mts +7 -6
- package/dist/cookies/session-store.d.mts +0 -1
- package/dist/cookies/session-store.mjs +1 -2
- package/dist/crypto/index.d.mts +9 -2
- package/dist/crypto/jwt.d.mts +1 -0
- package/dist/crypto/password.d.mts +5 -1
- package/dist/db/adapter-base.d.mts +1 -0
- package/dist/db/adapter-kysely.d.mts +1 -0
- package/dist/db/field-converter.d.mts +1 -0
- package/dist/db/field.d.mts +10 -9
- package/dist/db/get-migration.d.mts +1 -0
- package/dist/db/get-schema.d.mts +1 -0
- package/dist/db/internal-adapter.d.mts +1 -0
- package/dist/db/internal-adapter.mjs +1 -2
- package/dist/db/revoke-unproven-account-access.d.mts +1 -0
- package/dist/db/schema.d.mts +2 -2
- package/dist/db/to-zod.d.mts +7 -3
- package/dist/db/with-hooks.d.mts +1 -0
- package/dist/index.d.mts +3 -4
- package/dist/integrations/next-js.d.mts +7 -4
- package/dist/integrations/node.d.mts +3 -2
- package/dist/integrations/svelte-kit.d.mts +9 -2
- package/dist/integrations/tanstack-start-solid.d.mts +5 -2
- package/dist/integrations/tanstack-start.d.mts +5 -2
- package/dist/oauth2/link-account.d.mts +1 -1
- package/dist/oauth2/state.d.mts +1 -0
- package/dist/oauth2/utils.d.mts +1 -0
- package/dist/package.mjs +1 -1
- package/dist/plugins/access/access.d.mts +1 -0
- package/dist/plugins/access/types.d.mts +5 -4
- package/dist/plugins/additional-fields/client.d.mts +1 -0
- package/dist/plugins/admin/access/statement.d.mts +0 -1
- package/dist/plugins/admin/admin.d.mts +137 -132
- package/dist/plugins/admin/client.d.mts +30 -30
- package/dist/plugins/admin/client.mjs +1 -1
- package/dist/plugins/admin/error-codes.d.mts +25 -23
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/admin/schema.d.mts +1 -1
- package/dist/plugins/admin/types.d.mts +2 -3
- package/dist/plugins/anonymous/client.d.mts +11 -9
- package/dist/plugins/anonymous/client.mjs +1 -1
- package/dist/plugins/anonymous/error-codes.d.mts +10 -8
- package/dist/plugins/anonymous/index.d.mts +19 -15
- package/dist/plugins/anonymous/types.d.mts +1 -1
- package/dist/plugins/bearer/index.d.mts +8 -5
- package/dist/plugins/captcha/index.d.mts +8 -5
- package/dist/plugins/captcha/types.d.mts +1 -0
- package/dist/plugins/custom-session/client.d.mts +1 -0
- package/dist/plugins/custom-session/index.d.mts +12 -7
- package/dist/plugins/device-authorization/client.d.mts +1 -0
- package/dist/plugins/device-authorization/index.d.mts +22 -19
- package/dist/plugins/email-otp/client.d.mts +6 -4
- package/dist/plugins/email-otp/client.mjs +1 -1
- package/dist/plugins/email-otp/error-codes.d.mts +5 -3
- package/dist/plugins/email-otp/index.d.mts +76 -69
- package/dist/plugins/email-otp/types.d.mts +1 -0
- package/dist/plugins/generic-oauth/client.d.mts +11 -10
- package/dist/plugins/generic-oauth/client.mjs +1 -1
- package/dist/plugins/generic-oauth/error-codes.d.mts +10 -8
- package/dist/plugins/generic-oauth/index.d.mts +45 -41
- package/dist/plugins/generic-oauth/providers/auth0.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/gumroad.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/hubspot.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/index.d.mts +1 -2
- package/dist/plugins/generic-oauth/providers/keycloak.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/line.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/okta.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/patreon.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/slack.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/yandex.d.mts +1 -0
- package/dist/plugins/generic-oauth/types.d.mts +2 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +6 -3
- package/dist/plugins/index.d.mts +1 -4
- package/dist/plugins/jwt/client.d.mts +2 -1
- package/dist/plugins/jwt/index.d.mts +12 -9
- package/dist/plugins/jwt/sign.d.mts +2 -2
- package/dist/plugins/jwt/types.d.mts +1 -1
- package/dist/plugins/jwt/utils.d.mts +4 -2
- package/dist/plugins/jwt/verify.d.mts +1 -0
- package/dist/plugins/last-login-method/index.d.mts +6 -3
- package/dist/plugins/magic-link/client.d.mts +1 -0
- package/dist/plugins/magic-link/index.d.mts +6 -4
- package/dist/plugins/mcp/client/adapters.d.mts +1 -0
- package/dist/plugins/mcp/client/index.mjs +2 -4
- package/dist/plugins/mcp/index.d.mts +12 -11
- package/dist/plugins/multi-session/client.d.mts +4 -2
- package/dist/plugins/multi-session/client.mjs +1 -1
- package/dist/plugins/multi-session/error-codes.d.mts +3 -1
- package/dist/plugins/multi-session/index.d.mts +12 -8
- package/dist/plugins/oauth-popup/client.d.mts +12 -6
- package/dist/plugins/oauth-popup/client.mjs +3 -5
- package/dist/plugins/oauth-popup/error-codes.d.mts +6 -4
- package/dist/plugins/oauth-popup/index.d.mts +12 -8
- package/dist/plugins/oauth-popup/index.mjs +1 -1
- package/dist/plugins/oauth-popup/types.d.mts +2 -1
- package/dist/plugins/oauth-proxy/index.d.mts +9 -6
- package/dist/plugins/oauth-proxy/index.mjs +2 -2
- package/dist/plugins/oidc-provider/client.d.mts +2 -1
- package/dist/plugins/oidc-provider/index.d.mts +20 -18
- package/dist/plugins/oidc-provider/schema.d.mts +1 -0
- package/dist/plugins/oidc-provider/types.d.mts +1 -1
- package/dist/plugins/one-tap/client.d.mts +3 -1
- package/dist/plugins/one-tap/index.d.mts +3 -1
- package/dist/plugins/one-time-token/client.d.mts +2 -1
- package/dist/plugins/one-time-token/index.d.mts +7 -6
- package/dist/plugins/open-api/generator.d.mts +1 -0
- package/dist/plugins/open-api/generator.mjs +5 -5
- package/dist/plugins/open-api/index.d.mts +5 -3
- package/dist/plugins/organization/access/statement.d.mts +0 -1
- package/dist/plugins/organization/adapter.d.mts +82 -56
- package/dist/plugins/organization/client.d.mts +103 -104
- package/dist/plugins/organization/client.mjs +4 -7
- package/dist/plugins/organization/error-codes.d.mts +61 -59
- package/dist/plugins/organization/has-permission.d.mts +1 -0
- package/dist/plugins/organization/has-permission.mjs +1 -1
- package/dist/plugins/organization/index.d.mts +1 -1
- package/dist/plugins/organization/organization.d.mts +33 -9
- package/dist/plugins/organization/organization.mjs +1 -1
- package/dist/plugins/organization/permission.d.mts +2 -2
- package/dist/plugins/organization/routes/crud-access-control.d.mts +147 -27
- package/dist/plugins/organization/routes/crud-invites.d.mts +186 -65
- package/dist/plugins/organization/routes/crud-invites.mjs +1 -1
- package/dist/plugins/organization/routes/crud-members.d.mts +178 -56
- package/dist/plugins/organization/routes/crud-members.mjs +1 -1
- package/dist/plugins/organization/routes/crud-org.d.mts +130 -57
- package/dist/plugins/organization/routes/crud-team.d.mts +235 -66
- package/dist/plugins/organization/schema.d.mts +4 -4
- package/dist/plugins/organization/schema.mjs +1 -1
- package/dist/plugins/organization/types.d.mts +14 -14
- package/dist/plugins/phone-number/client.d.mts +15 -13
- package/dist/plugins/phone-number/client.mjs +1 -1
- package/dist/plugins/phone-number/error-codes.d.mts +14 -12
- package/dist/plugins/phone-number/index.d.mts +47 -41
- package/dist/plugins/phone-number/types.d.mts +1 -1
- package/dist/plugins/siwe/client.d.mts +1 -0
- package/dist/plugins/siwe/index.d.mts +5 -4
- package/dist/plugins/test-utils/index.d.mts +4 -2
- package/dist/plugins/test-utils/types.d.mts +0 -1
- package/dist/plugins/two-factor/backup-codes/index.d.mts +7 -5
- package/dist/plugins/two-factor/backup-codes/index.mjs +1 -1
- package/dist/plugins/two-factor/client.d.mts +15 -12
- package/dist/plugins/two-factor/client.mjs +1 -1
- package/dist/plugins/two-factor/error-code.d.mts +12 -10
- package/dist/plugins/two-factor/index.d.mts +36 -32
- package/dist/plugins/two-factor/otp/index.d.mts +4 -2
- package/dist/plugins/two-factor/totp/index.d.mts +7 -5
- package/dist/plugins/two-factor/types.d.mts +1 -1
- package/dist/plugins/username/client.d.mts +11 -9
- package/dist/plugins/username/client.mjs +1 -1
- package/dist/plugins/username/error-codes.d.mts +10 -8
- package/dist/plugins/username/index.d.mts +22 -17
- package/dist/plugins/username/schema.d.mts +5 -3
- package/dist/state.d.mts +1 -0
- package/dist/test-utils/test-instance.d.mts +3 -5
- package/dist/types/adapter.d.mts +1 -1
- package/dist/types/api.d.mts +2 -1
- package/dist/types/auth.d.mts +1 -0
- package/dist/types/helper.d.mts +5 -5
- package/dist/types/index.d.mts +2 -2
- package/dist/types/models.d.mts +1 -0
- package/dist/types/plugins.d.mts +3 -2
- package/dist/utils/index.d.mts +1 -2
- package/dist/utils/url.d.mts +1 -0
- package/package.json +12 -11
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AdditionalSessionFieldsInput } from "../../types/models.mjs";
|
|
2
|
-
import "../../types/index.mjs";
|
|
3
2
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
3
|
+
import * as _$better_call0 from "better-call";
|
|
4
4
|
import * as z from "zod";
|
|
5
|
+
|
|
5
6
|
//#region src/api/routes/update-session.d.ts
|
|
6
|
-
declare const updateSession: <O extends BetterAuthOptions>() =>
|
|
7
|
+
declare const updateSession: <O extends BetterAuthOptions>() => _$better_call0.StrictEndpoint<"/update-session", {
|
|
7
8
|
method: "POST";
|
|
8
9
|
operationId: string;
|
|
9
10
|
body: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
10
|
-
use: (
|
|
11
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
11
12
|
session: {
|
|
12
13
|
session: Record<string, any> & {
|
|
13
14
|
id: string;
|
|
@@ -29,7 +30,7 @@ declare const updateSession: <O extends BetterAuthOptions>() => import("better-c
|
|
|
29
30
|
image?: string | null | undefined;
|
|
30
31
|
};
|
|
31
32
|
};
|
|
32
|
-
}
|
|
33
|
+
}>>[];
|
|
33
34
|
metadata: {
|
|
34
35
|
$Infer: {
|
|
35
36
|
body: Partial<AdditionalSessionFieldsInput<O>>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AdditionalUserFieldsInput } from "../../types/models.mjs";
|
|
2
|
-
import "../../types/index.mjs";
|
|
3
2
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
3
|
+
import * as _$better_call0 from "better-call";
|
|
4
4
|
import * as z from "zod";
|
|
5
|
+
|
|
5
6
|
//#region src/api/routes/update-user.d.ts
|
|
6
|
-
declare const updateUser: <O extends BetterAuthOptions>() =>
|
|
7
|
+
declare const updateUser: <O extends BetterAuthOptions>() => _$better_call0.StrictEndpoint<"/update-user", {
|
|
7
8
|
method: "POST";
|
|
8
9
|
operationId: string;
|
|
9
10
|
body: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
10
|
-
use: (
|
|
11
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
11
12
|
session: {
|
|
12
13
|
session: Record<string, any> & {
|
|
13
14
|
id: string;
|
|
@@ -29,7 +30,7 @@ declare const updateUser: <O extends BetterAuthOptions>() => import("better-call
|
|
|
29
30
|
image?: string | null | undefined;
|
|
30
31
|
};
|
|
31
32
|
};
|
|
32
|
-
}
|
|
33
|
+
}>>[];
|
|
33
34
|
metadata: {
|
|
34
35
|
$Infer: {
|
|
35
36
|
body: Partial<AdditionalUserFieldsInput<O>> & {
|
|
@@ -83,7 +84,7 @@ declare const updateUser: <O extends BetterAuthOptions>() => import("better-call
|
|
|
83
84
|
}, {
|
|
84
85
|
status: boolean;
|
|
85
86
|
}>;
|
|
86
|
-
declare const changePassword:
|
|
87
|
+
declare const changePassword: _$better_call0.StrictEndpoint<"/change-password", {
|
|
87
88
|
method: "POST";
|
|
88
89
|
operationId: string;
|
|
89
90
|
body: z.ZodObject<{
|
|
@@ -91,7 +92,7 @@ declare const changePassword: import("better-call").StrictEndpoint<"/change-pass
|
|
|
91
92
|
currentPassword: z.ZodString;
|
|
92
93
|
revokeOtherSessions: z.ZodOptional<z.ZodBoolean>;
|
|
93
94
|
}, z.core.$strip>;
|
|
94
|
-
use: (
|
|
95
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
95
96
|
session: {
|
|
96
97
|
session: Record<string, any> & {
|
|
97
98
|
id: string;
|
|
@@ -113,7 +114,7 @@ declare const changePassword: import("better-call").StrictEndpoint<"/change-pass
|
|
|
113
114
|
image?: string | null | undefined;
|
|
114
115
|
};
|
|
115
116
|
};
|
|
116
|
-
}
|
|
117
|
+
}>>[];
|
|
117
118
|
metadata: {
|
|
118
119
|
openapi: {
|
|
119
120
|
operationId: string;
|
|
@@ -199,12 +200,12 @@ declare const changePassword: import("better-call").StrictEndpoint<"/change-pass
|
|
|
199
200
|
image?: string | null | undefined;
|
|
200
201
|
};
|
|
201
202
|
}>;
|
|
202
|
-
declare const setPassword:
|
|
203
|
+
declare const setPassword: _$better_call0.StrictEndpoint<string, {
|
|
203
204
|
method: "POST";
|
|
204
205
|
body: z.ZodObject<{
|
|
205
206
|
newPassword: z.ZodString;
|
|
206
207
|
}, z.core.$strip>;
|
|
207
|
-
use: (
|
|
208
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
208
209
|
session: {
|
|
209
210
|
session: Record<string, any> & {
|
|
210
211
|
id: string;
|
|
@@ -226,13 +227,13 @@ declare const setPassword: import("better-call").StrictEndpoint<string, {
|
|
|
226
227
|
image?: string | null | undefined;
|
|
227
228
|
};
|
|
228
229
|
};
|
|
229
|
-
}
|
|
230
|
+
}>>[];
|
|
230
231
|
}, {
|
|
231
232
|
status: boolean;
|
|
232
233
|
}>;
|
|
233
|
-
declare const deleteUser:
|
|
234
|
+
declare const deleteUser: _$better_call0.StrictEndpoint<"/delete-user", {
|
|
234
235
|
method: "POST";
|
|
235
|
-
use: (
|
|
236
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
236
237
|
session: {
|
|
237
238
|
session: Record<string, any> & {
|
|
238
239
|
id: string;
|
|
@@ -254,7 +255,7 @@ declare const deleteUser: import("better-call").StrictEndpoint<"/delete-user", {
|
|
|
254
255
|
image?: string | null | undefined;
|
|
255
256
|
};
|
|
256
257
|
};
|
|
257
|
-
}
|
|
258
|
+
}>>[];
|
|
258
259
|
body: z.ZodObject<{
|
|
259
260
|
callbackURL: z.ZodOptional<z.ZodString>;
|
|
260
261
|
password: z.ZodOptional<z.ZodString>;
|
|
@@ -317,13 +318,13 @@ declare const deleteUser: import("better-call").StrictEndpoint<"/delete-user", {
|
|
|
317
318
|
success: boolean;
|
|
318
319
|
message: string;
|
|
319
320
|
}>;
|
|
320
|
-
declare const deleteUserCallback:
|
|
321
|
+
declare const deleteUserCallback: _$better_call0.StrictEndpoint<"/delete-user/callback", {
|
|
321
322
|
method: "GET";
|
|
322
323
|
query: z.ZodObject<{
|
|
323
324
|
token: z.ZodString;
|
|
324
325
|
callbackURL: z.ZodOptional<z.ZodString>;
|
|
325
326
|
}, z.core.$strip>;
|
|
326
|
-
use: (
|
|
327
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
|
|
327
328
|
metadata: {
|
|
328
329
|
openapi: {
|
|
329
330
|
description: string;
|
|
@@ -357,13 +358,13 @@ declare const deleteUserCallback: import("better-call").StrictEndpoint<"/delete-
|
|
|
357
358
|
success: boolean;
|
|
358
359
|
message: string;
|
|
359
360
|
}>;
|
|
360
|
-
declare const changeEmail:
|
|
361
|
+
declare const changeEmail: _$better_call0.StrictEndpoint<"/change-email", {
|
|
361
362
|
method: "POST";
|
|
362
363
|
body: z.ZodObject<{
|
|
363
364
|
newEmail: z.ZodEmail;
|
|
364
365
|
callbackURL: z.ZodOptional<z.ZodString>;
|
|
365
366
|
}, z.core.$strip>;
|
|
366
|
-
use: (
|
|
367
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
367
368
|
session: {
|
|
368
369
|
session: Record<string, any> & {
|
|
369
370
|
id: string;
|
|
@@ -385,7 +386,7 @@ declare const changeEmail: import("better-call").StrictEndpoint<"/change-email",
|
|
|
385
386
|
image?: string | null | undefined;
|
|
386
387
|
};
|
|
387
388
|
};
|
|
388
|
-
}
|
|
389
|
+
}>>[];
|
|
389
390
|
metadata: {
|
|
390
391
|
openapi: {
|
|
391
392
|
operationId: string;
|
package/dist/auth/full.d.mts
CHANGED
package/dist/auth/minimal.d.mts
CHANGED
package/dist/client/config.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BetterAuthClientOptions, ClientAtomListener } from "@better-auth/core";
|
|
2
2
|
import { WritableAtom } from "nanostores";
|
|
3
|
+
import * as _$_better_fetch_fetch0 from "@better-fetch/fetch";
|
|
4
|
+
|
|
3
5
|
//#region src/client/config.d.ts
|
|
4
6
|
declare const getClientConfig: (options?: BetterAuthClientOptions | undefined, loadEnv?: boolean | undefined) => {
|
|
5
7
|
readonly baseURL: string;
|
|
@@ -7,21 +9,21 @@ declare const getClientConfig: (options?: BetterAuthClientOptions | undefined, l
|
|
|
7
9
|
pluginsAtoms: Record<string, WritableAtom<any>>;
|
|
8
10
|
pluginPathMethods: Record<string, "GET" | "POST">;
|
|
9
11
|
atomListeners: ClientAtomListener[];
|
|
10
|
-
$fetch:
|
|
11
|
-
plugins: (
|
|
12
|
+
$fetch: _$_better_fetch_fetch0.BetterFetch<{
|
|
13
|
+
plugins: (_$_better_fetch_fetch0.BetterFetchPlugin<Record<string, any>> | {
|
|
12
14
|
id: string;
|
|
13
15
|
name: string;
|
|
14
16
|
hooks: {
|
|
15
|
-
onSuccess(context:
|
|
17
|
+
onSuccess(context: _$_better_fetch_fetch0.SuccessContext<any>): void;
|
|
16
18
|
};
|
|
17
19
|
} | {
|
|
18
20
|
id: string;
|
|
19
21
|
name: string;
|
|
20
22
|
hooks: {
|
|
21
|
-
onSuccess: ((context:
|
|
22
|
-
onError: ((context:
|
|
23
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
24
|
-
onResponse: ((context:
|
|
23
|
+
onSuccess: ((context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
24
|
+
onError: ((context: _$_better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
|
|
25
|
+
onRequest: (<T extends Record<string, any>>(context: _$_better_fetch_fetch0.RequestContext<T>) => Promise<_$_better_fetch_fetch0.RequestContext | void> | _$_better_fetch_fetch0.RequestContext | void) | undefined;
|
|
26
|
+
onResponse: ((context: _$_better_fetch_fetch0.ResponseContext) => Promise<Response | void | _$_better_fetch_fetch0.ResponseContext> | Response | _$_better_fetch_fetch0.ResponseContext | void) | undefined;
|
|
25
27
|
};
|
|
26
28
|
})[];
|
|
27
29
|
priority?: RequestPriority | undefined;
|
|
@@ -36,12 +38,12 @@ declare const getClientConfig: (options?: BetterAuthClientOptions | undefined, l
|
|
|
36
38
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
37
39
|
signal?: (AbortSignal | null) | undefined;
|
|
38
40
|
window?: null | undefined;
|
|
39
|
-
onRetry?: ((response:
|
|
41
|
+
onRetry?: ((response: _$_better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
|
|
40
42
|
hookOptions?: {
|
|
41
43
|
cloneResponse?: boolean;
|
|
42
44
|
} | undefined;
|
|
43
45
|
timeout?: number | undefined;
|
|
44
|
-
customFetchImpl:
|
|
46
|
+
customFetchImpl: _$_better_fetch_fetch0.FetchEsque;
|
|
45
47
|
baseURL: string;
|
|
46
48
|
throw?: boolean | undefined;
|
|
47
49
|
auth?: ({
|
|
@@ -67,10 +69,10 @@ declare const getClientConfig: (options?: BetterAuthClientOptions | undefined, l
|
|
|
67
69
|
params?: any;
|
|
68
70
|
duplex?: "full" | "half" | undefined;
|
|
69
71
|
jsonParser: (text: string) => Promise<any> | any;
|
|
70
|
-
retry?:
|
|
72
|
+
retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
|
|
71
73
|
retryAttempt?: number | undefined;
|
|
72
|
-
output?: (
|
|
73
|
-
errorSchema?:
|
|
74
|
+
output?: (_$_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
75
|
+
errorSchema?: _$_better_fetch_fetch0.StandardSchemaV1 | undefined;
|
|
74
76
|
disableValidation?: boolean | undefined;
|
|
75
77
|
disableSignal?: boolean | undefined;
|
|
76
78
|
}, unknown, unknown, {}>;
|
package/dist/client/config.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { getBaseURL } from "../utils/url.mjs";
|
|
|
2
2
|
import { parseJSON } from "./parser.mjs";
|
|
3
3
|
import { redirectPlugin } from "./fetch-plugins.mjs";
|
|
4
4
|
import { getSessionAtom } from "./session-atom.mjs";
|
|
5
|
-
import { defu
|
|
5
|
+
import { defu } from "defu";
|
|
6
6
|
import { createFetch } from "@better-fetch/fetch";
|
|
7
7
|
//#region src/client/config.ts
|
|
8
8
|
const resolvePublicAuthUrl = (basePath) => {
|
|
@@ -88,7 +88,7 @@ const getClientConfig = (options, loadEnv) => {
|
|
|
88
88
|
},
|
|
89
89
|
atoms: pluginsAtoms
|
|
90
90
|
};
|
|
91
|
-
for (const plugin of plugins) if (plugin.getActions) pluginsActions = defu
|
|
91
|
+
for (const plugin of plugins) if (plugin.getActions) pluginsActions = defu(plugin.getActions?.($fetch, $store, options) ?? {}, pluginsActions);
|
|
92
92
|
return {
|
|
93
93
|
get baseURL() {
|
|
94
94
|
return baseURL;
|
package/dist/client/index.d.mts
CHANGED
|
@@ -11,18 +11,17 @@ import { SessionRefreshOptions, createSessionRefreshManager } from "./session-re
|
|
|
11
11
|
import { AuthClient, createAuthClient } from "./vanilla.mjs";
|
|
12
12
|
import { AccessControl, ArrayElement, ExactRoleStatements, Role, RoleAuthorizeRequest, RoleInput, RoleStatements, Statements, SubArray, Subset } from "../plugins/access/types.mjs";
|
|
13
13
|
import { AuthorizeResponse, createAccessControl, role } from "../plugins/access/access.mjs";
|
|
14
|
-
import "../plugins/access/index.mjs";
|
|
15
14
|
import { OrganizationOptions } from "../plugins/organization/types.mjs";
|
|
16
15
|
import { InferInvitation, InferMember, InferOrganization, InferOrganizationRolesFromOption, InferOrganizationZodRolesFromOption, InferTeam, Invitation, InvitationInput, InvitationStatus, Member, MemberInput, Organization, OrganizationInput, OrganizationRole, OrganizationSchema, Team, TeamInput, TeamMember, TeamMemberInput, defaultRolesSchema, invitationSchema, invitationStatus, memberSchema, organizationRoleSchema, organizationSchema, roleSchema, teamMemberSchema, teamSchema } from "../plugins/organization/schema.mjs";
|
|
17
16
|
import { getOrgAdapter } from "../plugins/organization/adapter.mjs";
|
|
18
17
|
import { hasPermission } from "../plugins/organization/has-permission.mjs";
|
|
19
18
|
import { DefaultOrganizationPlugin, DynamicAccessControlEndpoints, OrganizationCreator, OrganizationEndpoints, OrganizationPlugin, TeamEndpoints, organization, parseRoles } from "../plugins/organization/organization.mjs";
|
|
20
|
-
import "../plugins/organization/index.mjs";
|
|
21
19
|
import { BetterAuthOptions, BetterAuthPlugin } from "@better-auth/core";
|
|
22
20
|
import { DBPrimitive } from "@better-auth/core/db";
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
21
|
+
export * from "@better-auth/core/db";
|
|
22
|
+
export * from "nanostores";
|
|
23
|
+
export * from "@better-fetch/fetch";
|
|
24
|
+
|
|
26
25
|
//#region src/client/index.d.ts
|
|
27
26
|
declare const InferPlugin: <T extends BetterAuthPlugin>() => {
|
|
28
27
|
id: "infer-server-plugin";
|
|
@@ -33,4 +32,4 @@ declare function InferAuth<O extends {
|
|
|
33
32
|
options: BetterAuthOptions;
|
|
34
33
|
}>(): O["options"];
|
|
35
34
|
//#endregion
|
|
36
|
-
export {
|
|
35
|
+
export { AccessControl, ArrayElement, AuthClient, AuthQueryAtom, AuthQueryState, AuthorizeResponse, BetterAuthClientOptions, BetterAuthClientPlugin, BroadcastChannel, BroadcastListener, BroadcastMessage, CamelCase, ClientAtomListener, ClientStore, type DBPrimitive, DefaultOrganizationPlugin, DynamicAccessControlEndpoints, ExactRoleStatements, ExtractPluginField, type FocusListener, type FocusManager, HasRequiredKeys, InferActions, InferAdditionalFromClient, InferAuth, InferClientAPI, InferCtx, InferErrorCodes, InferInvitation, InferMember, InferOrganization, InferOrganizationRolesFromOption, InferOrganizationZodRolesFromOption, InferPlugin, InferPluginFieldFromTuple, InferRoute, InferRoutes, InferSessionFromClient, InferSessionUpdateCtx, InferSignUpEmailCtx, InferTeam, InferUserFromClient, InferUserUpdateCtx, Invitation, InvitationInput, InvitationStatus, IsAny, IsSignal, Member, MemberInput, MergeRoutes, type OnlineListener, type OnlineManager, Organization, OrganizationCreator, OrganizationEndpoints, OrganizationInput, OrganizationOptions, OrganizationPlugin, OrganizationRole, OrganizationSchema, OverrideMerge, PathToObject, Prettify, PrettifyDeep, ProxyRequest, RequiredKeysOf, Role, RoleAuthorizeRequest, RoleInput, RoleStatements, SessionQueryParams, SessionRefreshOptions, Statements, StripEmptyObjects, SubArray, Subset, Team, TeamEndpoints, TeamInput, TeamMember, TeamMemberInput, type UnionToIntersection, createAccessControl, createAuthClient, createSessionRefreshManager, defaultRolesSchema, getGlobalBroadcastChannel, getOrgAdapter, hasPermission, invitationSchema, invitationStatus, isJsonEqual, kBroadcastChannel, kFocusManager, kOnlineManager, memberSchema, organization, organizationRoleSchema, organizationSchema, parseJSON, parseRoles, role, roleSchema, teamMemberSchema, teamSchema, useAuthQuery, withEquality };
|
|
@@ -5,14 +5,15 @@ import { useStore } from "./lynx-store.mjs";
|
|
|
5
5
|
import { BetterAuthClientOptions } from "@better-auth/core";
|
|
6
6
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
7
7
|
import { BetterFetchError, BetterFetchResponse } from "@better-fetch/fetch";
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export * from "nanostores";
|
|
9
|
+
export * from "@better-fetch/fetch";
|
|
10
|
+
|
|
10
11
|
//#region src/client/lynx/index.d.ts
|
|
11
12
|
type InferResolvedHooks<O extends BetterAuthClientOptions> = O extends {
|
|
12
13
|
plugins: Array<infer Plugin>;
|
|
13
14
|
} ? UnionToIntersection<Plugin extends {
|
|
14
15
|
getAtoms?: infer GetAtoms;
|
|
15
|
-
} ? 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]: () => ReturnType<Atoms[key]["get"]
|
|
16
|
+
} ? 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]: () => ReturnType<Atoms[key]["get"]> } : {} : {} : {}> : {};
|
|
16
17
|
type ClientConfig = ReturnType<typeof getClientConfig>;
|
|
17
18
|
type ClientSession<Option extends BetterAuthClientOptions> = InferClientAPI<Option> extends {
|
|
18
19
|
getSession: () => Promise<infer Res>;
|
|
@@ -38,4 +39,4 @@ type LynxAuthClient<Option extends BetterAuthClientOptions> = UnionToIntersectio
|
|
|
38
39
|
};
|
|
39
40
|
declare function createAuthClient<Option extends BetterAuthClientOptions>(options?: Option | undefined): LynxAuthClient<Option>;
|
|
40
41
|
//#endregion
|
|
41
|
-
export {
|
|
42
|
+
export { ExtractPluginField, HasRequiredKeys, InferPluginFieldFromTuple, IsAny, LynxAuthClient, OverrideMerge, Prettify, PrettifyDeep, RequiredKeysOf, StripEmptyObjects, type UnionToIntersection, createAuthClient, useStore };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Store, StoreValue } from "nanostores";
|
|
2
2
|
import { DependencyList } from "@lynx-js/react";
|
|
3
|
+
|
|
3
4
|
//#region src/client/lynx/lynx-store.d.ts
|
|
4
5
|
type StoreKeys<T> = T extends {
|
|
5
6
|
setKey: (k: infer K, v: any) => unknown;
|
|
@@ -42,4 +43,4 @@ interface UseStoreOptions<SomeStore> {
|
|
|
42
43
|
*/
|
|
43
44
|
declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
|
|
44
45
|
//#endregion
|
|
45
|
-
export {
|
|
46
|
+
export { useStore };
|
package/dist/client/parser.d.mts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
//#region src/client/parser.d.ts
|
|
2
2
|
type ParseOptions = {
|
|
3
|
-
/** Throw errors instead of returning the original value */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
warnings?: boolean | undefined;
|
|
7
|
-
/** Custom reviver function */
|
|
8
|
-
reviver?: ((key: string, value: any) => any) | undefined;
|
|
9
|
-
/** Automatically convert ISO date strings to Date objects */
|
|
3
|
+
/** Throw errors instead of returning the original value */strict?: boolean | undefined; /** Log warnings when suspicious patterns are detected */
|
|
4
|
+
warnings?: boolean | undefined; /** Custom reviver function */
|
|
5
|
+
reviver?: ((key: string, value: any) => any) | undefined; /** Automatically convert ISO date strings to Date objects */
|
|
10
6
|
parseDates?: boolean | undefined;
|
|
11
7
|
};
|
|
12
8
|
declare function parseJSON<T = unknown>(value: unknown, options?: ParseOptions): T;
|
|
@@ -3,11 +3,12 @@ import { InferAdditionalFromClient, InferSessionFromClient, InferUserFromClient
|
|
|
3
3
|
import { BetterAuthClientOptions, ClientFetchOption } from "@better-auth/core";
|
|
4
4
|
import { Endpoint, InputContext, StandardSchemaV1 } from "better-call";
|
|
5
5
|
import { BetterFetchResponse } from "@better-fetch/fetch";
|
|
6
|
+
|
|
6
7
|
//#region src/client/path-to-object.d.ts
|
|
7
8
|
type KeepNullishFromOriginal<Original, Replaced> = Replaced | (undefined extends Original ? undefined : never) | (null extends Original ? null : never);
|
|
8
|
-
type ReplaceTopLevelField<Data, Field extends "user" | "session", Replaced> = Data extends object ? Field extends keyof Data ? Omit<Data, Field> & { [K in Field]: KeepNullishFromOriginal<Data[K], Replaced
|
|
9
|
+
type ReplaceTopLevelField<Data, Field extends "user" | "session", Replaced> = Data extends object ? Field extends keyof Data ? Omit<Data, Field> & { [K in Field]: KeepNullishFromOriginal<Data[K], Replaced> } : Data : Data;
|
|
9
10
|
type ReplaceAuthUserAndSession<Data, ClientOpts extends BetterAuthClientOptions> = ReplaceTopLevelField<ReplaceTopLevelField<Data, "user", InferUserFromClient<ClientOpts>>, "session", InferSessionFromClient<ClientOpts>>;
|
|
10
|
-
type MergeCustomSessionField<R extends object, Field extends "user" | "session", InferType> = Field extends keyof R ? { [K in Field]: KeepNullishFromOriginal<R[K], NonNullable<R[K]> & InferType
|
|
11
|
+
type MergeCustomSessionField<R extends object, Field extends "user" | "session", InferType> = Field extends keyof R ? { [K in Field]: KeepNullishFromOriginal<R[K], NonNullable<R[K]> & InferType> } : {};
|
|
11
12
|
type MergeCustomSessionWithInferred<R, ClientOpts extends BetterAuthClientOptions> = R extends object ? Omit<R, "user" | "session"> & MergeCustomSessionField<R, "user", InferUserFromClient<ClientOpts>> & MergeCustomSessionField<R, "session", InferSessionFromClient<ClientOpts>> : never;
|
|
12
13
|
type RefineAuthResponse<Data, ClientOpts extends BetterAuthClientOptions> = Data extends {
|
|
13
14
|
token: unknown;
|
|
@@ -15,7 +16,7 @@ type RefineAuthResponse<Data, ClientOpts extends BetterAuthClientOptions> = Data
|
|
|
15
16
|
redirect: unknown;
|
|
16
17
|
} ? ReplaceAuthUserAndSession<Data, ClientOpts> : Data;
|
|
17
18
|
type CamelCase<S extends string> = S extends `${infer P1}-${infer P2}${infer P3}` ? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}` : Lowercase<S>;
|
|
18
|
-
type PathToObject<T extends string, Fn extends (...args: any[]) => any> = T extends `/${infer Segment}/${infer Rest}` ? { [K in CamelCase<Segment>]: PathToObject<`/${Rest}`, Fn
|
|
19
|
+
type PathToObject<T extends string, Fn extends (...args: any[]) => any> = T extends `/${infer Segment}/${infer Rest}` ? { [K in CamelCase<Segment>]: PathToObject<`/${Rest}`, Fn> } : T extends `/${infer Segment}` ? { [K in CamelCase<Segment>]: Fn } : never;
|
|
19
20
|
type InferSignUpEmailCtx<ClientOpts extends BetterAuthClientOptions, FetchOptions extends ClientFetchOption> = {
|
|
20
21
|
email: string;
|
|
21
22
|
name: string;
|
|
@@ -57,4 +57,4 @@ import { phoneNumberClient } from "../../plugins/phone-number/client.mjs";
|
|
|
57
57
|
import { siweClient } from "../../plugins/siwe/client.mjs";
|
|
58
58
|
import { usernameClient } from "../../plugins/username/client.mjs";
|
|
59
59
|
import { InferServerPlugin } from "./infer-plugin.mjs";
|
|
60
|
-
export { ADMIN_ERROR_CODES, ANONYMOUS_ERROR_CODES, AdminClientOptions,
|
|
60
|
+
export { ADMIN_ERROR_CODES, ANONYMOUS_ERROR_CODES, AdminClientOptions, AdminOptions, AnonymousOptions, AnonymousSession, Auth0Options, AuthorizationQuery, BackupCodeOptions, BaseOAuthProviderOptions, Client, CodeVerificationValue, EMAIL_OTP_ERROR_CODES, ExtractPluginField, type FieldAttributeToObject, GENERIC_OAUTH_ERROR_CODES, GenericOAuthConfig, GenericOAuthOptions, GoogleOneTapActionOptions, GoogleOneTapOptions, GsiButtonConfiguration, GumroadOptions, HasRequiredKeys, HubSpotOptions, InferAdminRolesFromOption, InferInvitation, InferMember, InferOrganization, InferOrganizationRolesFromOption, InferOrganizationZodRolesFromOption, InferPluginFieldFromTuple, InferServerPlugin, InferTeam, Invitation, InvitationInput, InvitationStatus, IsAny, JWKOptions, JWSAlgorithms, Jwk, JwtOptions, KeycloakOptions, LastLoginMethodClientConfig, LineOptions, MULTI_SESSION_ERROR_CODES, Member, MemberInput, MicrosoftEntraIdOptions, MultiSessionConfig, OAUTH_POPUP_ERROR_CODES, OAuthAccessToken, OIDCMetadata, OIDCOptions, ORGANIZATION_ERROR_CODES, OTPOptions, OidcClientPlugin, OktaOptions, OneTimeTokenOptions, Organization, OrganizationClientOptions, OrganizationInput, OrganizationRole, OrganizationSchema, OverrideMerge, PHONE_NUMBER_ERROR_CODES, POPUP_TOKEN_STORAGE_KEY, PatreonOptions, PhoneNumberOptions, Prettify, PrettifyDeep, type RemoveFieldsWithReturnedFalse, RequiredKeysOf, SessionWithImpersonatedBy, SignInPopupOptions, SignInPopupResult, SlackOptions, StripEmptyObjects, TOTPOptions, TWO_FACTOR_ERROR_CODES, Team, TeamInput, TeamMember, TeamMemberInput, TokenBody, TwoFactorOptions, TwoFactorProvider, TwoFactorTable, USERNAME_ERROR_CODES, UnionToIntersection, UserWithAnonymous, UserWithPhoneNumber, UserWithRole, UserWithTwoFactor, YandexOptions, adminClient, anonymousClient, auth0, backupCode2fa, clientSideHasPermission, createSignInPopup, customSessionClient, defaultRolesSchema, deviceAuthorizationClient, emailOTPClient, encodeBackupCodes, generateBackupCodes, genericOAuthClient, getBackupCodes, getStoredPopupToken, gumroad, hubspot, inferAdditionalFields, inferOrgAdditionalFields, invitationSchema, invitationStatus, jwtClient, keycloak, lastLoginMethodClient, line, magicLinkClient, memberSchema, microsoftEntraId, multiSessionClient, oauthPopupClient, oidcClient, okta, oneTapClient, oneTimeTokenClient, organizationClient, organizationRoleSchema, organizationSchema, otp2fa, patreon, phoneNumberClient, popupBearerFetchPlugin, roleSchema, schema, siweClient, slack, teamMemberSchema, teamSchema, totp2fa, twoFactorClient, usernameClient, verifyBackupCode, yandex };
|
package/dist/client/query.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import { SessionQueryParams } from "./types.mjs";
|
|
|
2
2
|
import { ClientFetchOption } from "@better-auth/core";
|
|
3
3
|
import { PreinitializedWritableAtom } from "nanostores";
|
|
4
4
|
import { BetterFetch, BetterFetchError } from "@better-fetch/fetch";
|
|
5
|
+
|
|
5
6
|
//#region src/client/query.d.ts
|
|
6
7
|
type AuthQueryState<T> = {
|
|
7
8
|
data: null | T;
|
|
@@ -5,14 +5,15 @@ import { useStore } from "./react-store.mjs";
|
|
|
5
5
|
import { BetterAuthClientOptions } from "@better-auth/core";
|
|
6
6
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
7
7
|
import { BetterFetchError, BetterFetchResponse } from "@better-fetch/fetch";
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export * from "nanostores";
|
|
9
|
+
export * from "@better-fetch/fetch";
|
|
10
|
+
|
|
10
11
|
//#region src/client/react/index.d.ts
|
|
11
12
|
type InferResolvedHooks<O extends BetterAuthClientOptions> = O extends {
|
|
12
13
|
plugins: Array<infer Plugin>;
|
|
13
14
|
} ? UnionToIntersection<Plugin extends {
|
|
14
15
|
getAtoms?: infer GetAtoms;
|
|
15
|
-
} ? 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]: () => ReturnType<Atoms[key]["get"]
|
|
16
|
+
} ? 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]: () => ReturnType<Atoms[key]["get"]> } : {} : {} : {}> : {};
|
|
16
17
|
type ClientConfig = ReturnType<typeof getClientConfig>;
|
|
17
18
|
type ClientSession<Option extends BetterAuthClientOptions> = InferClientAPI<Option> extends {
|
|
18
19
|
getSession: () => Promise<infer Res>;
|
|
@@ -39,4 +40,4 @@ type ReactAuthClient<Option extends BetterAuthClientOptions> = UnionToIntersecti
|
|
|
39
40
|
};
|
|
40
41
|
declare function createAuthClient<Option extends BetterAuthClientOptions>(options?: Option | undefined): ReactAuthClient<Option>;
|
|
41
42
|
//#endregion
|
|
42
|
-
export {
|
|
43
|
+
export { ExtractPluginField, HasRequiredKeys, InferPluginFieldFromTuple, IsAny, OverrideMerge, Prettify, PrettifyDeep, ReactAuthClient, RequiredKeysOf, StripEmptyObjects, type UnionToIntersection, createAuthClient, useStore };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Store, StoreValue } from "nanostores";
|
|
2
2
|
import { DependencyList } from "react";
|
|
3
|
+
|
|
3
4
|
//#region src/client/react/react-store.d.ts
|
|
4
5
|
type StoreKeys<T> = T extends {
|
|
5
6
|
setKey: (k: infer K, v: any) => unknown;
|
|
@@ -42,4 +43,4 @@ interface UseStoreOptions<SomeStore> {
|
|
|
42
43
|
*/
|
|
43
44
|
declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
|
|
44
45
|
//#endregion
|
|
45
|
-
export {
|
|
46
|
+
export { useStore };
|