better-auth 1.6.26 → 1.6.27
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/api/index.d.mts +74 -73
- package/dist/api/middlewares/authorization.d.mts +4 -4
- package/dist/api/middlewares/origin-check.d.mts +3 -3
- package/dist/api/routes/account.d.mts +6 -6
- package/dist/api/routes/email-verification.d.mts +1 -1
- package/dist/api/routes/password.d.mts +4 -4
- package/dist/api/routes/session.d.mts +16 -16
- package/dist/api/routes/session.mjs +2 -3
- package/dist/api/routes/sign-in.d.mts +1 -1
- package/dist/api/routes/sign-up.d.mts +1 -1
- package/dist/api/routes/update-session.d.mts +2 -2
- package/dist/api/routes/update-user.d.mts +11 -11
- package/dist/client/session-atom.mjs +33 -44
- package/dist/integrations/next-js.d.mts +2 -2
- package/dist/integrations/svelte-kit.d.mts +1 -1
- package/dist/integrations/tanstack-start-solid.d.mts +1 -1
- package/dist/integrations/tanstack-start.d.mts +1 -1
- package/dist/package.mjs +1 -1
- package/dist/plugins/admin/admin.d.mts +25 -25
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/custom-session/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.mts +6 -6
- package/dist/plugins/generic-oauth/index.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +3 -3
- package/dist/plugins/last-login-method/index.d.mts +2 -2
- package/dist/plugins/magic-link/index.d.mts +2 -2
- package/dist/plugins/mcp/index.d.mts +3 -3
- package/dist/plugins/multi-session/index.d.mts +3 -3
- package/dist/plugins/oauth-popup/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +3 -3
- package/dist/plugins/oidc-provider/index.d.mts +6 -6
- package/dist/plugins/one-time-token/index.d.mts +3 -3
- package/dist/plugins/organization/organization.d.mts +28 -4
- package/dist/plugins/organization/routes/crud-access-control.d.mts +140 -20
- package/dist/plugins/organization/routes/crud-invites.d.mts +149 -29
- package/dist/plugins/organization/routes/crud-members.d.mts +150 -30
- package/dist/plugins/organization/routes/crud-org.d.mts +96 -24
- package/dist/plugins/organization/routes/crud-team.d.mts +207 -39
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/two-factor/backup-codes/index.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.mts +10 -10
- package/dist/plugins/two-factor/totp/index.d.mts +2 -2
- package/dist/plugins/username/index.d.mts +1 -1
- package/package.json +10 -9
|
@@ -59,7 +59,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
59
59
|
hooks: {
|
|
60
60
|
after: {
|
|
61
61
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
62
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<SessionWithImpersonatedBy[] | undefined
|
|
62
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<SessionWithImpersonatedBy[] | undefined>>;
|
|
63
63
|
}[];
|
|
64
64
|
};
|
|
65
65
|
endpoints: {
|
|
@@ -70,7 +70,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
70
70
|
role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
|
|
71
71
|
}, import("zod/v4/core").$strip>;
|
|
72
72
|
requireHeaders: true;
|
|
73
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
73
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
74
74
|
session: {
|
|
75
75
|
user: UserWithRole;
|
|
76
76
|
session: {
|
|
@@ -84,7 +84,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
84
84
|
userAgent?: string | null | undefined;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
}
|
|
87
|
+
}>>[];
|
|
88
88
|
metadata: {
|
|
89
89
|
openapi: {
|
|
90
90
|
operationId: string;
|
|
@@ -123,7 +123,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
123
123
|
query: import("zod").ZodObject<{
|
|
124
124
|
id: import("zod").ZodString;
|
|
125
125
|
}, import("zod/v4/core").$strip>;
|
|
126
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
126
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
127
127
|
session: {
|
|
128
128
|
user: UserWithRole;
|
|
129
129
|
session: {
|
|
@@ -137,7 +137,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
137
137
|
userAgent?: string | null | undefined;
|
|
138
138
|
};
|
|
139
139
|
};
|
|
140
|
-
}
|
|
140
|
+
}>>[];
|
|
141
141
|
metadata: {
|
|
142
142
|
openapi: {
|
|
143
143
|
operationId: string;
|
|
@@ -214,7 +214,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
214
214
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
215
215
|
data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
|
|
216
216
|
}, import("zod/v4/core").$strip>;
|
|
217
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
217
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
218
218
|
session: {
|
|
219
219
|
user: UserWithRole;
|
|
220
220
|
session: {
|
|
@@ -228,7 +228,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
228
228
|
userAgent?: string | null | undefined;
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
|
-
}
|
|
231
|
+
}>>[];
|
|
232
232
|
metadata: {
|
|
233
233
|
openapi: {
|
|
234
234
|
operationId: string;
|
|
@@ -256,7 +256,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
256
256
|
}, UserWithRole>;
|
|
257
257
|
listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
|
|
258
258
|
method: "GET";
|
|
259
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
259
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
260
260
|
session: {
|
|
261
261
|
user: UserWithRole;
|
|
262
262
|
session: {
|
|
@@ -270,7 +270,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
270
270
|
userAgent?: string | null | undefined;
|
|
271
271
|
};
|
|
272
272
|
};
|
|
273
|
-
}
|
|
273
|
+
}>>[];
|
|
274
274
|
query: import("zod").ZodObject<{
|
|
275
275
|
searchValue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
276
276
|
searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -348,7 +348,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
348
348
|
}>;
|
|
349
349
|
listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
|
|
350
350
|
method: "POST";
|
|
351
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
351
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
352
352
|
session: {
|
|
353
353
|
user: UserWithRole;
|
|
354
354
|
session: {
|
|
@@ -362,7 +362,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
362
362
|
userAgent?: string | null | undefined;
|
|
363
363
|
};
|
|
364
364
|
};
|
|
365
|
-
}
|
|
365
|
+
}>>[];
|
|
366
366
|
body: import("zod").ZodObject<{
|
|
367
367
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
368
368
|
}, import("zod/v4/core").$strip>;
|
|
@@ -401,7 +401,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
401
401
|
body: import("zod").ZodObject<{
|
|
402
402
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
403
403
|
}, import("zod/v4/core").$strip>;
|
|
404
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
404
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
405
405
|
session: {
|
|
406
406
|
user: UserWithRole;
|
|
407
407
|
session: {
|
|
@@ -415,7 +415,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
415
415
|
userAgent?: string | null | undefined;
|
|
416
416
|
};
|
|
417
417
|
};
|
|
418
|
-
}
|
|
418
|
+
}>>[];
|
|
419
419
|
metadata: {
|
|
420
420
|
openapi: {
|
|
421
421
|
operationId: string;
|
|
@@ -450,7 +450,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
450
450
|
banReason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
451
451
|
banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
452
452
|
}, import("zod/v4/core").$strip>;
|
|
453
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
453
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
454
454
|
session: {
|
|
455
455
|
user: UserWithRole;
|
|
456
456
|
session: {
|
|
@@ -464,7 +464,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
464
464
|
userAgent?: string | null | undefined;
|
|
465
465
|
};
|
|
466
466
|
};
|
|
467
|
-
}
|
|
467
|
+
}>>[];
|
|
468
468
|
metadata: {
|
|
469
469
|
openapi: {
|
|
470
470
|
operationId: string;
|
|
@@ -497,7 +497,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
497
497
|
body: import("zod").ZodObject<{
|
|
498
498
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
499
499
|
}, import("zod/v4/core").$strip>;
|
|
500
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
500
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
501
501
|
session: {
|
|
502
502
|
user: UserWithRole;
|
|
503
503
|
session: {
|
|
@@ -511,7 +511,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
511
511
|
userAgent?: string | null | undefined;
|
|
512
512
|
};
|
|
513
513
|
};
|
|
514
|
-
}
|
|
514
|
+
}>>[];
|
|
515
515
|
metadata: {
|
|
516
516
|
openapi: {
|
|
517
517
|
operationId: string;
|
|
@@ -581,7 +581,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
581
581
|
body: import("zod").ZodObject<{
|
|
582
582
|
sessionToken: import("zod").ZodString;
|
|
583
583
|
}, import("zod/v4/core").$strip>;
|
|
584
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
584
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
585
585
|
session: {
|
|
586
586
|
user: UserWithRole;
|
|
587
587
|
session: {
|
|
@@ -595,7 +595,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
595
595
|
userAgent?: string | null | undefined;
|
|
596
596
|
};
|
|
597
597
|
};
|
|
598
|
-
}
|
|
598
|
+
}>>[];
|
|
599
599
|
metadata: {
|
|
600
600
|
openapi: {
|
|
601
601
|
operationId: string;
|
|
@@ -628,7 +628,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
628
628
|
body: import("zod").ZodObject<{
|
|
629
629
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
630
630
|
}, import("zod/v4/core").$strip>;
|
|
631
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
631
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
632
632
|
session: {
|
|
633
633
|
user: UserWithRole;
|
|
634
634
|
session: {
|
|
@@ -642,7 +642,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
642
642
|
userAgent?: string | null | undefined;
|
|
643
643
|
};
|
|
644
644
|
};
|
|
645
|
-
}
|
|
645
|
+
}>>[];
|
|
646
646
|
metadata: {
|
|
647
647
|
openapi: {
|
|
648
648
|
operationId: string;
|
|
@@ -675,7 +675,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
675
675
|
body: import("zod").ZodObject<{
|
|
676
676
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
677
677
|
}, import("zod/v4/core").$strip>;
|
|
678
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
678
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
679
679
|
session: {
|
|
680
680
|
user: UserWithRole;
|
|
681
681
|
session: {
|
|
@@ -689,7 +689,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
689
689
|
userAgent?: string | null | undefined;
|
|
690
690
|
};
|
|
691
691
|
};
|
|
692
|
-
}
|
|
692
|
+
}>>[];
|
|
693
693
|
metadata: {
|
|
694
694
|
openapi: {
|
|
695
695
|
operationId: string;
|
|
@@ -723,7 +723,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
723
723
|
newPassword: import("zod").ZodString;
|
|
724
724
|
userId: import("zod").ZodCoercedString<unknown>;
|
|
725
725
|
}, import("zod/v4/core").$strip>;
|
|
726
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
726
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
727
727
|
session: {
|
|
728
728
|
user: UserWithRole;
|
|
729
729
|
session: {
|
|
@@ -737,7 +737,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
737
737
|
userAgent?: string | null | undefined;
|
|
738
738
|
};
|
|
739
739
|
};
|
|
740
|
-
}
|
|
740
|
+
}>>[];
|
|
741
741
|
metadata: {
|
|
742
742
|
openapi: {
|
|
743
743
|
operationId: string;
|
|
@@ -52,7 +52,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
52
52
|
}>;
|
|
53
53
|
deleteAnonymousUser: import("better-call").StrictEndpoint<"/delete-anonymous-user", {
|
|
54
54
|
method: "POST";
|
|
55
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
55
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
56
56
|
session: {
|
|
57
57
|
session: Record<string, any> & {
|
|
58
58
|
id: string;
|
|
@@ -74,7 +74,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
74
74
|
image?: string | null | undefined;
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
-
}
|
|
77
|
+
}>>[];
|
|
78
78
|
metadata: {
|
|
79
79
|
openapi: {
|
|
80
80
|
description: string;
|
|
@@ -136,7 +136,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
136
136
|
hooks: {
|
|
137
137
|
after: {
|
|
138
138
|
matcher(ctx: import("@better-auth/core").HookEndpointContext): boolean;
|
|
139
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
139
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
140
140
|
}[];
|
|
141
141
|
};
|
|
142
142
|
options: AnonymousOptions | undefined;
|
|
@@ -25,15 +25,15 @@ declare const bearer: (options?: BearerOptions | undefined) => {
|
|
|
25
25
|
hooks: {
|
|
26
26
|
before: {
|
|
27
27
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
28
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
28
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
29
29
|
context: {
|
|
30
30
|
headers: Headers;
|
|
31
31
|
};
|
|
32
|
-
} | undefined
|
|
32
|
+
} | undefined>>;
|
|
33
33
|
}[];
|
|
34
34
|
after: {
|
|
35
35
|
matcher(context: import("@better-auth/core").HookEndpointContext): true;
|
|
36
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
36
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
37
37
|
}[];
|
|
38
38
|
};
|
|
39
39
|
options: BearerOptions | undefined;
|
|
@@ -24,7 +24,7 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
|
|
|
24
24
|
hooks: {
|
|
25
25
|
after: {
|
|
26
26
|
matcher: (ctx: import("@better-auth/core").HookEndpointContext) => boolean;
|
|
27
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<Awaited<Returns>[] | undefined
|
|
27
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<Awaited<Returns>[] | undefined>>;
|
|
28
28
|
}[];
|
|
29
29
|
};
|
|
30
30
|
endpoints: {
|
|
@@ -24,7 +24,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
24
24
|
endpoints: {
|
|
25
25
|
sendVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
26
26
|
method: "POST";
|
|
27
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
27
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
28
28
|
body: import("zod").ZodObject<{
|
|
29
29
|
email: import("zod").ZodString;
|
|
30
30
|
type: import("zod").ZodEnum<{
|
|
@@ -385,7 +385,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
385
385
|
newEmail: import("zod").ZodString;
|
|
386
386
|
otp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
387
387
|
}, import("zod/v4/core").$strip>;
|
|
388
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
388
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
389
389
|
session: {
|
|
390
390
|
session: Record<string, any> & {
|
|
391
391
|
id: string;
|
|
@@ -407,7 +407,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
407
407
|
image?: string | null | undefined;
|
|
408
408
|
};
|
|
409
409
|
};
|
|
410
|
-
}
|
|
410
|
+
}>>[];
|
|
411
411
|
metadata: {
|
|
412
412
|
openapi: {
|
|
413
413
|
operationId: string;
|
|
@@ -440,7 +440,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
440
440
|
newEmail: import("zod").ZodString;
|
|
441
441
|
otp: import("zod").ZodString;
|
|
442
442
|
}, import("zod/v4/core").$strip>;
|
|
443
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
443
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
444
444
|
session: {
|
|
445
445
|
session: Record<string, any> & {
|
|
446
446
|
id: string;
|
|
@@ -462,7 +462,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
462
462
|
image?: string | null | undefined;
|
|
463
463
|
};
|
|
464
464
|
};
|
|
465
|
-
}
|
|
465
|
+
}>>[];
|
|
466
466
|
metadata: {
|
|
467
467
|
openapi: {
|
|
468
468
|
operationId: string;
|
|
@@ -493,7 +493,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
493
493
|
hooks: {
|
|
494
494
|
after: {
|
|
495
495
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
496
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
496
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
497
497
|
}[];
|
|
498
498
|
};
|
|
499
499
|
rateLimit: ({
|
|
@@ -123,7 +123,7 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
123
123
|
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
124
124
|
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
125
125
|
}, import("zod/v4/core").$strip>;
|
|
126
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
126
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
127
127
|
session: {
|
|
128
128
|
session: Record<string, any> & {
|
|
129
129
|
id: string;
|
|
@@ -145,7 +145,7 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
145
145
|
image?: string | null | undefined;
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
|
-
}
|
|
148
|
+
}>>[];
|
|
149
149
|
metadata: {
|
|
150
150
|
openapi: {
|
|
151
151
|
description: string;
|
|
@@ -97,7 +97,7 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
97
97
|
getToken: import("better-call").StrictEndpoint<"/token", {
|
|
98
98
|
method: "GET";
|
|
99
99
|
requireHeaders: true;
|
|
100
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
100
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
101
101
|
session: {
|
|
102
102
|
session: Record<string, any> & {
|
|
103
103
|
id: string;
|
|
@@ -119,7 +119,7 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
119
119
|
image?: string | null | undefined;
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
|
-
}
|
|
122
|
+
}>>[];
|
|
123
123
|
metadata: {
|
|
124
124
|
openapi: {
|
|
125
125
|
operationId: string;
|
|
@@ -191,7 +191,7 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
191
191
|
hooks: {
|
|
192
192
|
after: {
|
|
193
193
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
194
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
194
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
195
195
|
}[];
|
|
196
196
|
};
|
|
197
197
|
schema: {
|
|
@@ -72,7 +72,7 @@ declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O
|
|
|
72
72
|
image?: string | null | undefined;
|
|
73
73
|
} & Record<string, unknown>, context: GenericEndpointContext | null): Promise<{
|
|
74
74
|
data: {
|
|
75
|
-
lastLoginMethod:
|
|
75
|
+
lastLoginMethod: string;
|
|
76
76
|
id: string;
|
|
77
77
|
createdAt: Date;
|
|
78
78
|
updatedAt: Date;
|
|
@@ -104,7 +104,7 @@ declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O
|
|
|
104
104
|
hooks: {
|
|
105
105
|
after: {
|
|
106
106
|
matcher(): true;
|
|
107
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
107
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
108
108
|
}[];
|
|
109
109
|
};
|
|
110
110
|
schema: O["storeInDatabase"] extends true ? {
|
|
@@ -91,7 +91,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
91
91
|
signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
|
|
92
92
|
method: "POST";
|
|
93
93
|
requireHeaders: true;
|
|
94
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
94
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
95
95
|
body: z.ZodObject<{
|
|
96
96
|
email: z.ZodEmail;
|
|
97
97
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -149,7 +149,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
149
149
|
errorCallbackURL: z.ZodOptional<z.ZodString>;
|
|
150
150
|
newUserCallbackURL: z.ZodOptional<z.ZodString>;
|
|
151
151
|
}, z.core.$strip>;
|
|
152
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
152
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
153
153
|
requireHeaders: true;
|
|
154
154
|
metadata: {
|
|
155
155
|
openapi: {
|
|
@@ -30,7 +30,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
30
30
|
hooks: {
|
|
31
31
|
after: {
|
|
32
32
|
matcher(): true;
|
|
33
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
33
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
34
34
|
}[];
|
|
35
35
|
};
|
|
36
36
|
endpoints: {
|
|
@@ -41,7 +41,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
41
41
|
accept: z.ZodBoolean;
|
|
42
42
|
consent_code: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
44
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
45
45
|
session: {
|
|
46
46
|
session: Record<string, any> & {
|
|
47
47
|
id: string;
|
|
@@ -63,7 +63,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
63
63
|
image?: string | null | undefined;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
}
|
|
66
|
+
}>>[];
|
|
67
67
|
metadata: {
|
|
68
68
|
openapi: {
|
|
69
69
|
description: string;
|
|
@@ -144,7 +144,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
144
144
|
sessionToken: z.ZodString;
|
|
145
145
|
}, z.core.$strip>;
|
|
146
146
|
requireHeaders: true;
|
|
147
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
147
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
148
148
|
session: {
|
|
149
149
|
session: Record<string, any> & {
|
|
150
150
|
id: string;
|
|
@@ -166,7 +166,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
166
166
|
image?: string | null | undefined;
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
|
-
}
|
|
169
|
+
}>>[];
|
|
170
170
|
metadata: {
|
|
171
171
|
openapi: {
|
|
172
172
|
description: string;
|
|
@@ -196,7 +196,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
196
196
|
hooks: {
|
|
197
197
|
after: {
|
|
198
198
|
matcher: (context: import("@better-auth/core").HookEndpointContext) => boolean;
|
|
199
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
199
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
200
200
|
}[];
|
|
201
201
|
};
|
|
202
202
|
options: MultiSessionConfig | undefined;
|
|
@@ -55,7 +55,7 @@ declare const oauthPopup: () => {
|
|
|
55
55
|
hooks: {
|
|
56
56
|
after: {
|
|
57
57
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
58
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
58
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
59
59
|
}[];
|
|
60
60
|
};
|
|
61
61
|
};
|
|
@@ -62,7 +62,7 @@ declare const oAuthProxy: <O extends OAuthProxyOptions>(opts?: O) => {
|
|
|
62
62
|
callbackURL: z.ZodString;
|
|
63
63
|
profile: z.ZodOptional<z.ZodString>;
|
|
64
64
|
}, z.core.$strip>;
|
|
65
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
65
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
66
66
|
metadata: {
|
|
67
67
|
openapi: {
|
|
68
68
|
operationId: string;
|
|
@@ -98,11 +98,11 @@ declare const oAuthProxy: <O extends OAuthProxyOptions>(opts?: O) => {
|
|
|
98
98
|
hooks: {
|
|
99
99
|
before: {
|
|
100
100
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
101
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
101
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
102
102
|
}[];
|
|
103
103
|
after: {
|
|
104
104
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
105
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
105
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
106
106
|
}[];
|
|
107
107
|
};
|
|
108
108
|
};
|
|
@@ -39,10 +39,10 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
39
39
|
hooks: {
|
|
40
40
|
after: {
|
|
41
41
|
matcher(): true;
|
|
42
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<Response | {
|
|
42
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<Response | {
|
|
43
43
|
redirect: boolean;
|
|
44
44
|
url: string;
|
|
45
|
-
} | undefined
|
|
45
|
+
} | undefined>>;
|
|
46
46
|
}[];
|
|
47
47
|
};
|
|
48
48
|
endpoints: {
|
|
@@ -87,7 +87,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
87
87
|
accept: z.ZodBoolean;
|
|
88
88
|
consent_code: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
89
89
|
}, z.core.$strip>;
|
|
90
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
90
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
91
91
|
session: {
|
|
92
92
|
session: Record<string, any> & {
|
|
93
93
|
id: string;
|
|
@@ -109,7 +109,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
109
109
|
image?: string | null | undefined;
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
|
-
}
|
|
112
|
+
}>>[];
|
|
113
113
|
metadata: {
|
|
114
114
|
openapi: {
|
|
115
115
|
description: string;
|
|
@@ -415,7 +415,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
415
415
|
}>;
|
|
416
416
|
getOAuthClient: import("better-call").StrictEndpoint<"/oauth2/client/:id", {
|
|
417
417
|
method: "GET";
|
|
418
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
418
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
419
419
|
session: {
|
|
420
420
|
session: Record<string, any> & {
|
|
421
421
|
id: string;
|
|
@@ -437,7 +437,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
437
437
|
image?: string | null | undefined;
|
|
438
438
|
};
|
|
439
439
|
};
|
|
440
|
-
}
|
|
440
|
+
}>>[];
|
|
441
441
|
metadata: {
|
|
442
442
|
openapi: {
|
|
443
443
|
description: string;
|
|
@@ -68,7 +68,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
68
68
|
*/
|
|
69
69
|
generateOneTimeToken: import("better-call").StrictEndpoint<"/one-time-token/generate", {
|
|
70
70
|
method: "GET";
|
|
71
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
71
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
72
72
|
session: {
|
|
73
73
|
session: Record<string, any> & {
|
|
74
74
|
id: string;
|
|
@@ -90,7 +90,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
90
90
|
image?: string | null | undefined;
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
-
}
|
|
93
|
+
}>>[];
|
|
94
94
|
}, {
|
|
95
95
|
token: string;
|
|
96
96
|
}>;
|
|
@@ -122,7 +122,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
122
122
|
hooks: {
|
|
123
123
|
after: {
|
|
124
124
|
matcher: () => true;
|
|
125
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
125
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
126
126
|
}[];
|
|
127
127
|
};
|
|
128
128
|
options: OneTimeTokenOptions | undefined;
|
|
@@ -104,8 +104,8 @@ declare const createHasPermission: <O extends OrganizationOptions>(options: O) =
|
|
|
104
104
|
}, z.core.$strip>, z.ZodObject<{
|
|
105
105
|
permissions: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
106
106
|
}, z.core.$strip>]>>;
|
|
107
|
-
use:
|
|
108
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
107
|
+
use: import("better-call").Middleware<{
|
|
108
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
109
109
|
session: {
|
|
110
110
|
session: Record<string, any> & {
|
|
111
111
|
id: string;
|
|
@@ -127,7 +127,31 @@ declare const createHasPermission: <O extends OrganizationOptions>(options: O) =
|
|
|
127
127
|
image?: string | null | undefined;
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
|
-
}
|
|
130
|
+
}>>[];
|
|
131
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
132
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
133
|
+
session: {
|
|
134
|
+
session: Record<string, any> & {
|
|
135
|
+
id: string;
|
|
136
|
+
createdAt: Date;
|
|
137
|
+
updatedAt: Date;
|
|
138
|
+
userId: string;
|
|
139
|
+
expiresAt: Date;
|
|
140
|
+
token: string;
|
|
141
|
+
ipAddress?: string | null | undefined;
|
|
142
|
+
userAgent?: string | null | undefined;
|
|
143
|
+
};
|
|
144
|
+
user: Record<string, any> & {
|
|
145
|
+
id: string;
|
|
146
|
+
createdAt: Date;
|
|
147
|
+
updatedAt: Date;
|
|
148
|
+
email: string;
|
|
149
|
+
emailVerified: boolean;
|
|
150
|
+
name: string;
|
|
151
|
+
image?: string | null | undefined;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
}>>[];
|
|
131
155
|
}>) => Promise<{
|
|
132
156
|
session: {
|
|
133
157
|
session: {
|
|
@@ -153,7 +177,7 @@ declare const createHasPermission: <O extends OrganizationOptions>(options: O) =
|
|
|
153
177
|
image?: string | null | undefined;
|
|
154
178
|
};
|
|
155
179
|
};
|
|
156
|
-
}
|
|
180
|
+
}>>[];
|
|
157
181
|
metadata: {
|
|
158
182
|
$Infer: {
|
|
159
183
|
body: {
|