better-auth 1.4.20 → 1.4.22
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/memory-adapter/memory-adapter.d.mts +2 -2
- package/dist/api/index.d.mts +99 -99
- 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 +13 -13
- 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/db/field.d.mts +3 -3
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/tanstack-start-solid.d.mts +4 -4
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/plugins/admin/admin.d.mts +3 -3
- package/dist/plugins/anonymous/index.d.mts +7 -7
- package/dist/plugins/api-key/index.d.mts +36 -36
- package/dist/plugins/bearer/index.d.mts +6 -6
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.mts +5 -5
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +14 -14
- package/dist/plugins/generic-oauth/index.d.mts +5 -5
- 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 +8 -8
- package/dist/plugins/oidc-provider/index.d.mts +13 -13
- 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/adapter.d.mts +24 -24
- package/dist/plugins/organization/client.d.mts +9 -9
- package/dist/plugins/organization/organization.d.mts +3 -3
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +69 -69
- package/dist/plugins/organization/routes/crud-members.d.mts +67 -67
- package/dist/plugins/organization/routes/crud-org.d.mts +59 -59
- package/dist/plugins/organization/routes/crud-team.d.mts +79 -79
- package/dist/plugins/phone-number/index.d.mts +9 -9
- package/dist/plugins/siwe/index.d.mts +3 -3
- package/dist/plugins/two-factor/client.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.mts +18 -18
- package/dist/plugins/username/index.d.mts +4 -4
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +312 -312
- package/package.json +3 -3
package/dist/api/index.d.mts
CHANGED
|
@@ -23,7 +23,7 @@ import "./routes/index.mjs";
|
|
|
23
23
|
import { AuthContext, Awaitable, BetterAuthOptions, BetterAuthPlugin } from "@better-auth/core";
|
|
24
24
|
import { InternalLogger } from "@better-auth/core/env";
|
|
25
25
|
import * as _better_auth_core_oauth20 from "@better-auth/core/oauth2";
|
|
26
|
-
import * as
|
|
26
|
+
import * as better_call118 from "better-call";
|
|
27
27
|
import { APIError } from "better-call";
|
|
28
28
|
import * as zod88 from "zod";
|
|
29
29
|
import { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware } from "@better-auth/core/api";
|
|
@@ -33,7 +33,7 @@ import * as zod_v4_core16 from "zod/v4/core";
|
|
|
33
33
|
declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
|
|
34
34
|
declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
|
|
35
35
|
api: {
|
|
36
|
-
readonly ok:
|
|
36
|
+
readonly ok: better_call118.StrictEndpoint<"/ok", {
|
|
37
37
|
method: "GET";
|
|
38
38
|
metadata: {
|
|
39
39
|
openapi: {
|
|
@@ -63,7 +63,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
63
63
|
}, {
|
|
64
64
|
ok: boolean;
|
|
65
65
|
}>;
|
|
66
|
-
readonly error:
|
|
66
|
+
readonly error: better_call118.StrictEndpoint<"/error", {
|
|
67
67
|
method: "GET";
|
|
68
68
|
metadata: {
|
|
69
69
|
openapi: {
|
|
@@ -85,7 +85,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
85
85
|
scope: "server";
|
|
86
86
|
};
|
|
87
87
|
}, Response>;
|
|
88
|
-
readonly signInSocial:
|
|
88
|
+
readonly signInSocial: better_call118.StrictEndpoint<"/sign-in/social", {
|
|
89
89
|
method: "POST";
|
|
90
90
|
operationId: string;
|
|
91
91
|
body: zod88.ZodObject<{
|
|
@@ -193,7 +193,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
193
193
|
image?: string | null | undefined;
|
|
194
194
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
195
195
|
}>;
|
|
196
|
-
readonly callbackOAuth:
|
|
196
|
+
readonly callbackOAuth: better_call118.StrictEndpoint<"/callback/:id", {
|
|
197
197
|
method: ("GET" | "POST")[];
|
|
198
198
|
operationId: string;
|
|
199
199
|
body: zod88.ZodOptional<zod88.ZodObject<{
|
|
@@ -217,7 +217,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
217
217
|
scope: "server";
|
|
218
218
|
};
|
|
219
219
|
}, void>;
|
|
220
|
-
readonly getSession:
|
|
220
|
+
readonly getSession: better_call118.StrictEndpoint<"/get-session", {
|
|
221
221
|
method: "GET";
|
|
222
222
|
operationId: string;
|
|
223
223
|
query: zod88.ZodOptional<zod88.ZodObject<{
|
|
@@ -274,7 +274,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
274
274
|
image?: string | null | undefined;
|
|
275
275
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
276
276
|
} | null>;
|
|
277
|
-
readonly signOut:
|
|
277
|
+
readonly signOut: better_call118.StrictEndpoint<"/sign-out", {
|
|
278
278
|
method: "POST";
|
|
279
279
|
operationId: string;
|
|
280
280
|
requireHeaders: true;
|
|
@@ -304,10 +304,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
304
304
|
}, {
|
|
305
305
|
success: boolean;
|
|
306
306
|
}>;
|
|
307
|
-
readonly signUpEmail:
|
|
307
|
+
readonly signUpEmail: better_call118.StrictEndpoint<"/sign-up/email", {
|
|
308
308
|
method: "POST";
|
|
309
309
|
operationId: string;
|
|
310
|
-
use: ((inputContext:
|
|
310
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
311
311
|
body: zod88.ZodIntersection<zod88.ZodObject<{
|
|
312
312
|
name: zod88.ZodString;
|
|
313
313
|
email: zod88.ZodEmail;
|
|
@@ -478,10 +478,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
478
478
|
image?: string | null | undefined;
|
|
479
479
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
480
480
|
}>;
|
|
481
|
-
readonly signInEmail:
|
|
481
|
+
readonly signInEmail: better_call118.StrictEndpoint<"/sign-in/email", {
|
|
482
482
|
method: "POST";
|
|
483
483
|
operationId: string;
|
|
484
|
-
use: ((inputContext:
|
|
484
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
485
485
|
body: zod88.ZodObject<{
|
|
486
486
|
email: zod88.ZodString;
|
|
487
487
|
password: zod88.ZodString;
|
|
@@ -563,7 +563,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
563
563
|
image?: string | null | undefined;
|
|
564
564
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
565
565
|
}>;
|
|
566
|
-
readonly resetPassword:
|
|
566
|
+
readonly resetPassword: better_call118.StrictEndpoint<"/reset-password", {
|
|
567
567
|
method: "POST";
|
|
568
568
|
operationId: string;
|
|
569
569
|
query: zod88.ZodOptional<zod88.ZodObject<{
|
|
@@ -599,7 +599,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
599
599
|
}, {
|
|
600
600
|
status: boolean;
|
|
601
601
|
}>;
|
|
602
|
-
readonly verifyPassword:
|
|
602
|
+
readonly verifyPassword: better_call118.StrictEndpoint<"/verify-password", {
|
|
603
603
|
method: "POST";
|
|
604
604
|
body: zod88.ZodObject<{
|
|
605
605
|
password: zod88.ZodString;
|
|
@@ -628,7 +628,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
628
628
|
};
|
|
629
629
|
};
|
|
630
630
|
};
|
|
631
|
-
use: ((inputContext:
|
|
631
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
632
632
|
session: {
|
|
633
633
|
session: Record<string, any> & {
|
|
634
634
|
id: string;
|
|
@@ -654,14 +654,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
654
654
|
}, {
|
|
655
655
|
status: boolean;
|
|
656
656
|
}>;
|
|
657
|
-
readonly verifyEmail:
|
|
657
|
+
readonly verifyEmail: better_call118.StrictEndpoint<"/verify-email", {
|
|
658
658
|
method: "GET";
|
|
659
659
|
operationId: string;
|
|
660
660
|
query: zod88.ZodObject<{
|
|
661
661
|
token: zod88.ZodString;
|
|
662
662
|
callbackURL: zod88.ZodOptional<zod88.ZodString>;
|
|
663
663
|
}, zod_v4_core16.$strip>;
|
|
664
|
-
use: ((inputContext:
|
|
664
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
665
665
|
metadata: {
|
|
666
666
|
openapi: {
|
|
667
667
|
description: string;
|
|
@@ -710,7 +710,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
710
710
|
}, void | {
|
|
711
711
|
status: boolean;
|
|
712
712
|
}>;
|
|
713
|
-
readonly sendVerificationEmail:
|
|
713
|
+
readonly sendVerificationEmail: better_call118.StrictEndpoint<"/send-verification-email", {
|
|
714
714
|
method: "POST";
|
|
715
715
|
operationId: string;
|
|
716
716
|
body: zod88.ZodObject<{
|
|
@@ -785,13 +785,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
785
785
|
}, {
|
|
786
786
|
status: boolean;
|
|
787
787
|
}>;
|
|
788
|
-
readonly changeEmail:
|
|
788
|
+
readonly changeEmail: better_call118.StrictEndpoint<"/change-email", {
|
|
789
789
|
method: "POST";
|
|
790
790
|
body: zod88.ZodObject<{
|
|
791
791
|
newEmail: zod88.ZodEmail;
|
|
792
792
|
callbackURL: zod88.ZodOptional<zod88.ZodString>;
|
|
793
793
|
}, zod_v4_core16.$strip>;
|
|
794
|
-
use: ((inputContext:
|
|
794
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
795
795
|
session: {
|
|
796
796
|
session: Record<string, any> & {
|
|
797
797
|
id: string;
|
|
@@ -866,7 +866,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
866
866
|
}, {
|
|
867
867
|
status: boolean;
|
|
868
868
|
}>;
|
|
869
|
-
readonly changePassword:
|
|
869
|
+
readonly changePassword: better_call118.StrictEndpoint<"/change-password", {
|
|
870
870
|
method: "POST";
|
|
871
871
|
operationId: string;
|
|
872
872
|
body: zod88.ZodObject<{
|
|
@@ -874,7 +874,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
874
874
|
currentPassword: zod88.ZodString;
|
|
875
875
|
revokeOtherSessions: zod88.ZodOptional<zod88.ZodBoolean>;
|
|
876
876
|
}, zod_v4_core16.$strip>;
|
|
877
|
-
use: ((inputContext:
|
|
877
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
878
878
|
session: {
|
|
879
879
|
session: Record<string, any> & {
|
|
880
880
|
id: string;
|
|
@@ -974,12 +974,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
974
974
|
image?: string | null | undefined;
|
|
975
975
|
} & Record<string, any>;
|
|
976
976
|
}>;
|
|
977
|
-
readonly setPassword:
|
|
977
|
+
readonly setPassword: better_call118.StrictEndpoint<string, {
|
|
978
978
|
method: "POST";
|
|
979
979
|
body: zod88.ZodObject<{
|
|
980
980
|
newPassword: zod88.ZodString;
|
|
981
981
|
}, zod_v4_core16.$strip>;
|
|
982
|
-
use: ((inputContext:
|
|
982
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
983
983
|
session: {
|
|
984
984
|
session: Record<string, any> & {
|
|
985
985
|
id: string;
|
|
@@ -1005,11 +1005,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1005
1005
|
}, {
|
|
1006
1006
|
status: boolean;
|
|
1007
1007
|
}>;
|
|
1008
|
-
readonly updateUser:
|
|
1008
|
+
readonly updateUser: better_call118.StrictEndpoint<"/update-user", {
|
|
1009
1009
|
method: "POST";
|
|
1010
1010
|
operationId: string;
|
|
1011
1011
|
body: zod88.ZodRecord<zod88.ZodString, zod88.ZodAny>;
|
|
1012
|
-
use: ((inputContext:
|
|
1012
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1013
1013
|
session: {
|
|
1014
1014
|
session: Record<string, any> & {
|
|
1015
1015
|
id: string;
|
|
@@ -1085,9 +1085,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1085
1085
|
}, {
|
|
1086
1086
|
status: boolean;
|
|
1087
1087
|
}>;
|
|
1088
|
-
readonly deleteUser:
|
|
1088
|
+
readonly deleteUser: better_call118.StrictEndpoint<"/delete-user", {
|
|
1089
1089
|
method: "POST";
|
|
1090
|
-
use: ((inputContext:
|
|
1090
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1091
1091
|
session: {
|
|
1092
1092
|
session: Record<string, any> & {
|
|
1093
1093
|
id: string;
|
|
@@ -1172,7 +1172,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1172
1172
|
success: boolean;
|
|
1173
1173
|
message: string;
|
|
1174
1174
|
}>;
|
|
1175
|
-
readonly requestPasswordReset:
|
|
1175
|
+
readonly requestPasswordReset: better_call118.StrictEndpoint<"/request-password-reset", {
|
|
1176
1176
|
method: "POST";
|
|
1177
1177
|
body: zod88.ZodObject<{
|
|
1178
1178
|
email: zod88.ZodEmail;
|
|
@@ -1208,13 +1208,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1208
1208
|
status: boolean;
|
|
1209
1209
|
message: string;
|
|
1210
1210
|
}>;
|
|
1211
|
-
readonly requestPasswordResetCallback:
|
|
1211
|
+
readonly requestPasswordResetCallback: better_call118.StrictEndpoint<"/reset-password/:token", {
|
|
1212
1212
|
method: "GET";
|
|
1213
1213
|
operationId: string;
|
|
1214
1214
|
query: zod88.ZodObject<{
|
|
1215
1215
|
callbackURL: zod88.ZodString;
|
|
1216
1216
|
}, zod_v4_core16.$strip>;
|
|
1217
|
-
use: ((inputContext:
|
|
1217
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
1218
1218
|
metadata: {
|
|
1219
1219
|
openapi: {
|
|
1220
1220
|
operationId: string;
|
|
@@ -1256,10 +1256,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1256
1256
|
};
|
|
1257
1257
|
};
|
|
1258
1258
|
}, never>;
|
|
1259
|
-
readonly listSessions:
|
|
1259
|
+
readonly listSessions: better_call118.StrictEndpoint<"/list-sessions", {
|
|
1260
1260
|
method: "GET";
|
|
1261
1261
|
operationId: string;
|
|
1262
|
-
use: ((inputContext:
|
|
1262
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1263
1263
|
session: {
|
|
1264
1264
|
session: Record<string, any> & {
|
|
1265
1265
|
id: string;
|
|
@@ -1314,12 +1314,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1314
1314
|
ipAddress?: string | null | undefined;
|
|
1315
1315
|
userAgent?: string | null | undefined;
|
|
1316
1316
|
} & InferFieldsFromPlugins<Option, "session", "output"> & InferFieldsFromOptions<Option, "session", "output">>>>[]>;
|
|
1317
|
-
readonly revokeSession:
|
|
1317
|
+
readonly revokeSession: better_call118.StrictEndpoint<"/revoke-session", {
|
|
1318
1318
|
method: "POST";
|
|
1319
1319
|
body: zod88.ZodObject<{
|
|
1320
1320
|
token: zod88.ZodString;
|
|
1321
1321
|
}, zod_v4_core16.$strip>;
|
|
1322
|
-
use: ((inputContext:
|
|
1322
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1323
1323
|
session: {
|
|
1324
1324
|
session: Record<string, any> & {
|
|
1325
1325
|
id: string;
|
|
@@ -1386,9 +1386,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1386
1386
|
}, {
|
|
1387
1387
|
status: boolean;
|
|
1388
1388
|
}>;
|
|
1389
|
-
readonly revokeSessions:
|
|
1389
|
+
readonly revokeSessions: better_call118.StrictEndpoint<"/revoke-sessions", {
|
|
1390
1390
|
method: "POST";
|
|
1391
|
-
use: ((inputContext:
|
|
1391
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1392
1392
|
session: {
|
|
1393
1393
|
session: Record<string, any> & {
|
|
1394
1394
|
id: string;
|
|
@@ -1439,10 +1439,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1439
1439
|
}, {
|
|
1440
1440
|
status: boolean;
|
|
1441
1441
|
}>;
|
|
1442
|
-
readonly revokeOtherSessions:
|
|
1442
|
+
readonly revokeOtherSessions: better_call118.StrictEndpoint<"/revoke-other-sessions", {
|
|
1443
1443
|
method: "POST";
|
|
1444
1444
|
requireHeaders: true;
|
|
1445
|
-
use: ((inputContext:
|
|
1445
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1446
1446
|
session: {
|
|
1447
1447
|
session: Record<string, any> & {
|
|
1448
1448
|
id: string;
|
|
@@ -1492,7 +1492,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1492
1492
|
}, {
|
|
1493
1493
|
status: boolean;
|
|
1494
1494
|
}>;
|
|
1495
|
-
readonly linkSocialAccount:
|
|
1495
|
+
readonly linkSocialAccount: better_call118.StrictEndpoint<"/link-social", {
|
|
1496
1496
|
method: "POST";
|
|
1497
1497
|
requireHeaders: true;
|
|
1498
1498
|
body: zod88.ZodObject<{
|
|
@@ -1511,7 +1511,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1511
1511
|
disableRedirect: zod88.ZodOptional<zod88.ZodBoolean>;
|
|
1512
1512
|
additionalData: zod88.ZodOptional<zod88.ZodRecord<zod88.ZodString, zod88.ZodAny>>;
|
|
1513
1513
|
}, zod_v4_core16.$strip>;
|
|
1514
|
-
use: ((inputContext:
|
|
1514
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1515
1515
|
session: {
|
|
1516
1516
|
session: Record<string, any> & {
|
|
1517
1517
|
id: string;
|
|
@@ -1570,9 +1570,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1570
1570
|
url: string;
|
|
1571
1571
|
redirect: boolean;
|
|
1572
1572
|
}>;
|
|
1573
|
-
readonly listUserAccounts:
|
|
1573
|
+
readonly listUserAccounts: better_call118.StrictEndpoint<"/list-accounts", {
|
|
1574
1574
|
method: "GET";
|
|
1575
|
-
use: ((inputContext:
|
|
1575
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1576
1576
|
session: {
|
|
1577
1577
|
session: Record<string, any> & {
|
|
1578
1578
|
id: string;
|
|
@@ -1654,13 +1654,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1654
1654
|
providerId: string;
|
|
1655
1655
|
accountId: string;
|
|
1656
1656
|
}[]>;
|
|
1657
|
-
readonly deleteUserCallback:
|
|
1657
|
+
readonly deleteUserCallback: better_call118.StrictEndpoint<"/delete-user/callback", {
|
|
1658
1658
|
method: "GET";
|
|
1659
1659
|
query: zod88.ZodObject<{
|
|
1660
1660
|
token: zod88.ZodString;
|
|
1661
1661
|
callbackURL: zod88.ZodOptional<zod88.ZodString>;
|
|
1662
1662
|
}, zod_v4_core16.$strip>;
|
|
1663
|
-
use: ((inputContext:
|
|
1663
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
1664
1664
|
metadata: {
|
|
1665
1665
|
openapi: {
|
|
1666
1666
|
description: string;
|
|
@@ -1694,13 +1694,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1694
1694
|
success: boolean;
|
|
1695
1695
|
message: string;
|
|
1696
1696
|
}>;
|
|
1697
|
-
readonly unlinkAccount:
|
|
1697
|
+
readonly unlinkAccount: better_call118.StrictEndpoint<"/unlink-account", {
|
|
1698
1698
|
method: "POST";
|
|
1699
1699
|
body: zod88.ZodObject<{
|
|
1700
1700
|
providerId: zod88.ZodString;
|
|
1701
1701
|
accountId: zod88.ZodOptional<zod88.ZodString>;
|
|
1702
1702
|
}, zod_v4_core16.$strip>;
|
|
1703
|
-
use: ((inputContext:
|
|
1703
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1704
1704
|
session: {
|
|
1705
1705
|
session: Record<string, any> & {
|
|
1706
1706
|
id: string;
|
|
@@ -1748,7 +1748,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1748
1748
|
}, {
|
|
1749
1749
|
status: boolean;
|
|
1750
1750
|
}>;
|
|
1751
|
-
readonly refreshToken:
|
|
1751
|
+
readonly refreshToken: better_call118.StrictEndpoint<"/refresh-token", {
|
|
1752
1752
|
method: "POST";
|
|
1753
1753
|
body: zod88.ZodObject<{
|
|
1754
1754
|
providerId: zod88.ZodString;
|
|
@@ -1807,7 +1807,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1807
1807
|
providerId: string;
|
|
1808
1808
|
accountId: string;
|
|
1809
1809
|
}>;
|
|
1810
|
-
readonly getAccessToken:
|
|
1810
|
+
readonly getAccessToken: better_call118.StrictEndpoint<"/get-access-token", {
|
|
1811
1811
|
method: "POST";
|
|
1812
1812
|
body: zod88.ZodObject<{
|
|
1813
1813
|
providerId: zod88.ZodString;
|
|
@@ -1855,9 +1855,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1855
1855
|
scopes: string[];
|
|
1856
1856
|
idToken: string | undefined;
|
|
1857
1857
|
}>;
|
|
1858
|
-
readonly accountInfo:
|
|
1858
|
+
readonly accountInfo: better_call118.StrictEndpoint<"/account-info", {
|
|
1859
1859
|
method: "GET";
|
|
1860
|
-
use: ((inputContext:
|
|
1860
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
1861
1861
|
session: {
|
|
1862
1862
|
session: Record<string, any> & {
|
|
1863
1863
|
id: string;
|
|
@@ -1945,7 +1945,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1945
1945
|
declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
|
|
1946
1946
|
handler: (request: Request) => Promise<Response>;
|
|
1947
1947
|
endpoints: {
|
|
1948
|
-
readonly ok:
|
|
1948
|
+
readonly ok: better_call118.StrictEndpoint<"/ok", {
|
|
1949
1949
|
method: "GET";
|
|
1950
1950
|
metadata: {
|
|
1951
1951
|
openapi: {
|
|
@@ -1975,7 +1975,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
1975
1975
|
}, {
|
|
1976
1976
|
ok: boolean;
|
|
1977
1977
|
}>;
|
|
1978
|
-
readonly error:
|
|
1978
|
+
readonly error: better_call118.StrictEndpoint<"/error", {
|
|
1979
1979
|
method: "GET";
|
|
1980
1980
|
metadata: {
|
|
1981
1981
|
openapi: {
|
|
@@ -1997,7 +1997,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
1997
1997
|
scope: "server";
|
|
1998
1998
|
};
|
|
1999
1999
|
}, Response>;
|
|
2000
|
-
readonly signInSocial:
|
|
2000
|
+
readonly signInSocial: better_call118.StrictEndpoint<"/sign-in/social", {
|
|
2001
2001
|
method: "POST";
|
|
2002
2002
|
operationId: string;
|
|
2003
2003
|
body: zod88.ZodObject<{
|
|
@@ -2105,7 +2105,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2105
2105
|
image?: string | null | undefined;
|
|
2106
2106
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
2107
2107
|
}>;
|
|
2108
|
-
readonly callbackOAuth:
|
|
2108
|
+
readonly callbackOAuth: better_call118.StrictEndpoint<"/callback/:id", {
|
|
2109
2109
|
method: ("GET" | "POST")[];
|
|
2110
2110
|
operationId: string;
|
|
2111
2111
|
body: zod88.ZodOptional<zod88.ZodObject<{
|
|
@@ -2129,7 +2129,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2129
2129
|
scope: "server";
|
|
2130
2130
|
};
|
|
2131
2131
|
}, void>;
|
|
2132
|
-
readonly getSession:
|
|
2132
|
+
readonly getSession: better_call118.StrictEndpoint<"/get-session", {
|
|
2133
2133
|
method: "GET";
|
|
2134
2134
|
operationId: string;
|
|
2135
2135
|
query: zod88.ZodOptional<zod88.ZodObject<{
|
|
@@ -2186,7 +2186,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2186
2186
|
image?: string | null | undefined;
|
|
2187
2187
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
2188
2188
|
} | null>;
|
|
2189
|
-
readonly signOut:
|
|
2189
|
+
readonly signOut: better_call118.StrictEndpoint<"/sign-out", {
|
|
2190
2190
|
method: "POST";
|
|
2191
2191
|
operationId: string;
|
|
2192
2192
|
requireHeaders: true;
|
|
@@ -2216,10 +2216,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2216
2216
|
}, {
|
|
2217
2217
|
success: boolean;
|
|
2218
2218
|
}>;
|
|
2219
|
-
readonly signUpEmail:
|
|
2219
|
+
readonly signUpEmail: better_call118.StrictEndpoint<"/sign-up/email", {
|
|
2220
2220
|
method: "POST";
|
|
2221
2221
|
operationId: string;
|
|
2222
|
-
use: ((inputContext:
|
|
2222
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
2223
2223
|
body: zod88.ZodIntersection<zod88.ZodObject<{
|
|
2224
2224
|
name: zod88.ZodString;
|
|
2225
2225
|
email: zod88.ZodEmail;
|
|
@@ -2390,10 +2390,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2390
2390
|
image?: string | null | undefined;
|
|
2391
2391
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
2392
2392
|
}>;
|
|
2393
|
-
readonly signInEmail:
|
|
2393
|
+
readonly signInEmail: better_call118.StrictEndpoint<"/sign-in/email", {
|
|
2394
2394
|
method: "POST";
|
|
2395
2395
|
operationId: string;
|
|
2396
|
-
use: ((inputContext:
|
|
2396
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
2397
2397
|
body: zod88.ZodObject<{
|
|
2398
2398
|
email: zod88.ZodString;
|
|
2399
2399
|
password: zod88.ZodString;
|
|
@@ -2475,7 +2475,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2475
2475
|
image?: string | null | undefined;
|
|
2476
2476
|
} & InferFieldsFromPlugins<Option, "user", "output"> & InferFieldsFromOptions<Option, "user", "output">>>;
|
|
2477
2477
|
}>;
|
|
2478
|
-
readonly resetPassword:
|
|
2478
|
+
readonly resetPassword: better_call118.StrictEndpoint<"/reset-password", {
|
|
2479
2479
|
method: "POST";
|
|
2480
2480
|
operationId: string;
|
|
2481
2481
|
query: zod88.ZodOptional<zod88.ZodObject<{
|
|
@@ -2511,7 +2511,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2511
2511
|
}, {
|
|
2512
2512
|
status: boolean;
|
|
2513
2513
|
}>;
|
|
2514
|
-
readonly verifyPassword:
|
|
2514
|
+
readonly verifyPassword: better_call118.StrictEndpoint<"/verify-password", {
|
|
2515
2515
|
method: "POST";
|
|
2516
2516
|
body: zod88.ZodObject<{
|
|
2517
2517
|
password: zod88.ZodString;
|
|
@@ -2540,7 +2540,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2540
2540
|
};
|
|
2541
2541
|
};
|
|
2542
2542
|
};
|
|
2543
|
-
use: ((inputContext:
|
|
2543
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
2544
2544
|
session: {
|
|
2545
2545
|
session: Record<string, any> & {
|
|
2546
2546
|
id: string;
|
|
@@ -2566,14 +2566,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2566
2566
|
}, {
|
|
2567
2567
|
status: boolean;
|
|
2568
2568
|
}>;
|
|
2569
|
-
readonly verifyEmail:
|
|
2569
|
+
readonly verifyEmail: better_call118.StrictEndpoint<"/verify-email", {
|
|
2570
2570
|
method: "GET";
|
|
2571
2571
|
operationId: string;
|
|
2572
2572
|
query: zod88.ZodObject<{
|
|
2573
2573
|
token: zod88.ZodString;
|
|
2574
2574
|
callbackURL: zod88.ZodOptional<zod88.ZodString>;
|
|
2575
2575
|
}, zod_v4_core16.$strip>;
|
|
2576
|
-
use: ((inputContext:
|
|
2576
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
2577
2577
|
metadata: {
|
|
2578
2578
|
openapi: {
|
|
2579
2579
|
description: string;
|
|
@@ -2622,7 +2622,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2622
2622
|
}, void | {
|
|
2623
2623
|
status: boolean;
|
|
2624
2624
|
}>;
|
|
2625
|
-
readonly sendVerificationEmail:
|
|
2625
|
+
readonly sendVerificationEmail: better_call118.StrictEndpoint<"/send-verification-email", {
|
|
2626
2626
|
method: "POST";
|
|
2627
2627
|
operationId: string;
|
|
2628
2628
|
body: zod88.ZodObject<{
|
|
@@ -2697,13 +2697,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2697
2697
|
}, {
|
|
2698
2698
|
status: boolean;
|
|
2699
2699
|
}>;
|
|
2700
|
-
readonly changeEmail:
|
|
2700
|
+
readonly changeEmail: better_call118.StrictEndpoint<"/change-email", {
|
|
2701
2701
|
method: "POST";
|
|
2702
2702
|
body: zod88.ZodObject<{
|
|
2703
2703
|
newEmail: zod88.ZodEmail;
|
|
2704
2704
|
callbackURL: zod88.ZodOptional<zod88.ZodString>;
|
|
2705
2705
|
}, zod_v4_core16.$strip>;
|
|
2706
|
-
use: ((inputContext:
|
|
2706
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
2707
2707
|
session: {
|
|
2708
2708
|
session: Record<string, any> & {
|
|
2709
2709
|
id: string;
|
|
@@ -2778,7 +2778,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2778
2778
|
}, {
|
|
2779
2779
|
status: boolean;
|
|
2780
2780
|
}>;
|
|
2781
|
-
readonly changePassword:
|
|
2781
|
+
readonly changePassword: better_call118.StrictEndpoint<"/change-password", {
|
|
2782
2782
|
method: "POST";
|
|
2783
2783
|
operationId: string;
|
|
2784
2784
|
body: zod88.ZodObject<{
|
|
@@ -2786,7 +2786,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2786
2786
|
currentPassword: zod88.ZodString;
|
|
2787
2787
|
revokeOtherSessions: zod88.ZodOptional<zod88.ZodBoolean>;
|
|
2788
2788
|
}, zod_v4_core16.$strip>;
|
|
2789
|
-
use: ((inputContext:
|
|
2789
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
2790
2790
|
session: {
|
|
2791
2791
|
session: Record<string, any> & {
|
|
2792
2792
|
id: string;
|
|
@@ -2886,12 +2886,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2886
2886
|
image?: string | null | undefined;
|
|
2887
2887
|
} & Record<string, any>;
|
|
2888
2888
|
}>;
|
|
2889
|
-
readonly setPassword:
|
|
2889
|
+
readonly setPassword: better_call118.StrictEndpoint<string, {
|
|
2890
2890
|
method: "POST";
|
|
2891
2891
|
body: zod88.ZodObject<{
|
|
2892
2892
|
newPassword: zod88.ZodString;
|
|
2893
2893
|
}, zod_v4_core16.$strip>;
|
|
2894
|
-
use: ((inputContext:
|
|
2894
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
2895
2895
|
session: {
|
|
2896
2896
|
session: Record<string, any> & {
|
|
2897
2897
|
id: string;
|
|
@@ -2917,11 +2917,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2917
2917
|
}, {
|
|
2918
2918
|
status: boolean;
|
|
2919
2919
|
}>;
|
|
2920
|
-
readonly updateUser:
|
|
2920
|
+
readonly updateUser: better_call118.StrictEndpoint<"/update-user", {
|
|
2921
2921
|
method: "POST";
|
|
2922
2922
|
operationId: string;
|
|
2923
2923
|
body: zod88.ZodRecord<zod88.ZodString, zod88.ZodAny>;
|
|
2924
|
-
use: ((inputContext:
|
|
2924
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
2925
2925
|
session: {
|
|
2926
2926
|
session: Record<string, any> & {
|
|
2927
2927
|
id: string;
|
|
@@ -2997,9 +2997,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2997
2997
|
}, {
|
|
2998
2998
|
status: boolean;
|
|
2999
2999
|
}>;
|
|
3000
|
-
readonly deleteUser:
|
|
3000
|
+
readonly deleteUser: better_call118.StrictEndpoint<"/delete-user", {
|
|
3001
3001
|
method: "POST";
|
|
3002
|
-
use: ((inputContext:
|
|
3002
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3003
3003
|
session: {
|
|
3004
3004
|
session: Record<string, any> & {
|
|
3005
3005
|
id: string;
|
|
@@ -3084,7 +3084,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3084
3084
|
success: boolean;
|
|
3085
3085
|
message: string;
|
|
3086
3086
|
}>;
|
|
3087
|
-
readonly requestPasswordReset:
|
|
3087
|
+
readonly requestPasswordReset: better_call118.StrictEndpoint<"/request-password-reset", {
|
|
3088
3088
|
method: "POST";
|
|
3089
3089
|
body: zod88.ZodObject<{
|
|
3090
3090
|
email: zod88.ZodEmail;
|
|
@@ -3120,13 +3120,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3120
3120
|
status: boolean;
|
|
3121
3121
|
message: string;
|
|
3122
3122
|
}>;
|
|
3123
|
-
readonly requestPasswordResetCallback:
|
|
3123
|
+
readonly requestPasswordResetCallback: better_call118.StrictEndpoint<"/reset-password/:token", {
|
|
3124
3124
|
method: "GET";
|
|
3125
3125
|
operationId: string;
|
|
3126
3126
|
query: zod88.ZodObject<{
|
|
3127
3127
|
callbackURL: zod88.ZodString;
|
|
3128
3128
|
}, zod_v4_core16.$strip>;
|
|
3129
|
-
use: ((inputContext:
|
|
3129
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
3130
3130
|
metadata: {
|
|
3131
3131
|
openapi: {
|
|
3132
3132
|
operationId: string;
|
|
@@ -3168,10 +3168,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3168
3168
|
};
|
|
3169
3169
|
};
|
|
3170
3170
|
}, never>;
|
|
3171
|
-
readonly listSessions:
|
|
3171
|
+
readonly listSessions: better_call118.StrictEndpoint<"/list-sessions", {
|
|
3172
3172
|
method: "GET";
|
|
3173
3173
|
operationId: string;
|
|
3174
|
-
use: ((inputContext:
|
|
3174
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3175
3175
|
session: {
|
|
3176
3176
|
session: Record<string, any> & {
|
|
3177
3177
|
id: string;
|
|
@@ -3226,12 +3226,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3226
3226
|
ipAddress?: string | null | undefined;
|
|
3227
3227
|
userAgent?: string | null | undefined;
|
|
3228
3228
|
} & InferFieldsFromPlugins<Option, "session", "output"> & InferFieldsFromOptions<Option, "session", "output">>>>[]>;
|
|
3229
|
-
readonly revokeSession:
|
|
3229
|
+
readonly revokeSession: better_call118.StrictEndpoint<"/revoke-session", {
|
|
3230
3230
|
method: "POST";
|
|
3231
3231
|
body: zod88.ZodObject<{
|
|
3232
3232
|
token: zod88.ZodString;
|
|
3233
3233
|
}, zod_v4_core16.$strip>;
|
|
3234
|
-
use: ((inputContext:
|
|
3234
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3235
3235
|
session: {
|
|
3236
3236
|
session: Record<string, any> & {
|
|
3237
3237
|
id: string;
|
|
@@ -3298,9 +3298,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3298
3298
|
}, {
|
|
3299
3299
|
status: boolean;
|
|
3300
3300
|
}>;
|
|
3301
|
-
readonly revokeSessions:
|
|
3301
|
+
readonly revokeSessions: better_call118.StrictEndpoint<"/revoke-sessions", {
|
|
3302
3302
|
method: "POST";
|
|
3303
|
-
use: ((inputContext:
|
|
3303
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3304
3304
|
session: {
|
|
3305
3305
|
session: Record<string, any> & {
|
|
3306
3306
|
id: string;
|
|
@@ -3351,10 +3351,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3351
3351
|
}, {
|
|
3352
3352
|
status: boolean;
|
|
3353
3353
|
}>;
|
|
3354
|
-
readonly revokeOtherSessions:
|
|
3354
|
+
readonly revokeOtherSessions: better_call118.StrictEndpoint<"/revoke-other-sessions", {
|
|
3355
3355
|
method: "POST";
|
|
3356
3356
|
requireHeaders: true;
|
|
3357
|
-
use: ((inputContext:
|
|
3357
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3358
3358
|
session: {
|
|
3359
3359
|
session: Record<string, any> & {
|
|
3360
3360
|
id: string;
|
|
@@ -3404,7 +3404,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3404
3404
|
}, {
|
|
3405
3405
|
status: boolean;
|
|
3406
3406
|
}>;
|
|
3407
|
-
readonly linkSocialAccount:
|
|
3407
|
+
readonly linkSocialAccount: better_call118.StrictEndpoint<"/link-social", {
|
|
3408
3408
|
method: "POST";
|
|
3409
3409
|
requireHeaders: true;
|
|
3410
3410
|
body: zod88.ZodObject<{
|
|
@@ -3423,7 +3423,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3423
3423
|
disableRedirect: zod88.ZodOptional<zod88.ZodBoolean>;
|
|
3424
3424
|
additionalData: zod88.ZodOptional<zod88.ZodRecord<zod88.ZodString, zod88.ZodAny>>;
|
|
3425
3425
|
}, zod_v4_core16.$strip>;
|
|
3426
|
-
use: ((inputContext:
|
|
3426
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3427
3427
|
session: {
|
|
3428
3428
|
session: Record<string, any> & {
|
|
3429
3429
|
id: string;
|
|
@@ -3482,9 +3482,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3482
3482
|
url: string;
|
|
3483
3483
|
redirect: boolean;
|
|
3484
3484
|
}>;
|
|
3485
|
-
readonly listUserAccounts:
|
|
3485
|
+
readonly listUserAccounts: better_call118.StrictEndpoint<"/list-accounts", {
|
|
3486
3486
|
method: "GET";
|
|
3487
|
-
use: ((inputContext:
|
|
3487
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3488
3488
|
session: {
|
|
3489
3489
|
session: Record<string, any> & {
|
|
3490
3490
|
id: string;
|
|
@@ -3566,13 +3566,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3566
3566
|
providerId: string;
|
|
3567
3567
|
accountId: string;
|
|
3568
3568
|
}[]>;
|
|
3569
|
-
readonly deleteUserCallback:
|
|
3569
|
+
readonly deleteUserCallback: better_call118.StrictEndpoint<"/delete-user/callback", {
|
|
3570
3570
|
method: "GET";
|
|
3571
3571
|
query: zod88.ZodObject<{
|
|
3572
3572
|
token: zod88.ZodString;
|
|
3573
3573
|
callbackURL: zod88.ZodOptional<zod88.ZodString>;
|
|
3574
3574
|
}, zod_v4_core16.$strip>;
|
|
3575
|
-
use: ((inputContext:
|
|
3575
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<void>)[];
|
|
3576
3576
|
metadata: {
|
|
3577
3577
|
openapi: {
|
|
3578
3578
|
description: string;
|
|
@@ -3606,13 +3606,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3606
3606
|
success: boolean;
|
|
3607
3607
|
message: string;
|
|
3608
3608
|
}>;
|
|
3609
|
-
readonly unlinkAccount:
|
|
3609
|
+
readonly unlinkAccount: better_call118.StrictEndpoint<"/unlink-account", {
|
|
3610
3610
|
method: "POST";
|
|
3611
3611
|
body: zod88.ZodObject<{
|
|
3612
3612
|
providerId: zod88.ZodString;
|
|
3613
3613
|
accountId: zod88.ZodOptional<zod88.ZodString>;
|
|
3614
3614
|
}, zod_v4_core16.$strip>;
|
|
3615
|
-
use: ((inputContext:
|
|
3615
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3616
3616
|
session: {
|
|
3617
3617
|
session: Record<string, any> & {
|
|
3618
3618
|
id: string;
|
|
@@ -3660,7 +3660,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3660
3660
|
}, {
|
|
3661
3661
|
status: boolean;
|
|
3662
3662
|
}>;
|
|
3663
|
-
readonly refreshToken:
|
|
3663
|
+
readonly refreshToken: better_call118.StrictEndpoint<"/refresh-token", {
|
|
3664
3664
|
method: "POST";
|
|
3665
3665
|
body: zod88.ZodObject<{
|
|
3666
3666
|
providerId: zod88.ZodString;
|
|
@@ -3719,7 +3719,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3719
3719
|
providerId: string;
|
|
3720
3720
|
accountId: string;
|
|
3721
3721
|
}>;
|
|
3722
|
-
readonly getAccessToken:
|
|
3722
|
+
readonly getAccessToken: better_call118.StrictEndpoint<"/get-access-token", {
|
|
3723
3723
|
method: "POST";
|
|
3724
3724
|
body: zod88.ZodObject<{
|
|
3725
3725
|
providerId: zod88.ZodString;
|
|
@@ -3767,9 +3767,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3767
3767
|
scopes: string[];
|
|
3768
3768
|
idToken: string | undefined;
|
|
3769
3769
|
}>;
|
|
3770
|
-
readonly accountInfo:
|
|
3770
|
+
readonly accountInfo: better_call118.StrictEndpoint<"/account-info", {
|
|
3771
3771
|
method: "GET";
|
|
3772
|
-
use: ((inputContext:
|
|
3772
|
+
use: ((inputContext: better_call118.MiddlewareInputContext<better_call118.MiddlewareOptions>) => Promise<{
|
|
3773
3773
|
session: {
|
|
3774
3774
|
session: Record<string, any> & {
|
|
3775
3775
|
id: string;
|