better-auth 1.4.7-beta.3 → 1.4.7-beta.4
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 +91 -91
- package/dist/api/index.mjs +1 -1
- package/dist/api/index.mjs.map +1 -1
- package/dist/api/middlewares/origin-check.d.mts +3 -3
- 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/reset-password.d.mts +5 -5
- package/dist/api/routes/session.d.mts +14 -14
- package/dist/api/routes/sign-in.d.mts +3 -3
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +2 -2
- package/dist/api/routes/update-user.d.mts +13 -13
- package/dist/client/lynx/index.d.mts +15 -15
- 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/db/field.d.mts +5 -5
- 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 +3 -3
- package/dist/plugins/api-key/index.d.mts +18 -18
- 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 +3 -3
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +13 -13
- 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 +14 -14
- package/dist/plugins/oauth-proxy/index.d.mts +8 -8
- 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 +4 -4
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/organization/client.d.mts +17 -17
- package/dist/plugins/organization/organization.d.mts +7 -7
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +58 -58
- package/dist/plugins/organization/routes/crud-members.d.mts +62 -62
- package/dist/plugins/organization/routes/crud-org.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-team.d.mts +76 -76
- 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/index.d.mts +18 -18
- package/dist/plugins/two-factor/otp/index.d.mts +3 -3
- package/dist/plugins/username/index.d.mts +12 -12
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +1149 -1149
- package/package.json +4 -4
package/dist/api/index.d.mts
CHANGED
|
@@ -25,7 +25,7 @@ import { AuthContext, BetterAuthOptions, BetterAuthPlugin } from "@better-auth/c
|
|
|
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_call4 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: Promise<AuthContext> | AuthContext, options: Option): {
|
|
36
36
|
api: {
|
|
37
|
-
readonly ok:
|
|
37
|
+
readonly ok: better_call4.StrictEndpoint<"/ok", {
|
|
38
38
|
method: "GET";
|
|
39
39
|
metadata: {
|
|
40
40
|
openapi: {
|
|
@@ -64,7 +64,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
64
64
|
}, {
|
|
65
65
|
ok: boolean;
|
|
66
66
|
}>;
|
|
67
|
-
readonly error:
|
|
67
|
+
readonly error: better_call4.StrictEndpoint<"/error", {
|
|
68
68
|
method: "GET";
|
|
69
69
|
metadata: {
|
|
70
70
|
openapi: {
|
|
@@ -86,7 +86,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
86
86
|
scope: "server";
|
|
87
87
|
};
|
|
88
88
|
}, Response>;
|
|
89
|
-
readonly signInSocial:
|
|
89
|
+
readonly signInSocial: better_call4.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: Promise<Aut
|
|
|
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_call4.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: Promise<Aut
|
|
|
218
218
|
scope: "server";
|
|
219
219
|
};
|
|
220
220
|
}, void>;
|
|
221
|
-
readonly getSession:
|
|
221
|
+
readonly getSession: better_call4.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: Promise<Aut
|
|
|
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_call4.StrictEndpoint<"/sign-out", {
|
|
279
279
|
method: "POST";
|
|
280
280
|
operationId: string;
|
|
281
281
|
requireHeaders: true;
|
|
@@ -305,7 +305,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
305
305
|
}, {
|
|
306
306
|
success: boolean;
|
|
307
307
|
}>;
|
|
308
|
-
readonly signUpEmail:
|
|
308
|
+
readonly signUpEmail: better_call4.StrictEndpoint<"/sign-up/email", {
|
|
309
309
|
method: "POST";
|
|
310
310
|
operationId: string;
|
|
311
311
|
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
@@ -470,7 +470,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
470
470
|
image?: string | null | undefined;
|
|
471
471
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
472
472
|
}>;
|
|
473
|
-
readonly signInEmail:
|
|
473
|
+
readonly signInEmail: better_call4.StrictEndpoint<"/sign-in/email", {
|
|
474
474
|
method: "POST";
|
|
475
475
|
operationId: string;
|
|
476
476
|
body: zod0.ZodObject<{
|
|
@@ -553,7 +553,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
553
553
|
image?: string | null | undefined;
|
|
554
554
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
555
555
|
}>;
|
|
556
|
-
readonly resetPassword:
|
|
556
|
+
readonly resetPassword: better_call4.StrictEndpoint<"/reset-password", {
|
|
557
557
|
method: "POST";
|
|
558
558
|
operationId: string;
|
|
559
559
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -589,14 +589,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
589
589
|
}, {
|
|
590
590
|
status: boolean;
|
|
591
591
|
}>;
|
|
592
|
-
readonly verifyEmail:
|
|
592
|
+
readonly verifyEmail: better_call4.StrictEndpoint<"/verify-email", {
|
|
593
593
|
method: "GET";
|
|
594
594
|
operationId: string;
|
|
595
595
|
query: zod0.ZodObject<{
|
|
596
596
|
token: zod0.ZodString;
|
|
597
597
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
598
598
|
}, zod_v4_core0.$strip>;
|
|
599
|
-
use: ((inputContext:
|
|
599
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
600
600
|
metadata: {
|
|
601
601
|
openapi: {
|
|
602
602
|
description: string;
|
|
@@ -645,7 +645,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
645
645
|
}, void | {
|
|
646
646
|
status: boolean;
|
|
647
647
|
}>;
|
|
648
|
-
readonly sendVerificationEmail:
|
|
648
|
+
readonly sendVerificationEmail: better_call4.StrictEndpoint<"/send-verification-email", {
|
|
649
649
|
method: "POST";
|
|
650
650
|
operationId: string;
|
|
651
651
|
body: zod0.ZodObject<{
|
|
@@ -720,13 +720,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
720
720
|
}, {
|
|
721
721
|
status: boolean;
|
|
722
722
|
}>;
|
|
723
|
-
readonly changeEmail:
|
|
723
|
+
readonly changeEmail: better_call4.StrictEndpoint<"/change-email", {
|
|
724
724
|
method: "POST";
|
|
725
725
|
body: zod0.ZodObject<{
|
|
726
726
|
newEmail: zod0.ZodEmail;
|
|
727
727
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
728
728
|
}, zod_v4_core0.$strip>;
|
|
729
|
-
use: ((inputContext:
|
|
729
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
730
730
|
session: {
|
|
731
731
|
session: Record<string, any> & {
|
|
732
732
|
id: string;
|
|
@@ -801,7 +801,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
801
801
|
}, {
|
|
802
802
|
status: boolean;
|
|
803
803
|
}>;
|
|
804
|
-
readonly changePassword:
|
|
804
|
+
readonly changePassword: better_call4.StrictEndpoint<"/change-password", {
|
|
805
805
|
method: "POST";
|
|
806
806
|
operationId: string;
|
|
807
807
|
body: zod0.ZodObject<{
|
|
@@ -809,7 +809,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
809
809
|
currentPassword: zod0.ZodString;
|
|
810
810
|
revokeOtherSessions: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
811
811
|
}, zod_v4_core0.$strip>;
|
|
812
|
-
use: ((inputContext:
|
|
812
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
813
813
|
session: {
|
|
814
814
|
session: Record<string, any> & {
|
|
815
815
|
id: string;
|
|
@@ -909,12 +909,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
909
909
|
updatedAt: Date;
|
|
910
910
|
};
|
|
911
911
|
}>;
|
|
912
|
-
readonly setPassword:
|
|
912
|
+
readonly setPassword: better_call4.StrictEndpoint<string, {
|
|
913
913
|
method: "POST";
|
|
914
914
|
body: zod0.ZodObject<{
|
|
915
915
|
newPassword: zod0.ZodString;
|
|
916
916
|
}, zod_v4_core0.$strip>;
|
|
917
|
-
use: ((inputContext:
|
|
917
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
918
918
|
session: {
|
|
919
919
|
session: Record<string, any> & {
|
|
920
920
|
id: string;
|
|
@@ -940,11 +940,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
940
940
|
}, {
|
|
941
941
|
status: boolean;
|
|
942
942
|
}>;
|
|
943
|
-
readonly updateUser:
|
|
943
|
+
readonly updateUser: better_call4.StrictEndpoint<"/update-user", {
|
|
944
944
|
method: "POST";
|
|
945
945
|
operationId: string;
|
|
946
946
|
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
947
|
-
use: ((inputContext:
|
|
947
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
948
948
|
session: {
|
|
949
949
|
session: Record<string, any> & {
|
|
950
950
|
id: string;
|
|
@@ -1020,9 +1020,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1020
1020
|
}, {
|
|
1021
1021
|
status: boolean;
|
|
1022
1022
|
}>;
|
|
1023
|
-
readonly deleteUser:
|
|
1023
|
+
readonly deleteUser: better_call4.StrictEndpoint<"/delete-user", {
|
|
1024
1024
|
method: "POST";
|
|
1025
|
-
use: ((inputContext:
|
|
1025
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1026
1026
|
session: {
|
|
1027
1027
|
session: Record<string, any> & {
|
|
1028
1028
|
id: string;
|
|
@@ -1107,7 +1107,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1107
1107
|
success: boolean;
|
|
1108
1108
|
message: string;
|
|
1109
1109
|
}>;
|
|
1110
|
-
readonly requestPasswordReset:
|
|
1110
|
+
readonly requestPasswordReset: better_call4.StrictEndpoint<"/request-password-reset", {
|
|
1111
1111
|
method: "POST";
|
|
1112
1112
|
body: zod0.ZodObject<{
|
|
1113
1113
|
email: zod0.ZodEmail;
|
|
@@ -1143,13 +1143,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1143
1143
|
status: boolean;
|
|
1144
1144
|
message: string;
|
|
1145
1145
|
}>;
|
|
1146
|
-
readonly requestPasswordResetCallback:
|
|
1146
|
+
readonly requestPasswordResetCallback: better_call4.StrictEndpoint<"/reset-password/:token", {
|
|
1147
1147
|
method: "GET";
|
|
1148
1148
|
operationId: string;
|
|
1149
1149
|
query: zod0.ZodObject<{
|
|
1150
1150
|
callbackURL: zod0.ZodString;
|
|
1151
1151
|
}, zod_v4_core0.$strip>;
|
|
1152
|
-
use: ((inputContext:
|
|
1152
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
1153
1153
|
metadata: {
|
|
1154
1154
|
openapi: {
|
|
1155
1155
|
operationId: string;
|
|
@@ -1191,10 +1191,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1191
1191
|
};
|
|
1192
1192
|
};
|
|
1193
1193
|
}, never>;
|
|
1194
|
-
readonly listSessions:
|
|
1194
|
+
readonly listSessions: better_call4.StrictEndpoint<"/list-sessions", {
|
|
1195
1195
|
method: "GET";
|
|
1196
1196
|
operationId: string;
|
|
1197
|
-
use: ((inputContext:
|
|
1197
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1198
1198
|
session: {
|
|
1199
1199
|
session: Record<string, any> & {
|
|
1200
1200
|
id: string;
|
|
@@ -1251,12 +1251,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1251
1251
|
} & (Option extends BetterAuthOptions ? AdditionalSessionFieldsOutput<Option> : Option extends Auth ? AdditionalSessionFieldsOutput<Option["options"]> : {})>> & {
|
|
1252
1252
|
token: undefined;
|
|
1253
1253
|
}>[]>;
|
|
1254
|
-
readonly revokeSession:
|
|
1254
|
+
readonly revokeSession: better_call4.StrictEndpoint<"/revoke-session", {
|
|
1255
1255
|
method: "POST";
|
|
1256
1256
|
body: zod0.ZodObject<{
|
|
1257
1257
|
token: zod0.ZodString;
|
|
1258
1258
|
}, zod_v4_core0.$strip>;
|
|
1259
|
-
use: ((inputContext:
|
|
1259
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1260
1260
|
session: {
|
|
1261
1261
|
session: Record<string, any> & {
|
|
1262
1262
|
id: string;
|
|
@@ -1323,9 +1323,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1323
1323
|
}, {
|
|
1324
1324
|
status: boolean;
|
|
1325
1325
|
}>;
|
|
1326
|
-
readonly revokeSessions:
|
|
1326
|
+
readonly revokeSessions: better_call4.StrictEndpoint<"/revoke-sessions", {
|
|
1327
1327
|
method: "POST";
|
|
1328
|
-
use: ((inputContext:
|
|
1328
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1329
1329
|
session: {
|
|
1330
1330
|
session: Record<string, any> & {
|
|
1331
1331
|
id: string;
|
|
@@ -1376,10 +1376,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1376
1376
|
}, {
|
|
1377
1377
|
status: boolean;
|
|
1378
1378
|
}>;
|
|
1379
|
-
readonly revokeOtherSessions:
|
|
1379
|
+
readonly revokeOtherSessions: better_call4.StrictEndpoint<"/revoke-other-sessions", {
|
|
1380
1380
|
method: "POST";
|
|
1381
1381
|
requireHeaders: true;
|
|
1382
|
-
use: ((inputContext:
|
|
1382
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1383
1383
|
session: {
|
|
1384
1384
|
session: Record<string, any> & {
|
|
1385
1385
|
id: string;
|
|
@@ -1429,7 +1429,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1429
1429
|
}, {
|
|
1430
1430
|
status: boolean;
|
|
1431
1431
|
}>;
|
|
1432
|
-
readonly linkSocialAccount:
|
|
1432
|
+
readonly linkSocialAccount: better_call4.StrictEndpoint<"/link-social", {
|
|
1433
1433
|
method: "POST";
|
|
1434
1434
|
requireHeaders: true;
|
|
1435
1435
|
body: zod0.ZodObject<{
|
|
@@ -1448,7 +1448,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1448
1448
|
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1449
1449
|
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
1450
1450
|
}, zod_v4_core0.$strip>;
|
|
1451
|
-
use: ((inputContext:
|
|
1451
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1452
1452
|
session: {
|
|
1453
1453
|
session: Record<string, any> & {
|
|
1454
1454
|
id: string;
|
|
@@ -1507,9 +1507,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1507
1507
|
url: string;
|
|
1508
1508
|
redirect: boolean;
|
|
1509
1509
|
}>;
|
|
1510
|
-
readonly listUserAccounts:
|
|
1510
|
+
readonly listUserAccounts: better_call4.StrictEndpoint<"/list-accounts", {
|
|
1511
1511
|
method: "GET";
|
|
1512
|
-
use: ((inputContext:
|
|
1512
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1513
1513
|
session: {
|
|
1514
1514
|
session: Record<string, any> & {
|
|
1515
1515
|
id: string;
|
|
@@ -1591,13 +1591,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1591
1591
|
userId: string;
|
|
1592
1592
|
scopes: string[];
|
|
1593
1593
|
}[]>;
|
|
1594
|
-
readonly deleteUserCallback:
|
|
1594
|
+
readonly deleteUserCallback: better_call4.StrictEndpoint<"/delete-user/callback", {
|
|
1595
1595
|
method: "GET";
|
|
1596
1596
|
query: zod0.ZodObject<{
|
|
1597
1597
|
token: zod0.ZodString;
|
|
1598
1598
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1599
1599
|
}, zod_v4_core0.$strip>;
|
|
1600
|
-
use: ((inputContext:
|
|
1600
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
1601
1601
|
metadata: {
|
|
1602
1602
|
openapi: {
|
|
1603
1603
|
description: string;
|
|
@@ -1631,13 +1631,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1631
1631
|
success: boolean;
|
|
1632
1632
|
message: string;
|
|
1633
1633
|
}>;
|
|
1634
|
-
readonly unlinkAccount:
|
|
1634
|
+
readonly unlinkAccount: better_call4.StrictEndpoint<"/unlink-account", {
|
|
1635
1635
|
method: "POST";
|
|
1636
1636
|
body: zod0.ZodObject<{
|
|
1637
1637
|
providerId: zod0.ZodString;
|
|
1638
1638
|
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
1639
1639
|
}, zod_v4_core0.$strip>;
|
|
1640
|
-
use: ((inputContext:
|
|
1640
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1641
1641
|
session: {
|
|
1642
1642
|
session: Record<string, any> & {
|
|
1643
1643
|
id: string;
|
|
@@ -1685,7 +1685,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1685
1685
|
}, {
|
|
1686
1686
|
status: boolean;
|
|
1687
1687
|
}>;
|
|
1688
|
-
readonly refreshToken:
|
|
1688
|
+
readonly refreshToken: better_call4.StrictEndpoint<"/refresh-token", {
|
|
1689
1689
|
method: "POST";
|
|
1690
1690
|
body: zod0.ZodObject<{
|
|
1691
1691
|
providerId: zod0.ZodString;
|
|
@@ -1744,7 +1744,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1744
1744
|
providerId: string;
|
|
1745
1745
|
accountId: string;
|
|
1746
1746
|
}>;
|
|
1747
|
-
readonly getAccessToken:
|
|
1747
|
+
readonly getAccessToken: better_call4.StrictEndpoint<"/get-access-token", {
|
|
1748
1748
|
method: "POST";
|
|
1749
1749
|
body: zod0.ZodObject<{
|
|
1750
1750
|
providerId: zod0.ZodString;
|
|
@@ -1799,9 +1799,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1799
1799
|
scopes: string[];
|
|
1800
1800
|
idToken: string | undefined;
|
|
1801
1801
|
}>;
|
|
1802
|
-
readonly accountInfo:
|
|
1802
|
+
readonly accountInfo: better_call4.StrictEndpoint<"/account-info", {
|
|
1803
1803
|
method: "GET";
|
|
1804
|
-
use: ((inputContext:
|
|
1804
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1805
1805
|
session: {
|
|
1806
1806
|
session: Record<string, any> & {
|
|
1807
1807
|
id: string;
|
|
@@ -1889,7 +1889,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Promise<Aut
|
|
|
1889
1889
|
declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
|
|
1890
1890
|
handler: (request: Request) => Promise<Response>;
|
|
1891
1891
|
endpoints: {
|
|
1892
|
-
readonly ok:
|
|
1892
|
+
readonly ok: better_call4.StrictEndpoint<"/ok", {
|
|
1893
1893
|
method: "GET";
|
|
1894
1894
|
metadata: {
|
|
1895
1895
|
openapi: {
|
|
@@ -1919,7 +1919,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
1919
1919
|
}, {
|
|
1920
1920
|
ok: boolean;
|
|
1921
1921
|
}>;
|
|
1922
|
-
readonly error:
|
|
1922
|
+
readonly error: better_call4.StrictEndpoint<"/error", {
|
|
1923
1923
|
method: "GET";
|
|
1924
1924
|
metadata: {
|
|
1925
1925
|
openapi: {
|
|
@@ -1941,7 +1941,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
1941
1941
|
scope: "server";
|
|
1942
1942
|
};
|
|
1943
1943
|
}, Response>;
|
|
1944
|
-
readonly signInSocial:
|
|
1944
|
+
readonly signInSocial: better_call4.StrictEndpoint<"/sign-in/social", {
|
|
1945
1945
|
method: "POST";
|
|
1946
1946
|
operationId: string;
|
|
1947
1947
|
body: zod0.ZodObject<{
|
|
@@ -2049,7 +2049,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2049
2049
|
image?: string | null | undefined;
|
|
2050
2050
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2051
2051
|
}>;
|
|
2052
|
-
readonly callbackOAuth:
|
|
2052
|
+
readonly callbackOAuth: better_call4.StrictEndpoint<"/callback/:id", {
|
|
2053
2053
|
method: ("GET" | "POST")[];
|
|
2054
2054
|
operationId: string;
|
|
2055
2055
|
body: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -2073,7 +2073,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2073
2073
|
scope: "server";
|
|
2074
2074
|
};
|
|
2075
2075
|
}, void>;
|
|
2076
|
-
readonly getSession:
|
|
2076
|
+
readonly getSession: better_call4.StrictEndpoint<"/get-session", {
|
|
2077
2077
|
method: "GET";
|
|
2078
2078
|
operationId: string;
|
|
2079
2079
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -2130,7 +2130,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2130
2130
|
image?: string | null | undefined;
|
|
2131
2131
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2132
2132
|
} | null>;
|
|
2133
|
-
readonly signOut:
|
|
2133
|
+
readonly signOut: better_call4.StrictEndpoint<"/sign-out", {
|
|
2134
2134
|
method: "POST";
|
|
2135
2135
|
operationId: string;
|
|
2136
2136
|
requireHeaders: true;
|
|
@@ -2160,7 +2160,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2160
2160
|
}, {
|
|
2161
2161
|
success: boolean;
|
|
2162
2162
|
}>;
|
|
2163
|
-
readonly signUpEmail:
|
|
2163
|
+
readonly signUpEmail: better_call4.StrictEndpoint<"/sign-up/email", {
|
|
2164
2164
|
method: "POST";
|
|
2165
2165
|
operationId: string;
|
|
2166
2166
|
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
@@ -2325,7 +2325,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2325
2325
|
image?: string | null | undefined;
|
|
2326
2326
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2327
2327
|
}>;
|
|
2328
|
-
readonly signInEmail:
|
|
2328
|
+
readonly signInEmail: better_call4.StrictEndpoint<"/sign-in/email", {
|
|
2329
2329
|
method: "POST";
|
|
2330
2330
|
operationId: string;
|
|
2331
2331
|
body: zod0.ZodObject<{
|
|
@@ -2408,7 +2408,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2408
2408
|
image?: string | null | undefined;
|
|
2409
2409
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2410
2410
|
}>;
|
|
2411
|
-
readonly resetPassword:
|
|
2411
|
+
readonly resetPassword: better_call4.StrictEndpoint<"/reset-password", {
|
|
2412
2412
|
method: "POST";
|
|
2413
2413
|
operationId: string;
|
|
2414
2414
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -2444,14 +2444,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2444
2444
|
}, {
|
|
2445
2445
|
status: boolean;
|
|
2446
2446
|
}>;
|
|
2447
|
-
readonly verifyEmail:
|
|
2447
|
+
readonly verifyEmail: better_call4.StrictEndpoint<"/verify-email", {
|
|
2448
2448
|
method: "GET";
|
|
2449
2449
|
operationId: string;
|
|
2450
2450
|
query: zod0.ZodObject<{
|
|
2451
2451
|
token: zod0.ZodString;
|
|
2452
2452
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2453
2453
|
}, zod_v4_core0.$strip>;
|
|
2454
|
-
use: ((inputContext:
|
|
2454
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
2455
2455
|
metadata: {
|
|
2456
2456
|
openapi: {
|
|
2457
2457
|
description: string;
|
|
@@ -2500,7 +2500,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2500
2500
|
}, void | {
|
|
2501
2501
|
status: boolean;
|
|
2502
2502
|
}>;
|
|
2503
|
-
readonly sendVerificationEmail:
|
|
2503
|
+
readonly sendVerificationEmail: better_call4.StrictEndpoint<"/send-verification-email", {
|
|
2504
2504
|
method: "POST";
|
|
2505
2505
|
operationId: string;
|
|
2506
2506
|
body: zod0.ZodObject<{
|
|
@@ -2575,13 +2575,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2575
2575
|
}, {
|
|
2576
2576
|
status: boolean;
|
|
2577
2577
|
}>;
|
|
2578
|
-
readonly changeEmail:
|
|
2578
|
+
readonly changeEmail: better_call4.StrictEndpoint<"/change-email", {
|
|
2579
2579
|
method: "POST";
|
|
2580
2580
|
body: zod0.ZodObject<{
|
|
2581
2581
|
newEmail: zod0.ZodEmail;
|
|
2582
2582
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2583
2583
|
}, zod_v4_core0.$strip>;
|
|
2584
|
-
use: ((inputContext:
|
|
2584
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2585
2585
|
session: {
|
|
2586
2586
|
session: Record<string, any> & {
|
|
2587
2587
|
id: string;
|
|
@@ -2656,7 +2656,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2656
2656
|
}, {
|
|
2657
2657
|
status: boolean;
|
|
2658
2658
|
}>;
|
|
2659
|
-
readonly changePassword:
|
|
2659
|
+
readonly changePassword: better_call4.StrictEndpoint<"/change-password", {
|
|
2660
2660
|
method: "POST";
|
|
2661
2661
|
operationId: string;
|
|
2662
2662
|
body: zod0.ZodObject<{
|
|
@@ -2664,7 +2664,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2664
2664
|
currentPassword: zod0.ZodString;
|
|
2665
2665
|
revokeOtherSessions: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2666
2666
|
}, zod_v4_core0.$strip>;
|
|
2667
|
-
use: ((inputContext:
|
|
2667
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2668
2668
|
session: {
|
|
2669
2669
|
session: Record<string, any> & {
|
|
2670
2670
|
id: string;
|
|
@@ -2764,12 +2764,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2764
2764
|
updatedAt: Date;
|
|
2765
2765
|
};
|
|
2766
2766
|
}>;
|
|
2767
|
-
readonly setPassword:
|
|
2767
|
+
readonly setPassword: better_call4.StrictEndpoint<string, {
|
|
2768
2768
|
method: "POST";
|
|
2769
2769
|
body: zod0.ZodObject<{
|
|
2770
2770
|
newPassword: zod0.ZodString;
|
|
2771
2771
|
}, zod_v4_core0.$strip>;
|
|
2772
|
-
use: ((inputContext:
|
|
2772
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2773
2773
|
session: {
|
|
2774
2774
|
session: Record<string, any> & {
|
|
2775
2775
|
id: string;
|
|
@@ -2795,11 +2795,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2795
2795
|
}, {
|
|
2796
2796
|
status: boolean;
|
|
2797
2797
|
}>;
|
|
2798
|
-
readonly updateUser:
|
|
2798
|
+
readonly updateUser: better_call4.StrictEndpoint<"/update-user", {
|
|
2799
2799
|
method: "POST";
|
|
2800
2800
|
operationId: string;
|
|
2801
2801
|
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
2802
|
-
use: ((inputContext:
|
|
2802
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2803
2803
|
session: {
|
|
2804
2804
|
session: Record<string, any> & {
|
|
2805
2805
|
id: string;
|
|
@@ -2875,9 +2875,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2875
2875
|
}, {
|
|
2876
2876
|
status: boolean;
|
|
2877
2877
|
}>;
|
|
2878
|
-
readonly deleteUser:
|
|
2878
|
+
readonly deleteUser: better_call4.StrictEndpoint<"/delete-user", {
|
|
2879
2879
|
method: "POST";
|
|
2880
|
-
use: ((inputContext:
|
|
2880
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2881
2881
|
session: {
|
|
2882
2882
|
session: Record<string, any> & {
|
|
2883
2883
|
id: string;
|
|
@@ -2962,7 +2962,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2962
2962
|
success: boolean;
|
|
2963
2963
|
message: string;
|
|
2964
2964
|
}>;
|
|
2965
|
-
readonly requestPasswordReset:
|
|
2965
|
+
readonly requestPasswordReset: better_call4.StrictEndpoint<"/request-password-reset", {
|
|
2966
2966
|
method: "POST";
|
|
2967
2967
|
body: zod0.ZodObject<{
|
|
2968
2968
|
email: zod0.ZodEmail;
|
|
@@ -2998,13 +2998,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2998
2998
|
status: boolean;
|
|
2999
2999
|
message: string;
|
|
3000
3000
|
}>;
|
|
3001
|
-
readonly requestPasswordResetCallback:
|
|
3001
|
+
readonly requestPasswordResetCallback: better_call4.StrictEndpoint<"/reset-password/:token", {
|
|
3002
3002
|
method: "GET";
|
|
3003
3003
|
operationId: string;
|
|
3004
3004
|
query: zod0.ZodObject<{
|
|
3005
3005
|
callbackURL: zod0.ZodString;
|
|
3006
3006
|
}, zod_v4_core0.$strip>;
|
|
3007
|
-
use: ((inputContext:
|
|
3007
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
3008
3008
|
metadata: {
|
|
3009
3009
|
openapi: {
|
|
3010
3010
|
operationId: string;
|
|
@@ -3046,10 +3046,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3046
3046
|
};
|
|
3047
3047
|
};
|
|
3048
3048
|
}, never>;
|
|
3049
|
-
readonly listSessions:
|
|
3049
|
+
readonly listSessions: better_call4.StrictEndpoint<"/list-sessions", {
|
|
3050
3050
|
method: "GET";
|
|
3051
3051
|
operationId: string;
|
|
3052
|
-
use: ((inputContext:
|
|
3052
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3053
3053
|
session: {
|
|
3054
3054
|
session: Record<string, any> & {
|
|
3055
3055
|
id: string;
|
|
@@ -3106,12 +3106,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3106
3106
|
} & (Option extends BetterAuthOptions ? AdditionalSessionFieldsOutput<Option> : Option extends Auth ? AdditionalSessionFieldsOutput<Option["options"]> : {})>> & {
|
|
3107
3107
|
token: undefined;
|
|
3108
3108
|
}>[]>;
|
|
3109
|
-
readonly revokeSession:
|
|
3109
|
+
readonly revokeSession: better_call4.StrictEndpoint<"/revoke-session", {
|
|
3110
3110
|
method: "POST";
|
|
3111
3111
|
body: zod0.ZodObject<{
|
|
3112
3112
|
token: zod0.ZodString;
|
|
3113
3113
|
}, zod_v4_core0.$strip>;
|
|
3114
|
-
use: ((inputContext:
|
|
3114
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3115
3115
|
session: {
|
|
3116
3116
|
session: Record<string, any> & {
|
|
3117
3117
|
id: string;
|
|
@@ -3178,9 +3178,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3178
3178
|
}, {
|
|
3179
3179
|
status: boolean;
|
|
3180
3180
|
}>;
|
|
3181
|
-
readonly revokeSessions:
|
|
3181
|
+
readonly revokeSessions: better_call4.StrictEndpoint<"/revoke-sessions", {
|
|
3182
3182
|
method: "POST";
|
|
3183
|
-
use: ((inputContext:
|
|
3183
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3184
3184
|
session: {
|
|
3185
3185
|
session: Record<string, any> & {
|
|
3186
3186
|
id: string;
|
|
@@ -3231,10 +3231,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3231
3231
|
}, {
|
|
3232
3232
|
status: boolean;
|
|
3233
3233
|
}>;
|
|
3234
|
-
readonly revokeOtherSessions:
|
|
3234
|
+
readonly revokeOtherSessions: better_call4.StrictEndpoint<"/revoke-other-sessions", {
|
|
3235
3235
|
method: "POST";
|
|
3236
3236
|
requireHeaders: true;
|
|
3237
|
-
use: ((inputContext:
|
|
3237
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3238
3238
|
session: {
|
|
3239
3239
|
session: Record<string, any> & {
|
|
3240
3240
|
id: string;
|
|
@@ -3284,7 +3284,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3284
3284
|
}, {
|
|
3285
3285
|
status: boolean;
|
|
3286
3286
|
}>;
|
|
3287
|
-
readonly linkSocialAccount:
|
|
3287
|
+
readonly linkSocialAccount: better_call4.StrictEndpoint<"/link-social", {
|
|
3288
3288
|
method: "POST";
|
|
3289
3289
|
requireHeaders: true;
|
|
3290
3290
|
body: zod0.ZodObject<{
|
|
@@ -3303,7 +3303,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3303
3303
|
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
3304
3304
|
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
3305
3305
|
}, zod_v4_core0.$strip>;
|
|
3306
|
-
use: ((inputContext:
|
|
3306
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3307
3307
|
session: {
|
|
3308
3308
|
session: Record<string, any> & {
|
|
3309
3309
|
id: string;
|
|
@@ -3362,9 +3362,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3362
3362
|
url: string;
|
|
3363
3363
|
redirect: boolean;
|
|
3364
3364
|
}>;
|
|
3365
|
-
readonly listUserAccounts:
|
|
3365
|
+
readonly listUserAccounts: better_call4.StrictEndpoint<"/list-accounts", {
|
|
3366
3366
|
method: "GET";
|
|
3367
|
-
use: ((inputContext:
|
|
3367
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3368
3368
|
session: {
|
|
3369
3369
|
session: Record<string, any> & {
|
|
3370
3370
|
id: string;
|
|
@@ -3446,13 +3446,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3446
3446
|
userId: string;
|
|
3447
3447
|
scopes: string[];
|
|
3448
3448
|
}[]>;
|
|
3449
|
-
readonly deleteUserCallback:
|
|
3449
|
+
readonly deleteUserCallback: better_call4.StrictEndpoint<"/delete-user/callback", {
|
|
3450
3450
|
method: "GET";
|
|
3451
3451
|
query: zod0.ZodObject<{
|
|
3452
3452
|
token: zod0.ZodString;
|
|
3453
3453
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
3454
3454
|
}, zod_v4_core0.$strip>;
|
|
3455
|
-
use: ((inputContext:
|
|
3455
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
3456
3456
|
metadata: {
|
|
3457
3457
|
openapi: {
|
|
3458
3458
|
description: string;
|
|
@@ -3486,13 +3486,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3486
3486
|
success: boolean;
|
|
3487
3487
|
message: string;
|
|
3488
3488
|
}>;
|
|
3489
|
-
readonly unlinkAccount:
|
|
3489
|
+
readonly unlinkAccount: better_call4.StrictEndpoint<"/unlink-account", {
|
|
3490
3490
|
method: "POST";
|
|
3491
3491
|
body: zod0.ZodObject<{
|
|
3492
3492
|
providerId: zod0.ZodString;
|
|
3493
3493
|
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
3494
3494
|
}, zod_v4_core0.$strip>;
|
|
3495
|
-
use: ((inputContext:
|
|
3495
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3496
3496
|
session: {
|
|
3497
3497
|
session: Record<string, any> & {
|
|
3498
3498
|
id: string;
|
|
@@ -3540,7 +3540,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3540
3540
|
}, {
|
|
3541
3541
|
status: boolean;
|
|
3542
3542
|
}>;
|
|
3543
|
-
readonly refreshToken:
|
|
3543
|
+
readonly refreshToken: better_call4.StrictEndpoint<"/refresh-token", {
|
|
3544
3544
|
method: "POST";
|
|
3545
3545
|
body: zod0.ZodObject<{
|
|
3546
3546
|
providerId: zod0.ZodString;
|
|
@@ -3599,7 +3599,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3599
3599
|
providerId: string;
|
|
3600
3600
|
accountId: string;
|
|
3601
3601
|
}>;
|
|
3602
|
-
readonly getAccessToken:
|
|
3602
|
+
readonly getAccessToken: better_call4.StrictEndpoint<"/get-access-token", {
|
|
3603
3603
|
method: "POST";
|
|
3604
3604
|
body: zod0.ZodObject<{
|
|
3605
3605
|
providerId: zod0.ZodString;
|
|
@@ -3654,9 +3654,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3654
3654
|
scopes: string[];
|
|
3655
3655
|
idToken: string | undefined;
|
|
3656
3656
|
}>;
|
|
3657
|
-
readonly accountInfo:
|
|
3657
|
+
readonly accountInfo: better_call4.StrictEndpoint<"/account-info", {
|
|
3658
3658
|
method: "GET";
|
|
3659
|
-
use: ((inputContext:
|
|
3659
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3660
3660
|
session: {
|
|
3661
3661
|
session: Record<string, any> & {
|
|
3662
3662
|
id: string;
|