better-auth 1.4.12-beta.2 → 1.4.12
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 +99 -99
- package/dist/api/middlewares/origin-check.d.mts +4 -4
- package/dist/api/routes/account.d.mts +11 -11
- package/dist/api/routes/callback.d.mts +2 -2
- package/dist/api/routes/email-verification.d.mts +4 -4
- package/dist/api/routes/error.d.mts +2 -2
- package/dist/api/routes/ok.d.mts +2 -2
- package/dist/api/routes/password.d.mts +7 -7
- package/dist/api/routes/session.d.mts +14 -14
- package/dist/api/routes/sign-in.d.mts +4 -4
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +3 -3
- package/dist/api/routes/update-user.d.mts +13 -13
- package/dist/client/lynx/index.d.mts +15 -15
- package/dist/client/react/index.d.mts +13 -13
- package/dist/client/solid/index.d.mts +13 -13
- package/dist/client/svelte/index.d.mts +15 -15
- package/dist/client/vanilla.d.mts +15 -15
- package/dist/client/vue/index.d.mts +15 -15
- package/dist/context/create-context.mjs +2 -2
- package/dist/context/create-context.mjs.map +1 -1
- package/dist/context/helpers.mjs +2 -2
- package/dist/context/helpers.mjs.map +1 -1
- package/dist/db/field.d.mts +6 -6
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/plugins/admin/admin.d.mts +116 -116
- package/dist/plugins/anonymous/index.d.mts +7 -7
- package/dist/plugins/api-key/index.d.mts +80 -80
- package/dist/plugins/bearer/index.d.mts +6 -6
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +50 -50
- package/dist/plugins/generic-oauth/index.d.mts +29 -29
- package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
- package/dist/plugins/jwt/client.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +9 -9
- package/dist/plugins/last-login-method/index.d.mts +4 -4
- package/dist/plugins/magic-link/index.d.mts +4 -4
- package/dist/plugins/mcp/index.d.mts +10 -10
- package/dist/plugins/multi-session/index.d.mts +9 -9
- package/dist/plugins/oauth-proxy/index.d.mts +5 -5
- package/dist/plugins/oidc-provider/index.d.mts +15 -15
- package/dist/plugins/one-tap/client.d.mts +5 -5
- package/dist/plugins/one-tap/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +5 -5
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/organization/client.d.mts +2 -2
- package/dist/plugins/organization/organization.d.mts +7 -7
- package/dist/plugins/organization/routes/crud-members.d.mts +62 -62
- package/dist/plugins/organization/routes/crud-org.d.mts +51 -51
- package/dist/plugins/phone-number/index.d.mts +9 -9
- package/dist/plugins/siwe/index.d.mts +3 -3
- package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
- package/dist/plugins/two-factor/client.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.mts +18 -18
- package/dist/plugins/two-factor/otp/index.d.mts +3 -3
- package/dist/plugins/two-factor/totp/index.d.mts +5 -5
- package/dist/plugins/username/index.d.mts +9 -9
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +1242 -1242
- package/package.json +3 -3
package/dist/api/index.d.mts
CHANGED
|
@@ -25,7 +25,7 @@ import { AuthContext, Awaitable, BetterAuthOptions, BetterAuthPlugin } from "@be
|
|
|
25
25
|
import { InternalLogger } from "@better-auth/core/env";
|
|
26
26
|
import * as _better_auth_core_oauth20 from "@better-auth/core/oauth2";
|
|
27
27
|
import * as zod0 from "zod";
|
|
28
|
-
import * as
|
|
28
|
+
import * as better_call2 from "better-call";
|
|
29
29
|
import { APIError } from "better-call";
|
|
30
30
|
import { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware } from "@better-auth/core/api";
|
|
31
31
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
@@ -34,7 +34,7 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
34
34
|
declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
|
|
35
35
|
declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
|
|
36
36
|
api: {
|
|
37
|
-
readonly ok:
|
|
37
|
+
readonly ok: better_call2.StrictEndpoint<"/ok", {
|
|
38
38
|
method: "GET";
|
|
39
39
|
metadata: {
|
|
40
40
|
openapi: {
|
|
@@ -64,7 +64,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
64
64
|
}, {
|
|
65
65
|
ok: boolean;
|
|
66
66
|
}>;
|
|
67
|
-
readonly error:
|
|
67
|
+
readonly error: better_call2.StrictEndpoint<"/error", {
|
|
68
68
|
method: "GET";
|
|
69
69
|
metadata: {
|
|
70
70
|
openapi: {
|
|
@@ -86,7 +86,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
86
86
|
scope: "server";
|
|
87
87
|
};
|
|
88
88
|
}, Response>;
|
|
89
|
-
readonly signInSocial:
|
|
89
|
+
readonly signInSocial: better_call2.StrictEndpoint<"/sign-in/social", {
|
|
90
90
|
method: "POST";
|
|
91
91
|
operationId: string;
|
|
92
92
|
body: zod0.ZodObject<{
|
|
@@ -194,7 +194,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
194
194
|
image?: string | null | undefined;
|
|
195
195
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
196
196
|
}>;
|
|
197
|
-
readonly callbackOAuth:
|
|
197
|
+
readonly callbackOAuth: better_call2.StrictEndpoint<"/callback/:id", {
|
|
198
198
|
method: ("GET" | "POST")[];
|
|
199
199
|
operationId: string;
|
|
200
200
|
body: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -218,7 +218,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
218
218
|
scope: "server";
|
|
219
219
|
};
|
|
220
220
|
}, void>;
|
|
221
|
-
readonly getSession:
|
|
221
|
+
readonly getSession: better_call2.StrictEndpoint<"/get-session", {
|
|
222
222
|
method: "GET";
|
|
223
223
|
operationId: string;
|
|
224
224
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -275,7 +275,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
275
275
|
image?: string | null | undefined;
|
|
276
276
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
277
277
|
} | null>;
|
|
278
|
-
readonly signOut:
|
|
278
|
+
readonly signOut: better_call2.StrictEndpoint<"/sign-out", {
|
|
279
279
|
method: "POST";
|
|
280
280
|
operationId: string;
|
|
281
281
|
requireHeaders: true;
|
|
@@ -305,10 +305,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
305
305
|
}, {
|
|
306
306
|
success: boolean;
|
|
307
307
|
}>;
|
|
308
|
-
readonly signUpEmail:
|
|
308
|
+
readonly signUpEmail: better_call2.StrictEndpoint<"/sign-up/email", {
|
|
309
309
|
method: "POST";
|
|
310
310
|
operationId: string;
|
|
311
|
-
use: ((inputContext:
|
|
311
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
312
312
|
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
313
313
|
name: zod0.ZodString;
|
|
314
314
|
email: zod0.ZodEmail;
|
|
@@ -479,10 +479,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
479
479
|
image?: string | null | undefined;
|
|
480
480
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
481
481
|
}>;
|
|
482
|
-
readonly signInEmail:
|
|
482
|
+
readonly signInEmail: better_call2.StrictEndpoint<"/sign-in/email", {
|
|
483
483
|
method: "POST";
|
|
484
484
|
operationId: string;
|
|
485
|
-
use: ((inputContext:
|
|
485
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
486
486
|
body: zod0.ZodObject<{
|
|
487
487
|
email: zod0.ZodString;
|
|
488
488
|
password: zod0.ZodString;
|
|
@@ -564,7 +564,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
564
564
|
image?: string | null | undefined;
|
|
565
565
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
566
566
|
}>;
|
|
567
|
-
readonly resetPassword:
|
|
567
|
+
readonly resetPassword: better_call2.StrictEndpoint<"/reset-password", {
|
|
568
568
|
method: "POST";
|
|
569
569
|
operationId: string;
|
|
570
570
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -600,7 +600,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
600
600
|
}, {
|
|
601
601
|
status: boolean;
|
|
602
602
|
}>;
|
|
603
|
-
readonly verifyPassword:
|
|
603
|
+
readonly verifyPassword: better_call2.StrictEndpoint<"/verify-password", {
|
|
604
604
|
method: "POST";
|
|
605
605
|
body: zod0.ZodObject<{
|
|
606
606
|
password: zod0.ZodString;
|
|
@@ -629,7 +629,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
629
629
|
};
|
|
630
630
|
};
|
|
631
631
|
};
|
|
632
|
-
use: ((inputContext:
|
|
632
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
633
633
|
session: {
|
|
634
634
|
session: Record<string, any> & {
|
|
635
635
|
id: string;
|
|
@@ -655,14 +655,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
655
655
|
}, {
|
|
656
656
|
status: boolean;
|
|
657
657
|
}>;
|
|
658
|
-
readonly verifyEmail:
|
|
658
|
+
readonly verifyEmail: better_call2.StrictEndpoint<"/verify-email", {
|
|
659
659
|
method: "GET";
|
|
660
660
|
operationId: string;
|
|
661
661
|
query: zod0.ZodObject<{
|
|
662
662
|
token: zod0.ZodString;
|
|
663
663
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
664
664
|
}, zod_v4_core0.$strip>;
|
|
665
|
-
use: ((inputContext:
|
|
665
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
666
666
|
metadata: {
|
|
667
667
|
openapi: {
|
|
668
668
|
description: string;
|
|
@@ -711,7 +711,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
711
711
|
}, void | {
|
|
712
712
|
status: boolean;
|
|
713
713
|
}>;
|
|
714
|
-
readonly sendVerificationEmail:
|
|
714
|
+
readonly sendVerificationEmail: better_call2.StrictEndpoint<"/send-verification-email", {
|
|
715
715
|
method: "POST";
|
|
716
716
|
operationId: string;
|
|
717
717
|
body: zod0.ZodObject<{
|
|
@@ -786,13 +786,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
786
786
|
}, {
|
|
787
787
|
status: boolean;
|
|
788
788
|
}>;
|
|
789
|
-
readonly changeEmail:
|
|
789
|
+
readonly changeEmail: better_call2.StrictEndpoint<"/change-email", {
|
|
790
790
|
method: "POST";
|
|
791
791
|
body: zod0.ZodObject<{
|
|
792
792
|
newEmail: zod0.ZodEmail;
|
|
793
793
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
794
794
|
}, zod_v4_core0.$strip>;
|
|
795
|
-
use: ((inputContext:
|
|
795
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
796
796
|
session: {
|
|
797
797
|
session: Record<string, any> & {
|
|
798
798
|
id: string;
|
|
@@ -867,7 +867,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
867
867
|
}, {
|
|
868
868
|
status: boolean;
|
|
869
869
|
}>;
|
|
870
|
-
readonly changePassword:
|
|
870
|
+
readonly changePassword: better_call2.StrictEndpoint<"/change-password", {
|
|
871
871
|
method: "POST";
|
|
872
872
|
operationId: string;
|
|
873
873
|
body: zod0.ZodObject<{
|
|
@@ -875,7 +875,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
875
875
|
currentPassword: zod0.ZodString;
|
|
876
876
|
revokeOtherSessions: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
877
877
|
}, zod_v4_core0.$strip>;
|
|
878
|
-
use: ((inputContext:
|
|
878
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
879
879
|
session: {
|
|
880
880
|
session: Record<string, any> & {
|
|
881
881
|
id: string;
|
|
@@ -975,12 +975,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
975
975
|
updatedAt: Date;
|
|
976
976
|
};
|
|
977
977
|
}>;
|
|
978
|
-
readonly setPassword:
|
|
978
|
+
readonly setPassword: better_call2.StrictEndpoint<string, {
|
|
979
979
|
method: "POST";
|
|
980
980
|
body: zod0.ZodObject<{
|
|
981
981
|
newPassword: zod0.ZodString;
|
|
982
982
|
}, zod_v4_core0.$strip>;
|
|
983
|
-
use: ((inputContext:
|
|
983
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
984
984
|
session: {
|
|
985
985
|
session: Record<string, any> & {
|
|
986
986
|
id: string;
|
|
@@ -1006,11 +1006,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1006
1006
|
}, {
|
|
1007
1007
|
status: boolean;
|
|
1008
1008
|
}>;
|
|
1009
|
-
readonly updateUser:
|
|
1009
|
+
readonly updateUser: better_call2.StrictEndpoint<"/update-user", {
|
|
1010
1010
|
method: "POST";
|
|
1011
1011
|
operationId: string;
|
|
1012
1012
|
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
1013
|
-
use: ((inputContext:
|
|
1013
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1014
1014
|
session: {
|
|
1015
1015
|
session: Record<string, any> & {
|
|
1016
1016
|
id: string;
|
|
@@ -1086,9 +1086,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1086
1086
|
}, {
|
|
1087
1087
|
status: boolean;
|
|
1088
1088
|
}>;
|
|
1089
|
-
readonly deleteUser:
|
|
1089
|
+
readonly deleteUser: better_call2.StrictEndpoint<"/delete-user", {
|
|
1090
1090
|
method: "POST";
|
|
1091
|
-
use: ((inputContext:
|
|
1091
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1092
1092
|
session: {
|
|
1093
1093
|
session: Record<string, any> & {
|
|
1094
1094
|
id: string;
|
|
@@ -1173,7 +1173,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1173
1173
|
success: boolean;
|
|
1174
1174
|
message: string;
|
|
1175
1175
|
}>;
|
|
1176
|
-
readonly requestPasswordReset:
|
|
1176
|
+
readonly requestPasswordReset: better_call2.StrictEndpoint<"/request-password-reset", {
|
|
1177
1177
|
method: "POST";
|
|
1178
1178
|
body: zod0.ZodObject<{
|
|
1179
1179
|
email: zod0.ZodEmail;
|
|
@@ -1209,13 +1209,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1209
1209
|
status: boolean;
|
|
1210
1210
|
message: string;
|
|
1211
1211
|
}>;
|
|
1212
|
-
readonly requestPasswordResetCallback:
|
|
1212
|
+
readonly requestPasswordResetCallback: better_call2.StrictEndpoint<"/reset-password/:token", {
|
|
1213
1213
|
method: "GET";
|
|
1214
1214
|
operationId: string;
|
|
1215
1215
|
query: zod0.ZodObject<{
|
|
1216
1216
|
callbackURL: zod0.ZodString;
|
|
1217
1217
|
}, zod_v4_core0.$strip>;
|
|
1218
|
-
use: ((inputContext:
|
|
1218
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
1219
1219
|
metadata: {
|
|
1220
1220
|
openapi: {
|
|
1221
1221
|
operationId: string;
|
|
@@ -1257,10 +1257,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1257
1257
|
};
|
|
1258
1258
|
};
|
|
1259
1259
|
}, never>;
|
|
1260
|
-
readonly listSessions:
|
|
1260
|
+
readonly listSessions: better_call2.StrictEndpoint<"/list-sessions", {
|
|
1261
1261
|
method: "GET";
|
|
1262
1262
|
operationId: string;
|
|
1263
|
-
use: ((inputContext:
|
|
1263
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1264
1264
|
session: {
|
|
1265
1265
|
session: Record<string, any> & {
|
|
1266
1266
|
id: string;
|
|
@@ -1315,12 +1315,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1315
1315
|
ipAddress?: string | null | undefined;
|
|
1316
1316
|
userAgent?: string | null | undefined;
|
|
1317
1317
|
} & (Option extends BetterAuthOptions ? AdditionalSessionFieldsOutput<Option> : Option extends Auth ? AdditionalSessionFieldsOutput<Option["options"]> : {})>>>[]>;
|
|
1318
|
-
readonly revokeSession:
|
|
1318
|
+
readonly revokeSession: better_call2.StrictEndpoint<"/revoke-session", {
|
|
1319
1319
|
method: "POST";
|
|
1320
1320
|
body: zod0.ZodObject<{
|
|
1321
1321
|
token: zod0.ZodString;
|
|
1322
1322
|
}, zod_v4_core0.$strip>;
|
|
1323
|
-
use: ((inputContext:
|
|
1323
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1324
1324
|
session: {
|
|
1325
1325
|
session: Record<string, any> & {
|
|
1326
1326
|
id: string;
|
|
@@ -1387,9 +1387,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1387
1387
|
}, {
|
|
1388
1388
|
status: boolean;
|
|
1389
1389
|
}>;
|
|
1390
|
-
readonly revokeSessions:
|
|
1390
|
+
readonly revokeSessions: better_call2.StrictEndpoint<"/revoke-sessions", {
|
|
1391
1391
|
method: "POST";
|
|
1392
|
-
use: ((inputContext:
|
|
1392
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1393
1393
|
session: {
|
|
1394
1394
|
session: Record<string, any> & {
|
|
1395
1395
|
id: string;
|
|
@@ -1440,10 +1440,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1440
1440
|
}, {
|
|
1441
1441
|
status: boolean;
|
|
1442
1442
|
}>;
|
|
1443
|
-
readonly revokeOtherSessions:
|
|
1443
|
+
readonly revokeOtherSessions: better_call2.StrictEndpoint<"/revoke-other-sessions", {
|
|
1444
1444
|
method: "POST";
|
|
1445
1445
|
requireHeaders: true;
|
|
1446
|
-
use: ((inputContext:
|
|
1446
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1447
1447
|
session: {
|
|
1448
1448
|
session: Record<string, any> & {
|
|
1449
1449
|
id: string;
|
|
@@ -1493,7 +1493,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1493
1493
|
}, {
|
|
1494
1494
|
status: boolean;
|
|
1495
1495
|
}>;
|
|
1496
|
-
readonly linkSocialAccount:
|
|
1496
|
+
readonly linkSocialAccount: better_call2.StrictEndpoint<"/link-social", {
|
|
1497
1497
|
method: "POST";
|
|
1498
1498
|
requireHeaders: true;
|
|
1499
1499
|
body: zod0.ZodObject<{
|
|
@@ -1512,7 +1512,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1512
1512
|
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1513
1513
|
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
1514
1514
|
}, zod_v4_core0.$strip>;
|
|
1515
|
-
use: ((inputContext:
|
|
1515
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1516
1516
|
session: {
|
|
1517
1517
|
session: Record<string, any> & {
|
|
1518
1518
|
id: string;
|
|
@@ -1571,9 +1571,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1571
1571
|
url: string;
|
|
1572
1572
|
redirect: boolean;
|
|
1573
1573
|
}>;
|
|
1574
|
-
readonly listUserAccounts:
|
|
1574
|
+
readonly listUserAccounts: better_call2.StrictEndpoint<"/list-accounts", {
|
|
1575
1575
|
method: "GET";
|
|
1576
|
-
use: ((inputContext:
|
|
1576
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1577
1577
|
session: {
|
|
1578
1578
|
session: Record<string, any> & {
|
|
1579
1579
|
id: string;
|
|
@@ -1655,13 +1655,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1655
1655
|
userId: string;
|
|
1656
1656
|
scopes: string[];
|
|
1657
1657
|
}[]>;
|
|
1658
|
-
readonly deleteUserCallback:
|
|
1658
|
+
readonly deleteUserCallback: better_call2.StrictEndpoint<"/delete-user/callback", {
|
|
1659
1659
|
method: "GET";
|
|
1660
1660
|
query: zod0.ZodObject<{
|
|
1661
1661
|
token: zod0.ZodString;
|
|
1662
1662
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1663
1663
|
}, zod_v4_core0.$strip>;
|
|
1664
|
-
use: ((inputContext:
|
|
1664
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
1665
1665
|
metadata: {
|
|
1666
1666
|
openapi: {
|
|
1667
1667
|
description: string;
|
|
@@ -1695,13 +1695,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1695
1695
|
success: boolean;
|
|
1696
1696
|
message: string;
|
|
1697
1697
|
}>;
|
|
1698
|
-
readonly unlinkAccount:
|
|
1698
|
+
readonly unlinkAccount: better_call2.StrictEndpoint<"/unlink-account", {
|
|
1699
1699
|
method: "POST";
|
|
1700
1700
|
body: zod0.ZodObject<{
|
|
1701
1701
|
providerId: zod0.ZodString;
|
|
1702
1702
|
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
1703
1703
|
}, zod_v4_core0.$strip>;
|
|
1704
|
-
use: ((inputContext:
|
|
1704
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1705
1705
|
session: {
|
|
1706
1706
|
session: Record<string, any> & {
|
|
1707
1707
|
id: string;
|
|
@@ -1749,7 +1749,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1749
1749
|
}, {
|
|
1750
1750
|
status: boolean;
|
|
1751
1751
|
}>;
|
|
1752
|
-
readonly refreshToken:
|
|
1752
|
+
readonly refreshToken: better_call2.StrictEndpoint<"/refresh-token", {
|
|
1753
1753
|
method: "POST";
|
|
1754
1754
|
body: zod0.ZodObject<{
|
|
1755
1755
|
providerId: zod0.ZodString;
|
|
@@ -1808,7 +1808,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1808
1808
|
providerId: string;
|
|
1809
1809
|
accountId: string;
|
|
1810
1810
|
}>;
|
|
1811
|
-
readonly getAccessToken:
|
|
1811
|
+
readonly getAccessToken: better_call2.StrictEndpoint<"/get-access-token", {
|
|
1812
1812
|
method: "POST";
|
|
1813
1813
|
body: zod0.ZodObject<{
|
|
1814
1814
|
providerId: zod0.ZodString;
|
|
@@ -1863,9 +1863,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1863
1863
|
scopes: string[];
|
|
1864
1864
|
idToken: string | undefined;
|
|
1865
1865
|
}>;
|
|
1866
|
-
readonly accountInfo:
|
|
1866
|
+
readonly accountInfo: better_call2.StrictEndpoint<"/account-info", {
|
|
1867
1867
|
method: "GET";
|
|
1868
|
-
use: ((inputContext:
|
|
1868
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
1869
1869
|
session: {
|
|
1870
1870
|
session: Record<string, any> & {
|
|
1871
1871
|
id: string;
|
|
@@ -1953,7 +1953,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1953
1953
|
declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
|
|
1954
1954
|
handler: (request: Request) => Promise<Response>;
|
|
1955
1955
|
endpoints: {
|
|
1956
|
-
readonly ok:
|
|
1956
|
+
readonly ok: better_call2.StrictEndpoint<"/ok", {
|
|
1957
1957
|
method: "GET";
|
|
1958
1958
|
metadata: {
|
|
1959
1959
|
openapi: {
|
|
@@ -1983,7 +1983,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
1983
1983
|
}, {
|
|
1984
1984
|
ok: boolean;
|
|
1985
1985
|
}>;
|
|
1986
|
-
readonly error:
|
|
1986
|
+
readonly error: better_call2.StrictEndpoint<"/error", {
|
|
1987
1987
|
method: "GET";
|
|
1988
1988
|
metadata: {
|
|
1989
1989
|
openapi: {
|
|
@@ -2005,7 +2005,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2005
2005
|
scope: "server";
|
|
2006
2006
|
};
|
|
2007
2007
|
}, Response>;
|
|
2008
|
-
readonly signInSocial:
|
|
2008
|
+
readonly signInSocial: better_call2.StrictEndpoint<"/sign-in/social", {
|
|
2009
2009
|
method: "POST";
|
|
2010
2010
|
operationId: string;
|
|
2011
2011
|
body: zod0.ZodObject<{
|
|
@@ -2113,7 +2113,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2113
2113
|
image?: string | null | undefined;
|
|
2114
2114
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2115
2115
|
}>;
|
|
2116
|
-
readonly callbackOAuth:
|
|
2116
|
+
readonly callbackOAuth: better_call2.StrictEndpoint<"/callback/:id", {
|
|
2117
2117
|
method: ("GET" | "POST")[];
|
|
2118
2118
|
operationId: string;
|
|
2119
2119
|
body: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -2137,7 +2137,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2137
2137
|
scope: "server";
|
|
2138
2138
|
};
|
|
2139
2139
|
}, void>;
|
|
2140
|
-
readonly getSession:
|
|
2140
|
+
readonly getSession: better_call2.StrictEndpoint<"/get-session", {
|
|
2141
2141
|
method: "GET";
|
|
2142
2142
|
operationId: string;
|
|
2143
2143
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -2194,7 +2194,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2194
2194
|
image?: string | null | undefined;
|
|
2195
2195
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2196
2196
|
} | null>;
|
|
2197
|
-
readonly signOut:
|
|
2197
|
+
readonly signOut: better_call2.StrictEndpoint<"/sign-out", {
|
|
2198
2198
|
method: "POST";
|
|
2199
2199
|
operationId: string;
|
|
2200
2200
|
requireHeaders: true;
|
|
@@ -2224,10 +2224,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2224
2224
|
}, {
|
|
2225
2225
|
success: boolean;
|
|
2226
2226
|
}>;
|
|
2227
|
-
readonly signUpEmail:
|
|
2227
|
+
readonly signUpEmail: better_call2.StrictEndpoint<"/sign-up/email", {
|
|
2228
2228
|
method: "POST";
|
|
2229
2229
|
operationId: string;
|
|
2230
|
-
use: ((inputContext:
|
|
2230
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
2231
2231
|
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
2232
2232
|
name: zod0.ZodString;
|
|
2233
2233
|
email: zod0.ZodEmail;
|
|
@@ -2398,10 +2398,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2398
2398
|
image?: string | null | undefined;
|
|
2399
2399
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2400
2400
|
}>;
|
|
2401
|
-
readonly signInEmail:
|
|
2401
|
+
readonly signInEmail: better_call2.StrictEndpoint<"/sign-in/email", {
|
|
2402
2402
|
method: "POST";
|
|
2403
2403
|
operationId: string;
|
|
2404
|
-
use: ((inputContext:
|
|
2404
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
2405
2405
|
body: zod0.ZodObject<{
|
|
2406
2406
|
email: zod0.ZodString;
|
|
2407
2407
|
password: zod0.ZodString;
|
|
@@ -2483,7 +2483,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2483
2483
|
image?: string | null | undefined;
|
|
2484
2484
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2485
2485
|
}>;
|
|
2486
|
-
readonly resetPassword:
|
|
2486
|
+
readonly resetPassword: better_call2.StrictEndpoint<"/reset-password", {
|
|
2487
2487
|
method: "POST";
|
|
2488
2488
|
operationId: string;
|
|
2489
2489
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -2519,7 +2519,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2519
2519
|
}, {
|
|
2520
2520
|
status: boolean;
|
|
2521
2521
|
}>;
|
|
2522
|
-
readonly verifyPassword:
|
|
2522
|
+
readonly verifyPassword: better_call2.StrictEndpoint<"/verify-password", {
|
|
2523
2523
|
method: "POST";
|
|
2524
2524
|
body: zod0.ZodObject<{
|
|
2525
2525
|
password: zod0.ZodString;
|
|
@@ -2548,7 +2548,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2548
2548
|
};
|
|
2549
2549
|
};
|
|
2550
2550
|
};
|
|
2551
|
-
use: ((inputContext:
|
|
2551
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
2552
2552
|
session: {
|
|
2553
2553
|
session: Record<string, any> & {
|
|
2554
2554
|
id: string;
|
|
@@ -2574,14 +2574,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2574
2574
|
}, {
|
|
2575
2575
|
status: boolean;
|
|
2576
2576
|
}>;
|
|
2577
|
-
readonly verifyEmail:
|
|
2577
|
+
readonly verifyEmail: better_call2.StrictEndpoint<"/verify-email", {
|
|
2578
2578
|
method: "GET";
|
|
2579
2579
|
operationId: string;
|
|
2580
2580
|
query: zod0.ZodObject<{
|
|
2581
2581
|
token: zod0.ZodString;
|
|
2582
2582
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2583
2583
|
}, zod_v4_core0.$strip>;
|
|
2584
|
-
use: ((inputContext:
|
|
2584
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
2585
2585
|
metadata: {
|
|
2586
2586
|
openapi: {
|
|
2587
2587
|
description: string;
|
|
@@ -2630,7 +2630,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2630
2630
|
}, void | {
|
|
2631
2631
|
status: boolean;
|
|
2632
2632
|
}>;
|
|
2633
|
-
readonly sendVerificationEmail:
|
|
2633
|
+
readonly sendVerificationEmail: better_call2.StrictEndpoint<"/send-verification-email", {
|
|
2634
2634
|
method: "POST";
|
|
2635
2635
|
operationId: string;
|
|
2636
2636
|
body: zod0.ZodObject<{
|
|
@@ -2705,13 +2705,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2705
2705
|
}, {
|
|
2706
2706
|
status: boolean;
|
|
2707
2707
|
}>;
|
|
2708
|
-
readonly changeEmail:
|
|
2708
|
+
readonly changeEmail: better_call2.StrictEndpoint<"/change-email", {
|
|
2709
2709
|
method: "POST";
|
|
2710
2710
|
body: zod0.ZodObject<{
|
|
2711
2711
|
newEmail: zod0.ZodEmail;
|
|
2712
2712
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2713
2713
|
}, zod_v4_core0.$strip>;
|
|
2714
|
-
use: ((inputContext:
|
|
2714
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
2715
2715
|
session: {
|
|
2716
2716
|
session: Record<string, any> & {
|
|
2717
2717
|
id: string;
|
|
@@ -2786,7 +2786,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2786
2786
|
}, {
|
|
2787
2787
|
status: boolean;
|
|
2788
2788
|
}>;
|
|
2789
|
-
readonly changePassword:
|
|
2789
|
+
readonly changePassword: better_call2.StrictEndpoint<"/change-password", {
|
|
2790
2790
|
method: "POST";
|
|
2791
2791
|
operationId: string;
|
|
2792
2792
|
body: zod0.ZodObject<{
|
|
@@ -2794,7 +2794,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2794
2794
|
currentPassword: zod0.ZodString;
|
|
2795
2795
|
revokeOtherSessions: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2796
2796
|
}, zod_v4_core0.$strip>;
|
|
2797
|
-
use: ((inputContext:
|
|
2797
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
2798
2798
|
session: {
|
|
2799
2799
|
session: Record<string, any> & {
|
|
2800
2800
|
id: string;
|
|
@@ -2894,12 +2894,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2894
2894
|
updatedAt: Date;
|
|
2895
2895
|
};
|
|
2896
2896
|
}>;
|
|
2897
|
-
readonly setPassword:
|
|
2897
|
+
readonly setPassword: better_call2.StrictEndpoint<string, {
|
|
2898
2898
|
method: "POST";
|
|
2899
2899
|
body: zod0.ZodObject<{
|
|
2900
2900
|
newPassword: zod0.ZodString;
|
|
2901
2901
|
}, zod_v4_core0.$strip>;
|
|
2902
|
-
use: ((inputContext:
|
|
2902
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
2903
2903
|
session: {
|
|
2904
2904
|
session: Record<string, any> & {
|
|
2905
2905
|
id: string;
|
|
@@ -2925,11 +2925,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2925
2925
|
}, {
|
|
2926
2926
|
status: boolean;
|
|
2927
2927
|
}>;
|
|
2928
|
-
readonly updateUser:
|
|
2928
|
+
readonly updateUser: better_call2.StrictEndpoint<"/update-user", {
|
|
2929
2929
|
method: "POST";
|
|
2930
2930
|
operationId: string;
|
|
2931
2931
|
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
2932
|
-
use: ((inputContext:
|
|
2932
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
2933
2933
|
session: {
|
|
2934
2934
|
session: Record<string, any> & {
|
|
2935
2935
|
id: string;
|
|
@@ -3005,9 +3005,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3005
3005
|
}, {
|
|
3006
3006
|
status: boolean;
|
|
3007
3007
|
}>;
|
|
3008
|
-
readonly deleteUser:
|
|
3008
|
+
readonly deleteUser: better_call2.StrictEndpoint<"/delete-user", {
|
|
3009
3009
|
method: "POST";
|
|
3010
|
-
use: ((inputContext:
|
|
3010
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3011
3011
|
session: {
|
|
3012
3012
|
session: Record<string, any> & {
|
|
3013
3013
|
id: string;
|
|
@@ -3092,7 +3092,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3092
3092
|
success: boolean;
|
|
3093
3093
|
message: string;
|
|
3094
3094
|
}>;
|
|
3095
|
-
readonly requestPasswordReset:
|
|
3095
|
+
readonly requestPasswordReset: better_call2.StrictEndpoint<"/request-password-reset", {
|
|
3096
3096
|
method: "POST";
|
|
3097
3097
|
body: zod0.ZodObject<{
|
|
3098
3098
|
email: zod0.ZodEmail;
|
|
@@ -3128,13 +3128,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3128
3128
|
status: boolean;
|
|
3129
3129
|
message: string;
|
|
3130
3130
|
}>;
|
|
3131
|
-
readonly requestPasswordResetCallback:
|
|
3131
|
+
readonly requestPasswordResetCallback: better_call2.StrictEndpoint<"/reset-password/:token", {
|
|
3132
3132
|
method: "GET";
|
|
3133
3133
|
operationId: string;
|
|
3134
3134
|
query: zod0.ZodObject<{
|
|
3135
3135
|
callbackURL: zod0.ZodString;
|
|
3136
3136
|
}, zod_v4_core0.$strip>;
|
|
3137
|
-
use: ((inputContext:
|
|
3137
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
3138
3138
|
metadata: {
|
|
3139
3139
|
openapi: {
|
|
3140
3140
|
operationId: string;
|
|
@@ -3176,10 +3176,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3176
3176
|
};
|
|
3177
3177
|
};
|
|
3178
3178
|
}, never>;
|
|
3179
|
-
readonly listSessions:
|
|
3179
|
+
readonly listSessions: better_call2.StrictEndpoint<"/list-sessions", {
|
|
3180
3180
|
method: "GET";
|
|
3181
3181
|
operationId: string;
|
|
3182
|
-
use: ((inputContext:
|
|
3182
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3183
3183
|
session: {
|
|
3184
3184
|
session: Record<string, any> & {
|
|
3185
3185
|
id: string;
|
|
@@ -3234,12 +3234,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3234
3234
|
ipAddress?: string | null | undefined;
|
|
3235
3235
|
userAgent?: string | null | undefined;
|
|
3236
3236
|
} & (Option extends BetterAuthOptions ? AdditionalSessionFieldsOutput<Option> : Option extends Auth ? AdditionalSessionFieldsOutput<Option["options"]> : {})>>>[]>;
|
|
3237
|
-
readonly revokeSession:
|
|
3237
|
+
readonly revokeSession: better_call2.StrictEndpoint<"/revoke-session", {
|
|
3238
3238
|
method: "POST";
|
|
3239
3239
|
body: zod0.ZodObject<{
|
|
3240
3240
|
token: zod0.ZodString;
|
|
3241
3241
|
}, zod_v4_core0.$strip>;
|
|
3242
|
-
use: ((inputContext:
|
|
3242
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3243
3243
|
session: {
|
|
3244
3244
|
session: Record<string, any> & {
|
|
3245
3245
|
id: string;
|
|
@@ -3306,9 +3306,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3306
3306
|
}, {
|
|
3307
3307
|
status: boolean;
|
|
3308
3308
|
}>;
|
|
3309
|
-
readonly revokeSessions:
|
|
3309
|
+
readonly revokeSessions: better_call2.StrictEndpoint<"/revoke-sessions", {
|
|
3310
3310
|
method: "POST";
|
|
3311
|
-
use: ((inputContext:
|
|
3311
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3312
3312
|
session: {
|
|
3313
3313
|
session: Record<string, any> & {
|
|
3314
3314
|
id: string;
|
|
@@ -3359,10 +3359,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3359
3359
|
}, {
|
|
3360
3360
|
status: boolean;
|
|
3361
3361
|
}>;
|
|
3362
|
-
readonly revokeOtherSessions:
|
|
3362
|
+
readonly revokeOtherSessions: better_call2.StrictEndpoint<"/revoke-other-sessions", {
|
|
3363
3363
|
method: "POST";
|
|
3364
3364
|
requireHeaders: true;
|
|
3365
|
-
use: ((inputContext:
|
|
3365
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3366
3366
|
session: {
|
|
3367
3367
|
session: Record<string, any> & {
|
|
3368
3368
|
id: string;
|
|
@@ -3412,7 +3412,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3412
3412
|
}, {
|
|
3413
3413
|
status: boolean;
|
|
3414
3414
|
}>;
|
|
3415
|
-
readonly linkSocialAccount:
|
|
3415
|
+
readonly linkSocialAccount: better_call2.StrictEndpoint<"/link-social", {
|
|
3416
3416
|
method: "POST";
|
|
3417
3417
|
requireHeaders: true;
|
|
3418
3418
|
body: zod0.ZodObject<{
|
|
@@ -3431,7 +3431,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3431
3431
|
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
3432
3432
|
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
3433
3433
|
}, zod_v4_core0.$strip>;
|
|
3434
|
-
use: ((inputContext:
|
|
3434
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3435
3435
|
session: {
|
|
3436
3436
|
session: Record<string, any> & {
|
|
3437
3437
|
id: string;
|
|
@@ -3490,9 +3490,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3490
3490
|
url: string;
|
|
3491
3491
|
redirect: boolean;
|
|
3492
3492
|
}>;
|
|
3493
|
-
readonly listUserAccounts:
|
|
3493
|
+
readonly listUserAccounts: better_call2.StrictEndpoint<"/list-accounts", {
|
|
3494
3494
|
method: "GET";
|
|
3495
|
-
use: ((inputContext:
|
|
3495
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3496
3496
|
session: {
|
|
3497
3497
|
session: Record<string, any> & {
|
|
3498
3498
|
id: string;
|
|
@@ -3574,13 +3574,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3574
3574
|
userId: string;
|
|
3575
3575
|
scopes: string[];
|
|
3576
3576
|
}[]>;
|
|
3577
|
-
readonly deleteUserCallback:
|
|
3577
|
+
readonly deleteUserCallback: better_call2.StrictEndpoint<"/delete-user/callback", {
|
|
3578
3578
|
method: "GET";
|
|
3579
3579
|
query: zod0.ZodObject<{
|
|
3580
3580
|
token: zod0.ZodString;
|
|
3581
3581
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
3582
3582
|
}, zod_v4_core0.$strip>;
|
|
3583
|
-
use: ((inputContext:
|
|
3583
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<void>)[];
|
|
3584
3584
|
metadata: {
|
|
3585
3585
|
openapi: {
|
|
3586
3586
|
description: string;
|
|
@@ -3614,13 +3614,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3614
3614
|
success: boolean;
|
|
3615
3615
|
message: string;
|
|
3616
3616
|
}>;
|
|
3617
|
-
readonly unlinkAccount:
|
|
3617
|
+
readonly unlinkAccount: better_call2.StrictEndpoint<"/unlink-account", {
|
|
3618
3618
|
method: "POST";
|
|
3619
3619
|
body: zod0.ZodObject<{
|
|
3620
3620
|
providerId: zod0.ZodString;
|
|
3621
3621
|
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
3622
3622
|
}, zod_v4_core0.$strip>;
|
|
3623
|
-
use: ((inputContext:
|
|
3623
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3624
3624
|
session: {
|
|
3625
3625
|
session: Record<string, any> & {
|
|
3626
3626
|
id: string;
|
|
@@ -3668,7 +3668,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3668
3668
|
}, {
|
|
3669
3669
|
status: boolean;
|
|
3670
3670
|
}>;
|
|
3671
|
-
readonly refreshToken:
|
|
3671
|
+
readonly refreshToken: better_call2.StrictEndpoint<"/refresh-token", {
|
|
3672
3672
|
method: "POST";
|
|
3673
3673
|
body: zod0.ZodObject<{
|
|
3674
3674
|
providerId: zod0.ZodString;
|
|
@@ -3727,7 +3727,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3727
3727
|
providerId: string;
|
|
3728
3728
|
accountId: string;
|
|
3729
3729
|
}>;
|
|
3730
|
-
readonly getAccessToken:
|
|
3730
|
+
readonly getAccessToken: better_call2.StrictEndpoint<"/get-access-token", {
|
|
3731
3731
|
method: "POST";
|
|
3732
3732
|
body: zod0.ZodObject<{
|
|
3733
3733
|
providerId: zod0.ZodString;
|
|
@@ -3782,9 +3782,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3782
3782
|
scopes: string[];
|
|
3783
3783
|
idToken: string | undefined;
|
|
3784
3784
|
}>;
|
|
3785
|
-
readonly accountInfo:
|
|
3785
|
+
readonly accountInfo: better_call2.StrictEndpoint<"/account-info", {
|
|
3786
3786
|
method: "GET";
|
|
3787
|
-
use: ((inputContext:
|
|
3787
|
+
use: ((inputContext: better_call2.MiddlewareInputContext<better_call2.MiddlewareOptions>) => Promise<{
|
|
3788
3788
|
session: {
|
|
3789
3789
|
session: Record<string, any> & {
|
|
3790
3790
|
id: string;
|