@podosoft/podokit-api-client 0.10.0 → 0.10.2
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/README.md +1 -1
- package/dist/index.d.ts +212 -2013
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
120
120
|
hooks: {
|
|
121
121
|
after: {
|
|
122
122
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
123
|
-
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/
|
|
123
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>>;
|
|
124
124
|
}[];
|
|
125
125
|
};
|
|
126
126
|
endpoints: {
|
|
@@ -133,7 +133,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
133
133
|
requireHeaders: true;
|
|
134
134
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
135
135
|
session: {
|
|
136
|
-
user: import("better-auth/
|
|
136
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
137
137
|
session: {
|
|
138
138
|
id: string;
|
|
139
139
|
createdAt: Date;
|
|
@@ -177,7 +177,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
177
177
|
};
|
|
178
178
|
};
|
|
179
179
|
}, {
|
|
180
|
-
user: import("better-auth/
|
|
180
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
181
181
|
}>;
|
|
182
182
|
getUser: import("better-call").StrictEndpoint<"/admin/get-user", {
|
|
183
183
|
method: "GET";
|
|
@@ -186,7 +186,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
186
186
|
}, import("zod/v4/core").$strip>;
|
|
187
187
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
188
188
|
session: {
|
|
189
|
-
user: import("better-auth/
|
|
189
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
190
190
|
session: {
|
|
191
191
|
id: string;
|
|
192
192
|
createdAt: Date;
|
|
@@ -223,7 +223,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
223
223
|
};
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
}, import("better-auth/
|
|
226
|
+
}, import("better-auth/plugins").UserWithRole>;
|
|
227
227
|
createUser: import("better-call").StrictEndpoint<"/admin/create-user", {
|
|
228
228
|
method: "POST";
|
|
229
229
|
body: import("zod").ZodObject<{
|
|
@@ -267,7 +267,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
267
267
|
};
|
|
268
268
|
};
|
|
269
269
|
}, {
|
|
270
|
-
user: import("better-auth/
|
|
270
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
271
271
|
}>;
|
|
272
272
|
adminUpdateUser: import("better-call").StrictEndpoint<"/admin/update-user", {
|
|
273
273
|
method: "POST";
|
|
@@ -277,7 +277,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
277
277
|
}, import("zod/v4/core").$strip>;
|
|
278
278
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
279
279
|
session: {
|
|
280
|
-
user: import("better-auth/
|
|
280
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
281
281
|
session: {
|
|
282
282
|
id: string;
|
|
283
283
|
createdAt: Date;
|
|
@@ -314,12 +314,12 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
314
314
|
};
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
|
-
}, import("better-auth/
|
|
317
|
+
}, import("better-auth/plugins").UserWithRole>;
|
|
318
318
|
listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
|
|
319
319
|
method: "GET";
|
|
320
320
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
321
321
|
session: {
|
|
322
|
-
user: import("better-auth/
|
|
322
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
323
323
|
session: {
|
|
324
324
|
id: string;
|
|
325
325
|
createdAt: Date;
|
|
@@ -404,14 +404,14 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
406
|
}, {
|
|
407
|
-
users: import("better-auth/
|
|
407
|
+
users: import("better-auth/plugins").UserWithRole[];
|
|
408
408
|
total: number;
|
|
409
409
|
}>;
|
|
410
410
|
listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
|
|
411
411
|
method: "POST";
|
|
412
412
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
413
413
|
session: {
|
|
414
|
-
user: import("better-auth/
|
|
414
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
415
415
|
session: {
|
|
416
416
|
id: string;
|
|
417
417
|
createdAt: Date;
|
|
@@ -455,7 +455,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
455
455
|
};
|
|
456
456
|
};
|
|
457
457
|
}, {
|
|
458
|
-
sessions: import("better-auth/
|
|
458
|
+
sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
|
|
459
459
|
}>;
|
|
460
460
|
unbanUser: import("better-call").StrictEndpoint<"/admin/unban-user", {
|
|
461
461
|
method: "POST";
|
|
@@ -464,7 +464,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
464
464
|
}, import("zod/v4/core").$strip>;
|
|
465
465
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
466
466
|
session: {
|
|
467
|
-
user: import("better-auth/
|
|
467
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
468
468
|
session: {
|
|
469
469
|
id: string;
|
|
470
470
|
createdAt: Date;
|
|
@@ -502,7 +502,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
502
502
|
};
|
|
503
503
|
};
|
|
504
504
|
}, {
|
|
505
|
-
user: import("better-auth/
|
|
505
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
506
506
|
}>;
|
|
507
507
|
banUser: import("better-call").StrictEndpoint<"/admin/ban-user", {
|
|
508
508
|
method: "POST";
|
|
@@ -513,7 +513,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
513
513
|
}, import("zod/v4/core").$strip>;
|
|
514
514
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
515
515
|
session: {
|
|
516
|
-
user: import("better-auth/
|
|
516
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
517
517
|
session: {
|
|
518
518
|
id: string;
|
|
519
519
|
createdAt: Date;
|
|
@@ -551,7 +551,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
551
551
|
};
|
|
552
552
|
};
|
|
553
553
|
}, {
|
|
554
|
-
user: import("better-auth/
|
|
554
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
555
555
|
}>;
|
|
556
556
|
impersonateUser: import("better-call").StrictEndpoint<"/admin/impersonate-user", {
|
|
557
557
|
method: "POST";
|
|
@@ -560,7 +560,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
560
560
|
}, import("zod/v4/core").$strip>;
|
|
561
561
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
562
562
|
session: {
|
|
563
|
-
user: import("better-auth/
|
|
563
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
564
564
|
session: {
|
|
565
565
|
id: string;
|
|
566
566
|
createdAt: Date;
|
|
@@ -611,7 +611,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
611
611
|
ipAddress?: string | null | undefined;
|
|
612
612
|
userAgent?: string | null | undefined;
|
|
613
613
|
};
|
|
614
|
-
user: import("better-auth/
|
|
614
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
615
615
|
}>;
|
|
616
616
|
stopImpersonating: import("better-call").StrictEndpoint<"/admin/stop-impersonating", {
|
|
617
617
|
method: "POST";
|
|
@@ -644,7 +644,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
644
644
|
}, import("zod/v4/core").$strip>;
|
|
645
645
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
646
646
|
session: {
|
|
647
|
-
user: import("better-auth/
|
|
647
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
648
648
|
session: {
|
|
649
649
|
id: string;
|
|
650
650
|
createdAt: Date;
|
|
@@ -691,7 +691,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
691
691
|
}, import("zod/v4/core").$strip>;
|
|
692
692
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
693
693
|
session: {
|
|
694
|
-
user: import("better-auth/
|
|
694
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
695
695
|
session: {
|
|
696
696
|
id: string;
|
|
697
697
|
createdAt: Date;
|
|
@@ -738,7 +738,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
738
738
|
}, import("zod/v4/core").$strip>;
|
|
739
739
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
740
740
|
session: {
|
|
741
|
-
user: import("better-auth/
|
|
741
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
742
742
|
session: {
|
|
743
743
|
id: string;
|
|
744
744
|
createdAt: Date;
|
|
@@ -786,7 +786,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
786
786
|
}, import("zod/v4/core").$strip>;
|
|
787
787
|
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
788
788
|
session: {
|
|
789
|
-
user: import("better-auth/
|
|
789
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
790
790
|
session: {
|
|
791
791
|
id: string;
|
|
792
792
|
createdAt: Date;
|
|
@@ -956,13 +956,13 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
956
956
|
};
|
|
957
957
|
};
|
|
958
958
|
options: NoInfer<{
|
|
959
|
-
ac: import("better-auth/
|
|
959
|
+
ac: import("better-auth/plugins").AccessControl<{
|
|
960
960
|
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
|
|
961
961
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
962
962
|
}>;
|
|
963
963
|
roles: {
|
|
964
|
-
admin: import("better-auth/
|
|
965
|
-
user: import("better-auth/
|
|
964
|
+
admin: import("better-auth/plugins").Role;
|
|
965
|
+
user: import("better-auth/plugins").Role;
|
|
966
966
|
};
|
|
967
967
|
}>;
|
|
968
968
|
};
|
|
@@ -1015,1768 +1015,106 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
1015
1015
|
} | {
|
|
1016
1016
|
id: "two-factor";
|
|
1017
1017
|
version: string;
|
|
1018
|
-
$InferServerPlugin: ReturnType<
|
|
1019
|
-
id: "two-factor";
|
|
1020
|
-
version: string;
|
|
1021
|
-
endpoints: {
|
|
1022
|
-
enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
|
|
1023
|
-
method: "POST";
|
|
1024
|
-
body: import("zod").ZodObject<{
|
|
1025
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1026
|
-
method: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1027
|
-
otp: "otp";
|
|
1028
|
-
totp: "totp";
|
|
1029
|
-
}>>;
|
|
1030
|
-
issuer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1031
|
-
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
1032
|
-
password: import("zod").ZodString;
|
|
1033
|
-
method: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1034
|
-
otp: "otp";
|
|
1035
|
-
totp: "totp";
|
|
1036
|
-
}>>;
|
|
1037
|
-
issuer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1038
|
-
}, import("zod/v4/core").$strip>;
|
|
1039
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1040
|
-
session: {
|
|
1041
|
-
session: Record<string, any> & {
|
|
1042
|
-
id: string;
|
|
1043
|
-
createdAt: Date;
|
|
1044
|
-
updatedAt: Date;
|
|
1045
|
-
userId: string;
|
|
1046
|
-
expiresAt: Date;
|
|
1047
|
-
token: string;
|
|
1048
|
-
ipAddress?: string | null | undefined;
|
|
1049
|
-
userAgent?: string | null | undefined;
|
|
1050
|
-
};
|
|
1051
|
-
user: Record<string, any> & {
|
|
1052
|
-
id: string;
|
|
1053
|
-
createdAt: Date;
|
|
1054
|
-
updatedAt: Date;
|
|
1055
|
-
email: string;
|
|
1056
|
-
emailVerified: boolean;
|
|
1057
|
-
name: string;
|
|
1058
|
-
image?: string | null | undefined;
|
|
1059
|
-
};
|
|
1060
|
-
};
|
|
1061
|
-
}>>[];
|
|
1062
|
-
metadata: {
|
|
1063
|
-
openapi: {
|
|
1064
|
-
summary: string;
|
|
1065
|
-
description: string;
|
|
1066
|
-
responses: {
|
|
1067
|
-
200: {
|
|
1068
|
-
description: string;
|
|
1069
|
-
content: {
|
|
1070
|
-
"application/json": {
|
|
1071
|
-
schema: {
|
|
1072
|
-
type: "object";
|
|
1073
|
-
properties: {
|
|
1074
|
-
method: {
|
|
1075
|
-
type: string;
|
|
1076
|
-
enum: string[];
|
|
1077
|
-
description: string;
|
|
1078
|
-
};
|
|
1079
|
-
totpURI: {
|
|
1080
|
-
type: string;
|
|
1081
|
-
description: string;
|
|
1082
|
-
};
|
|
1083
|
-
backupCodes: {
|
|
1084
|
-
type: string;
|
|
1085
|
-
items: {
|
|
1086
|
-
type: string;
|
|
1087
|
-
};
|
|
1088
|
-
description: string;
|
|
1089
|
-
};
|
|
1090
|
-
};
|
|
1091
|
-
required: string[];
|
|
1092
|
-
};
|
|
1093
|
-
};
|
|
1094
|
-
};
|
|
1095
|
-
};
|
|
1096
|
-
};
|
|
1097
|
-
};
|
|
1098
|
-
};
|
|
1099
|
-
}, {
|
|
1100
|
-
method: "otp";
|
|
1101
|
-
} | {
|
|
1102
|
-
method: "totp";
|
|
1103
|
-
totpURI: string;
|
|
1104
|
-
backupCodes: string[];
|
|
1105
|
-
}>;
|
|
1106
|
-
disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
|
|
1107
|
-
method: "POST";
|
|
1108
|
-
body: import("zod").ZodObject<{
|
|
1109
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1110
|
-
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
1111
|
-
password: import("zod").ZodString;
|
|
1112
|
-
}, import("zod/v4/core").$strip>;
|
|
1113
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1114
|
-
session: {
|
|
1115
|
-
session: Record<string, any> & {
|
|
1116
|
-
id: string;
|
|
1117
|
-
createdAt: Date;
|
|
1118
|
-
updatedAt: Date;
|
|
1119
|
-
userId: string;
|
|
1120
|
-
expiresAt: Date;
|
|
1121
|
-
token: string;
|
|
1122
|
-
ipAddress?: string | null | undefined;
|
|
1123
|
-
userAgent?: string | null | undefined;
|
|
1124
|
-
};
|
|
1125
|
-
user: Record<string, any> & {
|
|
1126
|
-
id: string;
|
|
1127
|
-
createdAt: Date;
|
|
1128
|
-
updatedAt: Date;
|
|
1129
|
-
email: string;
|
|
1130
|
-
emailVerified: boolean;
|
|
1131
|
-
name: string;
|
|
1132
|
-
image?: string | null | undefined;
|
|
1133
|
-
};
|
|
1134
|
-
};
|
|
1135
|
-
}>>[];
|
|
1136
|
-
metadata: {
|
|
1137
|
-
openapi: {
|
|
1138
|
-
summary: string;
|
|
1139
|
-
description: string;
|
|
1140
|
-
responses: {
|
|
1141
|
-
200: {
|
|
1142
|
-
description: string;
|
|
1143
|
-
content: {
|
|
1144
|
-
"application/json": {
|
|
1145
|
-
schema: {
|
|
1146
|
-
type: "object";
|
|
1147
|
-
properties: {
|
|
1148
|
-
status: {
|
|
1149
|
-
type: string;
|
|
1150
|
-
};
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1153
|
-
};
|
|
1154
|
-
};
|
|
1155
|
-
};
|
|
1156
|
-
};
|
|
1157
|
-
};
|
|
1158
|
-
};
|
|
1159
|
-
}, {
|
|
1160
|
-
status: boolean;
|
|
1161
|
-
}>;
|
|
1162
|
-
verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
|
|
1163
|
-
method: "POST";
|
|
1164
|
-
body: import("zod").ZodObject<{
|
|
1165
|
-
code: import("zod").ZodString;
|
|
1166
|
-
disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1167
|
-
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1168
|
-
}, import("zod/v4/core").$strip>;
|
|
1169
|
-
metadata: {
|
|
1170
|
-
openapi: {
|
|
1171
|
-
description: string;
|
|
1172
|
-
responses: {
|
|
1173
|
-
"200": {
|
|
1174
|
-
description: string;
|
|
1175
|
-
content: {
|
|
1176
|
-
"application/json": {
|
|
1177
|
-
schema: {
|
|
1178
|
-
type: "object";
|
|
1179
|
-
properties: {
|
|
1180
|
-
user: {
|
|
1181
|
-
type: string;
|
|
1182
|
-
properties: {
|
|
1183
|
-
id: {
|
|
1184
|
-
type: string;
|
|
1185
|
-
description: string;
|
|
1186
|
-
};
|
|
1187
|
-
email: {
|
|
1188
|
-
type: string;
|
|
1189
|
-
format: string;
|
|
1190
|
-
nullable: boolean;
|
|
1191
|
-
description: string;
|
|
1192
|
-
};
|
|
1193
|
-
emailVerified: {
|
|
1194
|
-
type: string;
|
|
1195
|
-
nullable: boolean;
|
|
1196
|
-
description: string;
|
|
1197
|
-
};
|
|
1198
|
-
name: {
|
|
1199
|
-
type: string;
|
|
1200
|
-
nullable: boolean;
|
|
1201
|
-
description: string;
|
|
1202
|
-
};
|
|
1203
|
-
image: {
|
|
1204
|
-
type: string;
|
|
1205
|
-
format: string;
|
|
1206
|
-
nullable: boolean;
|
|
1207
|
-
description: string;
|
|
1208
|
-
};
|
|
1209
|
-
twoFactorEnabled: {
|
|
1210
|
-
type: string;
|
|
1211
|
-
description: string;
|
|
1212
|
-
};
|
|
1213
|
-
createdAt: {
|
|
1214
|
-
type: string;
|
|
1215
|
-
format: string;
|
|
1216
|
-
description: string;
|
|
1217
|
-
};
|
|
1218
|
-
updatedAt: {
|
|
1219
|
-
type: string;
|
|
1220
|
-
format: string;
|
|
1221
|
-
description: string;
|
|
1222
|
-
};
|
|
1223
|
-
};
|
|
1224
|
-
required: string[];
|
|
1225
|
-
description: string;
|
|
1226
|
-
};
|
|
1227
|
-
session: {
|
|
1228
|
-
type: string;
|
|
1229
|
-
properties: {
|
|
1230
|
-
token: {
|
|
1231
|
-
type: string;
|
|
1232
|
-
description: string;
|
|
1233
|
-
};
|
|
1234
|
-
userId: {
|
|
1235
|
-
type: string;
|
|
1236
|
-
description: string;
|
|
1237
|
-
};
|
|
1238
|
-
createdAt: {
|
|
1239
|
-
type: string;
|
|
1240
|
-
format: string;
|
|
1241
|
-
description: string;
|
|
1242
|
-
};
|
|
1243
|
-
expiresAt: {
|
|
1244
|
-
type: string;
|
|
1245
|
-
format: string;
|
|
1246
|
-
description: string;
|
|
1247
|
-
};
|
|
1248
|
-
};
|
|
1249
|
-
required: string[];
|
|
1250
|
-
description: string;
|
|
1251
|
-
};
|
|
1252
|
-
};
|
|
1253
|
-
required: string[];
|
|
1254
|
-
};
|
|
1255
|
-
};
|
|
1256
|
-
};
|
|
1257
|
-
};
|
|
1258
|
-
};
|
|
1259
|
-
};
|
|
1260
|
-
};
|
|
1261
|
-
}, {
|
|
1262
|
-
token: string | undefined;
|
|
1263
|
-
user: (Record<string, any> & {
|
|
1264
|
-
id: string;
|
|
1265
|
-
createdAt: Date;
|
|
1266
|
-
updatedAt: Date;
|
|
1267
|
-
email: string;
|
|
1268
|
-
emailVerified: boolean;
|
|
1269
|
-
name: string;
|
|
1270
|
-
image?: string | null | undefined;
|
|
1271
|
-
}) | import("better-auth/plugins/two-factor").UserWithTwoFactor;
|
|
1272
|
-
}>;
|
|
1273
|
-
generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
|
|
1274
|
-
method: "POST";
|
|
1275
|
-
body: import("zod").ZodObject<{
|
|
1276
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1277
|
-
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
1278
|
-
password: import("zod").ZodString;
|
|
1279
|
-
}, import("zod/v4/core").$strip>;
|
|
1280
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1281
|
-
session: {
|
|
1282
|
-
session: Record<string, any> & {
|
|
1283
|
-
id: string;
|
|
1284
|
-
createdAt: Date;
|
|
1285
|
-
updatedAt: Date;
|
|
1286
|
-
userId: string;
|
|
1287
|
-
expiresAt: Date;
|
|
1288
|
-
token: string;
|
|
1289
|
-
ipAddress?: string | null | undefined;
|
|
1290
|
-
userAgent?: string | null | undefined;
|
|
1291
|
-
};
|
|
1292
|
-
user: Record<string, any> & {
|
|
1293
|
-
id: string;
|
|
1294
|
-
createdAt: Date;
|
|
1295
|
-
updatedAt: Date;
|
|
1296
|
-
email: string;
|
|
1297
|
-
emailVerified: boolean;
|
|
1298
|
-
name: string;
|
|
1299
|
-
image?: string | null | undefined;
|
|
1300
|
-
};
|
|
1301
|
-
};
|
|
1302
|
-
}>>[];
|
|
1303
|
-
metadata: {
|
|
1304
|
-
openapi: {
|
|
1305
|
-
description: string;
|
|
1306
|
-
responses: {
|
|
1307
|
-
"200": {
|
|
1308
|
-
description: string;
|
|
1309
|
-
content: {
|
|
1310
|
-
"application/json": {
|
|
1311
|
-
schema: {
|
|
1312
|
-
type: "object";
|
|
1313
|
-
properties: {
|
|
1314
|
-
status: {
|
|
1315
|
-
type: string;
|
|
1316
|
-
description: string;
|
|
1317
|
-
enum: boolean[];
|
|
1318
|
-
};
|
|
1319
|
-
backupCodes: {
|
|
1320
|
-
type: string;
|
|
1321
|
-
items: {
|
|
1322
|
-
type: string;
|
|
1323
|
-
};
|
|
1324
|
-
description: string;
|
|
1325
|
-
};
|
|
1326
|
-
};
|
|
1327
|
-
required: string[];
|
|
1328
|
-
};
|
|
1329
|
-
};
|
|
1330
|
-
};
|
|
1331
|
-
};
|
|
1332
|
-
};
|
|
1333
|
-
};
|
|
1334
|
-
};
|
|
1335
|
-
}, {
|
|
1336
|
-
status: boolean;
|
|
1337
|
-
backupCodes: string[];
|
|
1338
|
-
}>;
|
|
1339
|
-
viewBackupCodes: import("better-call").StrictEndpoint<string, {
|
|
1340
|
-
method: "POST";
|
|
1341
|
-
body: import("zod").ZodObject<{
|
|
1342
|
-
userId: import("zod").ZodCoercedString<unknown>;
|
|
1343
|
-
}, import("zod/v4/core").$strip>;
|
|
1344
|
-
}, {
|
|
1345
|
-
status: boolean;
|
|
1346
|
-
backupCodes: string[];
|
|
1347
|
-
}>;
|
|
1348
|
-
sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
|
|
1349
|
-
method: "POST";
|
|
1350
|
-
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1351
|
-
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1352
|
-
}, import("zod/v4/core").$strip>>;
|
|
1353
|
-
metadata: {
|
|
1354
|
-
openapi: {
|
|
1355
|
-
summary: string;
|
|
1356
|
-
description: string;
|
|
1357
|
-
responses: {
|
|
1358
|
-
200: {
|
|
1359
|
-
description: string;
|
|
1360
|
-
content: {
|
|
1361
|
-
"application/json": {
|
|
1362
|
-
schema: {
|
|
1363
|
-
type: "object";
|
|
1364
|
-
properties: {
|
|
1365
|
-
status: {
|
|
1366
|
-
type: string;
|
|
1367
|
-
};
|
|
1368
|
-
};
|
|
1369
|
-
};
|
|
1370
|
-
};
|
|
1371
|
-
};
|
|
1372
|
-
};
|
|
1373
|
-
};
|
|
1374
|
-
};
|
|
1375
|
-
};
|
|
1376
|
-
}, {
|
|
1377
|
-
status: boolean;
|
|
1378
|
-
}>;
|
|
1379
|
-
verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
|
|
1380
|
-
method: "POST";
|
|
1381
|
-
body: import("zod").ZodObject<{
|
|
1382
|
-
code: import("zod").ZodString;
|
|
1383
|
-
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1384
|
-
}, import("zod/v4/core").$strip>;
|
|
1385
|
-
metadata: {
|
|
1386
|
-
openapi: {
|
|
1387
|
-
summary: string;
|
|
1388
|
-
description: string;
|
|
1389
|
-
responses: {
|
|
1390
|
-
"200": {
|
|
1391
|
-
description: string;
|
|
1392
|
-
content: {
|
|
1393
|
-
"application/json": {
|
|
1394
|
-
schema: {
|
|
1395
|
-
type: "object";
|
|
1396
|
-
properties: {
|
|
1397
|
-
token: {
|
|
1398
|
-
type: string;
|
|
1399
|
-
description: string;
|
|
1400
|
-
};
|
|
1401
|
-
user: {
|
|
1402
|
-
type: string;
|
|
1403
|
-
properties: {
|
|
1404
|
-
id: {
|
|
1405
|
-
type: string;
|
|
1406
|
-
description: string;
|
|
1407
|
-
};
|
|
1408
|
-
email: {
|
|
1409
|
-
type: string;
|
|
1410
|
-
format: string;
|
|
1411
|
-
nullable: boolean;
|
|
1412
|
-
description: string;
|
|
1413
|
-
};
|
|
1414
|
-
emailVerified: {
|
|
1415
|
-
type: string;
|
|
1416
|
-
nullable: boolean;
|
|
1417
|
-
description: string;
|
|
1418
|
-
};
|
|
1419
|
-
name: {
|
|
1420
|
-
type: string;
|
|
1421
|
-
nullable: boolean;
|
|
1422
|
-
description: string;
|
|
1423
|
-
};
|
|
1424
|
-
image: {
|
|
1425
|
-
type: string;
|
|
1426
|
-
format: string;
|
|
1427
|
-
nullable: boolean;
|
|
1428
|
-
description: string;
|
|
1429
|
-
};
|
|
1430
|
-
createdAt: {
|
|
1431
|
-
type: string;
|
|
1432
|
-
format: string;
|
|
1433
|
-
description: string;
|
|
1434
|
-
};
|
|
1435
|
-
updatedAt: {
|
|
1436
|
-
type: string;
|
|
1437
|
-
format: string;
|
|
1438
|
-
description: string;
|
|
1439
|
-
};
|
|
1440
|
-
};
|
|
1441
|
-
required: string[];
|
|
1442
|
-
description: string;
|
|
1443
|
-
};
|
|
1444
|
-
};
|
|
1445
|
-
required: string[];
|
|
1446
|
-
};
|
|
1447
|
-
};
|
|
1448
|
-
};
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1451
|
-
};
|
|
1452
|
-
};
|
|
1453
|
-
}, {
|
|
1454
|
-
token: string;
|
|
1455
|
-
user: import("better-auth/plugins/two-factor").UserWithTwoFactor;
|
|
1456
|
-
} | {
|
|
1457
|
-
token: string;
|
|
1458
|
-
user: Record<string, any> & {
|
|
1459
|
-
id: string;
|
|
1460
|
-
createdAt: Date;
|
|
1461
|
-
updatedAt: Date;
|
|
1462
|
-
email: string;
|
|
1463
|
-
emailVerified: boolean;
|
|
1464
|
-
name: string;
|
|
1465
|
-
image?: string | null | undefined;
|
|
1466
|
-
};
|
|
1467
|
-
}>;
|
|
1468
|
-
generateTOTP: import("better-call").StrictEndpoint<string, {
|
|
1469
|
-
method: "POST";
|
|
1470
|
-
body: import("zod").ZodObject<{
|
|
1471
|
-
secret: import("zod").ZodString;
|
|
1472
|
-
}, import("zod/v4/core").$strip>;
|
|
1473
|
-
metadata: {
|
|
1474
|
-
openapi: {
|
|
1475
|
-
summary: string;
|
|
1476
|
-
description: string;
|
|
1477
|
-
responses: {
|
|
1478
|
-
200: {
|
|
1479
|
-
description: string;
|
|
1480
|
-
content: {
|
|
1481
|
-
"application/json": {
|
|
1482
|
-
schema: {
|
|
1483
|
-
type: "object";
|
|
1484
|
-
properties: {
|
|
1485
|
-
code: {
|
|
1486
|
-
type: string;
|
|
1487
|
-
};
|
|
1488
|
-
};
|
|
1489
|
-
};
|
|
1490
|
-
};
|
|
1491
|
-
};
|
|
1492
|
-
};
|
|
1493
|
-
};
|
|
1494
|
-
};
|
|
1495
|
-
};
|
|
1496
|
-
}, {
|
|
1497
|
-
code: string;
|
|
1498
|
-
}>;
|
|
1499
|
-
getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
|
|
1500
|
-
method: "POST";
|
|
1501
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1502
|
-
session: {
|
|
1503
|
-
session: Record<string, any> & {
|
|
1504
|
-
id: string;
|
|
1505
|
-
createdAt: Date;
|
|
1506
|
-
updatedAt: Date;
|
|
1507
|
-
userId: string;
|
|
1508
|
-
expiresAt: Date;
|
|
1509
|
-
token: string;
|
|
1510
|
-
ipAddress?: string | null | undefined;
|
|
1511
|
-
userAgent?: string | null | undefined;
|
|
1512
|
-
};
|
|
1513
|
-
user: Record<string, any> & {
|
|
1514
|
-
id: string;
|
|
1515
|
-
createdAt: Date;
|
|
1516
|
-
updatedAt: Date;
|
|
1517
|
-
email: string;
|
|
1518
|
-
emailVerified: boolean;
|
|
1519
|
-
name: string;
|
|
1520
|
-
image?: string | null | undefined;
|
|
1521
|
-
};
|
|
1522
|
-
};
|
|
1523
|
-
}>>[];
|
|
1524
|
-
body: import("zod").ZodObject<{
|
|
1525
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1526
|
-
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
1527
|
-
password: import("zod").ZodString;
|
|
1528
|
-
}, import("zod/v4/core").$strip>;
|
|
1529
|
-
metadata: {
|
|
1530
|
-
openapi: {
|
|
1531
|
-
summary: string;
|
|
1532
|
-
description: string;
|
|
1533
|
-
responses: {
|
|
1534
|
-
200: {
|
|
1535
|
-
description: string;
|
|
1536
|
-
content: {
|
|
1537
|
-
"application/json": {
|
|
1538
|
-
schema: {
|
|
1539
|
-
type: "object";
|
|
1540
|
-
properties: {
|
|
1541
|
-
totpURI: {
|
|
1542
|
-
type: string;
|
|
1543
|
-
};
|
|
1544
|
-
};
|
|
1545
|
-
};
|
|
1546
|
-
};
|
|
1547
|
-
};
|
|
1548
|
-
};
|
|
1549
|
-
};
|
|
1550
|
-
};
|
|
1551
|
-
};
|
|
1552
|
-
}, {
|
|
1553
|
-
totpURI: string;
|
|
1554
|
-
}>;
|
|
1555
|
-
verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
|
|
1556
|
-
method: "POST";
|
|
1557
|
-
body: import("zod").ZodObject<{
|
|
1558
|
-
code: import("zod").ZodString;
|
|
1559
|
-
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1560
|
-
}, import("zod/v4/core").$strip>;
|
|
1561
|
-
metadata: {
|
|
1562
|
-
openapi: {
|
|
1563
|
-
summary: string;
|
|
1564
|
-
description: string;
|
|
1565
|
-
responses: {
|
|
1566
|
-
200: {
|
|
1567
|
-
description: string;
|
|
1568
|
-
content: {
|
|
1569
|
-
"application/json": {
|
|
1570
|
-
schema: {
|
|
1571
|
-
type: "object";
|
|
1572
|
-
properties: {
|
|
1573
|
-
status: {
|
|
1574
|
-
type: string;
|
|
1575
|
-
};
|
|
1576
|
-
};
|
|
1577
|
-
};
|
|
1578
|
-
};
|
|
1579
|
-
};
|
|
1580
|
-
};
|
|
1581
|
-
};
|
|
1582
|
-
};
|
|
1583
|
-
};
|
|
1584
|
-
}, {
|
|
1585
|
-
token: string;
|
|
1586
|
-
user: import("better-auth/plugins/two-factor").UserWithTwoFactor;
|
|
1587
|
-
} | {
|
|
1588
|
-
token: string;
|
|
1589
|
-
user: Record<string, any> & {
|
|
1590
|
-
id: string;
|
|
1591
|
-
createdAt: Date;
|
|
1592
|
-
updatedAt: Date;
|
|
1593
|
-
email: string;
|
|
1594
|
-
emailVerified: boolean;
|
|
1595
|
-
name: string;
|
|
1596
|
-
image?: string | null | undefined;
|
|
1597
|
-
};
|
|
1598
|
-
}>;
|
|
1599
|
-
};
|
|
1600
|
-
options: NoInfer<O>;
|
|
1601
|
-
hooks: {
|
|
1602
|
-
after: {
|
|
1603
|
-
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
1604
|
-
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1605
|
-
twoFactorRedirect: boolean;
|
|
1606
|
-
twoFactorMethods: string[];
|
|
1607
|
-
} | undefined>>;
|
|
1608
|
-
}[];
|
|
1609
|
-
};
|
|
1610
|
-
schema: {
|
|
1611
|
-
user: {
|
|
1612
|
-
fields: {
|
|
1613
|
-
twoFactorEnabled: {
|
|
1614
|
-
type: "boolean";
|
|
1615
|
-
required: false;
|
|
1616
|
-
defaultValue: false;
|
|
1617
|
-
input: false;
|
|
1618
|
-
};
|
|
1619
|
-
};
|
|
1620
|
-
};
|
|
1621
|
-
twoFactor: {
|
|
1622
|
-
fields: {
|
|
1623
|
-
secret: {
|
|
1624
|
-
type: "string";
|
|
1625
|
-
required: true;
|
|
1626
|
-
returned: false;
|
|
1627
|
-
index: true;
|
|
1628
|
-
};
|
|
1629
|
-
backupCodes: {
|
|
1630
|
-
type: "string";
|
|
1631
|
-
required: true;
|
|
1632
|
-
returned: false;
|
|
1633
|
-
};
|
|
1634
|
-
userId: {
|
|
1635
|
-
type: "string";
|
|
1636
|
-
required: true;
|
|
1637
|
-
returned: false;
|
|
1638
|
-
references: {
|
|
1639
|
-
model: string;
|
|
1640
|
-
field: string;
|
|
1641
|
-
};
|
|
1642
|
-
index: true;
|
|
1643
|
-
};
|
|
1644
|
-
verified: {
|
|
1645
|
-
type: "boolean";
|
|
1646
|
-
required: false;
|
|
1647
|
-
defaultValue: true;
|
|
1648
|
-
input: false;
|
|
1649
|
-
};
|
|
1650
|
-
failedVerificationCount: {
|
|
1651
|
-
type: "number";
|
|
1652
|
-
required: false;
|
|
1653
|
-
defaultValue: number;
|
|
1654
|
-
input: false;
|
|
1655
|
-
returned: false;
|
|
1656
|
-
};
|
|
1657
|
-
lockedUntil: {
|
|
1658
|
-
type: "date";
|
|
1659
|
-
required: false;
|
|
1660
|
-
input: false;
|
|
1661
|
-
returned: false;
|
|
1662
|
-
};
|
|
1663
|
-
};
|
|
1664
|
-
};
|
|
1665
|
-
};
|
|
1666
|
-
rateLimit: {
|
|
1667
|
-
pathMatcher(path: string): boolean;
|
|
1668
|
-
window: number;
|
|
1669
|
-
max: number;
|
|
1670
|
-
}[];
|
|
1671
|
-
$ERROR_CODES: {
|
|
1672
|
-
OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
|
|
1673
|
-
OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
|
|
1674
|
-
OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
|
|
1675
|
-
TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
|
|
1676
|
-
TOTP_ALREADY_ENABLED: import("better-auth").RawError<"TOTP_ALREADY_ENABLED">;
|
|
1677
|
-
TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
|
|
1678
|
-
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1679
|
-
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1680
|
-
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
1681
|
-
INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
|
|
1682
|
-
TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
|
|
1683
|
-
ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
|
|
1684
|
-
INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
|
|
1685
|
-
};
|
|
1686
|
-
})>;
|
|
1687
|
-
atomListeners: {
|
|
1688
|
-
matcher: (path: string) => boolean;
|
|
1689
|
-
signal: "$sessionSignal";
|
|
1690
|
-
}[];
|
|
1691
|
-
pathMethods: {
|
|
1692
|
-
"/two-factor/disable": "POST";
|
|
1693
|
-
"/two-factor/enable": "POST";
|
|
1694
|
-
"/two-factor/send-otp": "POST";
|
|
1695
|
-
"/two-factor/generate-backup-codes": "POST";
|
|
1696
|
-
"/two-factor/get-totp-uri": "POST";
|
|
1697
|
-
"/two-factor/verify-totp": "POST";
|
|
1698
|
-
"/two-factor/verify-otp": "POST";
|
|
1699
|
-
"/two-factor/verify-backup-code": "POST";
|
|
1700
|
-
};
|
|
1701
|
-
fetchPlugins: {
|
|
1702
|
-
id: string;
|
|
1703
|
-
name: string;
|
|
1704
|
-
hooks: {
|
|
1705
|
-
onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
|
|
1706
|
-
};
|
|
1707
|
-
}[];
|
|
1708
|
-
$ERROR_CODES: {
|
|
1709
|
-
OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
|
|
1710
|
-
OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
|
|
1711
|
-
OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
|
|
1712
|
-
TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
|
|
1713
|
-
TOTP_ALREADY_ENABLED: import("better-auth").RawError<"TOTP_ALREADY_ENABLED">;
|
|
1714
|
-
TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
|
|
1715
|
-
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1716
|
-
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1717
|
-
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
1718
|
-
INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
|
|
1719
|
-
TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
|
|
1720
|
-
ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
|
|
1721
|
-
INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
|
|
1722
|
-
};
|
|
1723
|
-
} | {
|
|
1724
|
-
id: "magic-link";
|
|
1725
|
-
version: string;
|
|
1726
|
-
$InferServerPlugin: ReturnType<(options: import("better-auth/plugins/magic-link").MagicLinkOptions) => {
|
|
1727
|
-
id: "magic-link";
|
|
1728
|
-
version: string;
|
|
1729
|
-
endpoints: {
|
|
1730
|
-
signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
|
|
1731
|
-
method: "POST";
|
|
1732
|
-
requireHeaders: true;
|
|
1733
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1734
|
-
body: import("zod").ZodObject<{
|
|
1735
|
-
email: import("zod").ZodEmail;
|
|
1736
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1737
|
-
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1738
|
-
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1739
|
-
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1740
|
-
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1741
|
-
}, import("zod/v4/core").$strip>;
|
|
1742
|
-
metadata: {
|
|
1743
|
-
openapi: {
|
|
1744
|
-
operationId: string;
|
|
1745
|
-
description: string;
|
|
1746
|
-
responses: {
|
|
1747
|
-
200: {
|
|
1748
|
-
description: string;
|
|
1749
|
-
content: {
|
|
1750
|
-
"application/json": {
|
|
1751
|
-
schema: {
|
|
1752
|
-
type: "object";
|
|
1753
|
-
properties: {
|
|
1754
|
-
status: {
|
|
1755
|
-
type: string;
|
|
1756
|
-
};
|
|
1757
|
-
};
|
|
1758
|
-
};
|
|
1759
|
-
};
|
|
1760
|
-
};
|
|
1761
|
-
};
|
|
1762
|
-
};
|
|
1763
|
-
};
|
|
1764
|
-
};
|
|
1765
|
-
}, {
|
|
1766
|
-
status: boolean;
|
|
1767
|
-
}>;
|
|
1768
|
-
magicLinkVerify: import("better-call").StrictEndpoint<"/magic-link/verify", {
|
|
1769
|
-
method: "GET";
|
|
1770
|
-
query: import("zod").ZodObject<{
|
|
1771
|
-
token: import("zod").ZodString;
|
|
1772
|
-
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1773
|
-
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1774
|
-
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1775
|
-
}, import("zod/v4/core").$strip>;
|
|
1776
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1777
|
-
requireHeaders: true;
|
|
1778
|
-
metadata: {
|
|
1779
|
-
openapi: {
|
|
1780
|
-
operationId: string;
|
|
1781
|
-
description: string;
|
|
1782
|
-
responses: {
|
|
1783
|
-
200: {
|
|
1784
|
-
description: string;
|
|
1785
|
-
content: {
|
|
1786
|
-
"application/json": {
|
|
1787
|
-
schema: {
|
|
1788
|
-
type: "object";
|
|
1789
|
-
properties: {
|
|
1790
|
-
session: {
|
|
1791
|
-
$ref: string;
|
|
1792
|
-
};
|
|
1793
|
-
user: {
|
|
1794
|
-
$ref: string;
|
|
1795
|
-
};
|
|
1796
|
-
};
|
|
1797
|
-
};
|
|
1798
|
-
};
|
|
1799
|
-
};
|
|
1800
|
-
};
|
|
1801
|
-
};
|
|
1802
|
-
};
|
|
1803
|
-
};
|
|
1804
|
-
}, {
|
|
1805
|
-
token: string;
|
|
1806
|
-
user: {
|
|
1807
|
-
id: string;
|
|
1808
|
-
createdAt: Date;
|
|
1809
|
-
updatedAt: Date;
|
|
1810
|
-
email: string;
|
|
1811
|
-
emailVerified: boolean;
|
|
1812
|
-
name: string;
|
|
1813
|
-
image?: string | null | undefined;
|
|
1814
|
-
};
|
|
1815
|
-
session: {
|
|
1816
|
-
id: string;
|
|
1817
|
-
createdAt: Date;
|
|
1818
|
-
updatedAt: Date;
|
|
1819
|
-
userId: string;
|
|
1820
|
-
expiresAt: Date;
|
|
1821
|
-
token: string;
|
|
1822
|
-
ipAddress?: string | null | undefined;
|
|
1823
|
-
userAgent?: string | null | undefined;
|
|
1824
|
-
};
|
|
1825
|
-
}>;
|
|
1826
|
-
};
|
|
1827
|
-
rateLimit: {
|
|
1828
|
-
pathMatcher(path: string): boolean;
|
|
1829
|
-
window: number;
|
|
1830
|
-
max: number;
|
|
1831
|
-
}[];
|
|
1832
|
-
options: import("better-auth/plugins/magic-link").MagicLinkOptions;
|
|
1833
|
-
}>;
|
|
1834
|
-
} | {
|
|
1835
|
-
id: "email-otp";
|
|
1836
|
-
version: string;
|
|
1837
|
-
$InferServerPlugin: ReturnType<(options: import("better-auth/plugins/email-otp").EmailOTPOptions) => {
|
|
1838
|
-
id: "email-otp";
|
|
1839
|
-
version: string;
|
|
1840
|
-
init(ctx: import("better-auth").AuthContext): {
|
|
1841
|
-
options: {
|
|
1842
|
-
emailVerification: {
|
|
1843
|
-
sendVerificationEmail(data: {
|
|
1844
|
-
user: import("better-auth").User;
|
|
1845
|
-
url: string;
|
|
1846
|
-
token: string;
|
|
1847
|
-
}, request: Request | undefined): Promise<void>;
|
|
1848
|
-
};
|
|
1849
|
-
};
|
|
1850
|
-
} | undefined;
|
|
1851
|
-
endpoints: {
|
|
1852
|
-
sendVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
1853
|
-
method: "POST";
|
|
1854
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1855
|
-
body: import("zod").ZodObject<{
|
|
1856
|
-
email: import("zod").ZodString;
|
|
1857
|
-
type: import("zod").ZodEnum<{
|
|
1858
|
-
"sign-in": "sign-in";
|
|
1859
|
-
"change-email": "change-email";
|
|
1860
|
-
"email-verification": "email-verification";
|
|
1861
|
-
"forget-password": "forget-password";
|
|
1862
|
-
}>;
|
|
1863
|
-
}, import("zod/v4/core").$strip>;
|
|
1864
|
-
metadata: {
|
|
1865
|
-
openapi: {
|
|
1866
|
-
operationId: string;
|
|
1867
|
-
description: string;
|
|
1868
|
-
responses: {
|
|
1869
|
-
200: {
|
|
1870
|
-
description: string;
|
|
1871
|
-
content: {
|
|
1872
|
-
"application/json": {
|
|
1873
|
-
schema: {
|
|
1874
|
-
type: "object";
|
|
1875
|
-
properties: {
|
|
1876
|
-
success: {
|
|
1877
|
-
type: string;
|
|
1878
|
-
};
|
|
1879
|
-
};
|
|
1880
|
-
};
|
|
1881
|
-
};
|
|
1882
|
-
};
|
|
1883
|
-
};
|
|
1884
|
-
};
|
|
1885
|
-
};
|
|
1886
|
-
};
|
|
1887
|
-
}, {
|
|
1888
|
-
success: boolean;
|
|
1889
|
-
}>;
|
|
1890
|
-
createVerificationOTP: import("better-call").StrictEndpoint<string, {
|
|
1891
|
-
method: "POST";
|
|
1892
|
-
body: import("zod").ZodObject<{
|
|
1893
|
-
email: import("zod").ZodString;
|
|
1894
|
-
type: import("zod").ZodEnum<{
|
|
1895
|
-
"sign-in": "sign-in";
|
|
1896
|
-
"change-email": "change-email";
|
|
1897
|
-
"email-verification": "email-verification";
|
|
1898
|
-
"forget-password": "forget-password";
|
|
1899
|
-
}>;
|
|
1900
|
-
}, import("zod/v4/core").$strip>;
|
|
1901
|
-
metadata: {
|
|
1902
|
-
openapi: {
|
|
1903
|
-
operationId: string;
|
|
1904
|
-
description: string;
|
|
1905
|
-
responses: {
|
|
1906
|
-
200: {
|
|
1907
|
-
description: string;
|
|
1908
|
-
content: {
|
|
1909
|
-
"application/json": {
|
|
1910
|
-
schema: {
|
|
1911
|
-
type: "string";
|
|
1912
|
-
};
|
|
1913
|
-
};
|
|
1914
|
-
};
|
|
1915
|
-
};
|
|
1916
|
-
};
|
|
1917
|
-
};
|
|
1918
|
-
};
|
|
1919
|
-
}, string>;
|
|
1920
|
-
getVerificationOTP: import("better-call").StrictEndpoint<string, {
|
|
1921
|
-
method: "GET";
|
|
1922
|
-
query: import("zod").ZodObject<{
|
|
1923
|
-
email: import("zod").ZodString;
|
|
1924
|
-
type: import("zod").ZodEnum<{
|
|
1925
|
-
"sign-in": "sign-in";
|
|
1926
|
-
"change-email": "change-email";
|
|
1927
|
-
"email-verification": "email-verification";
|
|
1928
|
-
"forget-password": "forget-password";
|
|
1929
|
-
}>;
|
|
1930
|
-
}, import("zod/v4/core").$strip>;
|
|
1931
|
-
metadata: {
|
|
1932
|
-
openapi: {
|
|
1933
|
-
operationId: string;
|
|
1934
|
-
description: string;
|
|
1935
|
-
responses: {
|
|
1936
|
-
"200": {
|
|
1937
|
-
description: string;
|
|
1938
|
-
content: {
|
|
1939
|
-
"application/json": {
|
|
1940
|
-
schema: {
|
|
1941
|
-
type: "object";
|
|
1942
|
-
properties: {
|
|
1943
|
-
otp: {
|
|
1944
|
-
type: string;
|
|
1945
|
-
nullable: boolean;
|
|
1946
|
-
description: string;
|
|
1947
|
-
};
|
|
1948
|
-
};
|
|
1949
|
-
required: string[];
|
|
1950
|
-
};
|
|
1951
|
-
};
|
|
1952
|
-
};
|
|
1953
|
-
};
|
|
1954
|
-
};
|
|
1955
|
-
};
|
|
1956
|
-
};
|
|
1957
|
-
}, {
|
|
1958
|
-
otp: null;
|
|
1959
|
-
} | {
|
|
1960
|
-
otp: string;
|
|
1961
|
-
}>;
|
|
1962
|
-
checkVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/check-verification-otp", {
|
|
1963
|
-
method: "POST";
|
|
1964
|
-
body: import("zod").ZodObject<{
|
|
1965
|
-
email: import("zod").ZodString;
|
|
1966
|
-
type: import("zod").ZodEnum<{
|
|
1967
|
-
"sign-in": "sign-in";
|
|
1968
|
-
"change-email": "change-email";
|
|
1969
|
-
"email-verification": "email-verification";
|
|
1970
|
-
"forget-password": "forget-password";
|
|
1971
|
-
}>;
|
|
1972
|
-
otp: import("zod").ZodString;
|
|
1973
|
-
}, import("zod/v4/core").$strip>;
|
|
1974
|
-
metadata: {
|
|
1975
|
-
openapi: {
|
|
1976
|
-
operationId: string;
|
|
1977
|
-
description: string;
|
|
1978
|
-
responses: {
|
|
1979
|
-
200: {
|
|
1980
|
-
description: string;
|
|
1981
|
-
content: {
|
|
1982
|
-
"application/json": {
|
|
1983
|
-
schema: {
|
|
1984
|
-
type: "object";
|
|
1985
|
-
properties: {
|
|
1986
|
-
success: {
|
|
1987
|
-
type: string;
|
|
1988
|
-
};
|
|
1989
|
-
};
|
|
1990
|
-
};
|
|
1991
|
-
};
|
|
1992
|
-
};
|
|
1993
|
-
};
|
|
1994
|
-
};
|
|
1995
|
-
};
|
|
1996
|
-
};
|
|
1997
|
-
}, {
|
|
1998
|
-
success: boolean;
|
|
1999
|
-
}>;
|
|
2000
|
-
verifyEmailOTP: import("better-call").StrictEndpoint<"/email-otp/verify-email", {
|
|
2001
|
-
method: "POST";
|
|
2002
|
-
body: import("zod").ZodObject<{
|
|
2003
|
-
email: import("zod").ZodString;
|
|
2004
|
-
otp: import("zod").ZodString;
|
|
2005
|
-
}, import("zod/v4/core").$strip>;
|
|
2006
|
-
metadata: {
|
|
2007
|
-
openapi: {
|
|
2008
|
-
description: string;
|
|
2009
|
-
responses: {
|
|
2010
|
-
200: {
|
|
2011
|
-
description: string;
|
|
2012
|
-
content: {
|
|
2013
|
-
"application/json": {
|
|
2014
|
-
schema: {
|
|
2015
|
-
type: "object";
|
|
2016
|
-
properties: {
|
|
2017
|
-
status: {
|
|
2018
|
-
type: string;
|
|
2019
|
-
description: string;
|
|
2020
|
-
enum: boolean[];
|
|
2021
|
-
};
|
|
2022
|
-
token: {
|
|
2023
|
-
type: string;
|
|
2024
|
-
nullable: boolean;
|
|
2025
|
-
description: string;
|
|
2026
|
-
};
|
|
2027
|
-
user: {
|
|
2028
|
-
$ref: string;
|
|
2029
|
-
};
|
|
2030
|
-
};
|
|
2031
|
-
required: string[];
|
|
2032
|
-
};
|
|
2033
|
-
};
|
|
2034
|
-
};
|
|
2035
|
-
};
|
|
2036
|
-
};
|
|
2037
|
-
};
|
|
2038
|
-
};
|
|
2039
|
-
}, {
|
|
2040
|
-
status: boolean;
|
|
2041
|
-
token: string;
|
|
2042
|
-
user: {
|
|
2043
|
-
id: string;
|
|
2044
|
-
createdAt: Date;
|
|
2045
|
-
updatedAt: Date;
|
|
2046
|
-
email: string;
|
|
2047
|
-
emailVerified: boolean;
|
|
2048
|
-
name: string;
|
|
2049
|
-
image?: string | null | undefined;
|
|
2050
|
-
} & Record<string, any>;
|
|
2051
|
-
} | {
|
|
2052
|
-
status: boolean;
|
|
2053
|
-
token: null;
|
|
2054
|
-
user: {
|
|
2055
|
-
id: string;
|
|
2056
|
-
createdAt: Date;
|
|
2057
|
-
updatedAt: Date;
|
|
2058
|
-
email: string;
|
|
2059
|
-
emailVerified: boolean;
|
|
2060
|
-
name: string;
|
|
2061
|
-
image?: string | null | undefined;
|
|
2062
|
-
} & Record<string, any>;
|
|
2063
|
-
}>;
|
|
2064
|
-
signInEmailOTP: import("better-call").StrictEndpoint<"/sign-in/email-otp", {
|
|
2065
|
-
method: "POST";
|
|
2066
|
-
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
2067
|
-
email: import("zod").ZodString;
|
|
2068
|
-
otp: import("zod").ZodString;
|
|
2069
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2070
|
-
image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2071
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2072
|
-
metadata: {
|
|
2073
|
-
openapi: {
|
|
2074
|
-
operationId: string;
|
|
2075
|
-
description: string;
|
|
2076
|
-
responses: {
|
|
2077
|
-
200: {
|
|
2078
|
-
description: string;
|
|
2079
|
-
content: {
|
|
2080
|
-
"application/json": {
|
|
2081
|
-
schema: {
|
|
2082
|
-
type: "object";
|
|
2083
|
-
properties: {
|
|
2084
|
-
token: {
|
|
2085
|
-
type: string;
|
|
2086
|
-
description: string;
|
|
2087
|
-
};
|
|
2088
|
-
user: {
|
|
2089
|
-
$ref: string;
|
|
2090
|
-
};
|
|
2091
|
-
};
|
|
2092
|
-
required: string[];
|
|
2093
|
-
};
|
|
2094
|
-
};
|
|
2095
|
-
};
|
|
2096
|
-
};
|
|
2097
|
-
};
|
|
2098
|
-
};
|
|
2099
|
-
};
|
|
2100
|
-
}, {
|
|
2101
|
-
token: string;
|
|
2102
|
-
user: {
|
|
2103
|
-
id: string;
|
|
2104
|
-
createdAt: Date;
|
|
2105
|
-
updatedAt: Date;
|
|
2106
|
-
email: string;
|
|
2107
|
-
emailVerified: boolean;
|
|
2108
|
-
name: string;
|
|
2109
|
-
image?: string | null | undefined;
|
|
2110
|
-
};
|
|
2111
|
-
}>;
|
|
2112
|
-
requestPasswordResetEmailOTP: import("better-call").StrictEndpoint<"/email-otp/request-password-reset", {
|
|
2113
|
-
method: "POST";
|
|
2114
|
-
body: import("zod").ZodObject<{
|
|
2115
|
-
email: import("zod").ZodString;
|
|
2116
|
-
}, import("zod/v4/core").$strip>;
|
|
2117
|
-
metadata: {
|
|
2118
|
-
openapi: {
|
|
2119
|
-
operationId: string;
|
|
2120
|
-
description: string;
|
|
2121
|
-
responses: {
|
|
2122
|
-
200: {
|
|
2123
|
-
description: string;
|
|
2124
|
-
content: {
|
|
2125
|
-
"application/json": {
|
|
2126
|
-
schema: {
|
|
2127
|
-
type: "object";
|
|
2128
|
-
properties: {
|
|
2129
|
-
success: {
|
|
2130
|
-
type: string;
|
|
2131
|
-
description: string;
|
|
2132
|
-
};
|
|
2133
|
-
};
|
|
2134
|
-
};
|
|
2135
|
-
};
|
|
2136
|
-
};
|
|
2137
|
-
};
|
|
2138
|
-
};
|
|
2139
|
-
};
|
|
2140
|
-
};
|
|
2141
|
-
}, {
|
|
2142
|
-
success: boolean;
|
|
2143
|
-
}>;
|
|
2144
|
-
forgetPasswordEmailOTP: import("better-call").StrictEndpoint<"/forget-password/email-otp", {
|
|
2145
|
-
method: "POST";
|
|
2146
|
-
body: import("zod").ZodObject<{
|
|
2147
|
-
email: import("zod").ZodString;
|
|
2148
|
-
}, import("zod/v4/core").$strip>;
|
|
2149
|
-
metadata: {
|
|
2150
|
-
openapi: {
|
|
2151
|
-
operationId: string;
|
|
2152
|
-
description: string;
|
|
2153
|
-
responses: {
|
|
2154
|
-
200: {
|
|
2155
|
-
description: string;
|
|
2156
|
-
content: {
|
|
2157
|
-
"application/json": {
|
|
2158
|
-
schema: {
|
|
2159
|
-
type: "object";
|
|
2160
|
-
properties: {
|
|
2161
|
-
success: {
|
|
2162
|
-
type: string;
|
|
2163
|
-
description: string;
|
|
2164
|
-
};
|
|
2165
|
-
};
|
|
2166
|
-
};
|
|
2167
|
-
};
|
|
2168
|
-
};
|
|
2169
|
-
};
|
|
2170
|
-
};
|
|
2171
|
-
};
|
|
2172
|
-
};
|
|
2173
|
-
}, {
|
|
2174
|
-
success: boolean;
|
|
2175
|
-
}>;
|
|
2176
|
-
resetPasswordEmailOTP: import("better-call").StrictEndpoint<"/email-otp/reset-password", {
|
|
2177
|
-
method: "POST";
|
|
2178
|
-
body: import("zod").ZodObject<{
|
|
2179
|
-
email: import("zod").ZodString;
|
|
2180
|
-
otp: import("zod").ZodString;
|
|
2181
|
-
password: import("zod").ZodString;
|
|
2182
|
-
}, import("zod/v4/core").$strip>;
|
|
2183
|
-
metadata: {
|
|
2184
|
-
openapi: {
|
|
2185
|
-
operationId: string;
|
|
2186
|
-
description: string;
|
|
2187
|
-
responses: {
|
|
2188
|
-
200: {
|
|
2189
|
-
description: string;
|
|
2190
|
-
content: {
|
|
2191
|
-
"application/json": {
|
|
2192
|
-
schema: {
|
|
2193
|
-
type: "object";
|
|
2194
|
-
properties: {
|
|
2195
|
-
success: {
|
|
2196
|
-
type: string;
|
|
2197
|
-
};
|
|
2198
|
-
};
|
|
2199
|
-
};
|
|
2200
|
-
};
|
|
2201
|
-
};
|
|
2202
|
-
};
|
|
2203
|
-
};
|
|
2204
|
-
};
|
|
2205
|
-
};
|
|
2206
|
-
}, {
|
|
2207
|
-
success: boolean;
|
|
2208
|
-
}>;
|
|
2209
|
-
requestEmailChangeEmailOTP: import("better-call").StrictEndpoint<"/email-otp/request-email-change", {
|
|
2210
|
-
method: "POST";
|
|
2211
|
-
body: import("zod").ZodObject<{
|
|
2212
|
-
newEmail: import("zod").ZodString;
|
|
2213
|
-
otp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2214
|
-
}, import("zod/v4/core").$strip>;
|
|
2215
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2216
|
-
session: {
|
|
2217
|
-
session: Record<string, any> & {
|
|
2218
|
-
id: string;
|
|
2219
|
-
createdAt: Date;
|
|
2220
|
-
updatedAt: Date;
|
|
2221
|
-
userId: string;
|
|
2222
|
-
expiresAt: Date;
|
|
2223
|
-
token: string;
|
|
2224
|
-
ipAddress?: string | null | undefined;
|
|
2225
|
-
userAgent?: string | null | undefined;
|
|
2226
|
-
};
|
|
2227
|
-
user: Record<string, any> & {
|
|
2228
|
-
id: string;
|
|
2229
|
-
createdAt: Date;
|
|
2230
|
-
updatedAt: Date;
|
|
2231
|
-
email: string;
|
|
2232
|
-
emailVerified: boolean;
|
|
2233
|
-
name: string;
|
|
2234
|
-
image?: string | null | undefined;
|
|
2235
|
-
};
|
|
2236
|
-
};
|
|
2237
|
-
}>>[];
|
|
2238
|
-
metadata: {
|
|
2239
|
-
openapi: {
|
|
2240
|
-
operationId: string;
|
|
2241
|
-
description: string;
|
|
2242
|
-
responses: {
|
|
2243
|
-
200: {
|
|
2244
|
-
description: string;
|
|
2245
|
-
content: {
|
|
2246
|
-
"application/json": {
|
|
2247
|
-
schema: {
|
|
2248
|
-
type: "object";
|
|
2249
|
-
properties: {
|
|
2250
|
-
success: {
|
|
2251
|
-
type: string;
|
|
2252
|
-
};
|
|
2253
|
-
};
|
|
2254
|
-
};
|
|
2255
|
-
};
|
|
2256
|
-
};
|
|
2257
|
-
};
|
|
2258
|
-
};
|
|
2259
|
-
};
|
|
2260
|
-
};
|
|
2261
|
-
}, {
|
|
2262
|
-
success: boolean;
|
|
2263
|
-
}>;
|
|
2264
|
-
changeEmailEmailOTP: import("better-call").StrictEndpoint<"/email-otp/change-email", {
|
|
2265
|
-
method: "POST";
|
|
2266
|
-
body: import("zod").ZodObject<{
|
|
2267
|
-
newEmail: import("zod").ZodString;
|
|
2268
|
-
otp: import("zod").ZodString;
|
|
2269
|
-
}, import("zod/v4/core").$strip>;
|
|
2270
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2271
|
-
session: {
|
|
2272
|
-
session: Record<string, any> & {
|
|
2273
|
-
id: string;
|
|
2274
|
-
createdAt: Date;
|
|
2275
|
-
updatedAt: Date;
|
|
2276
|
-
userId: string;
|
|
2277
|
-
expiresAt: Date;
|
|
2278
|
-
token: string;
|
|
2279
|
-
ipAddress?: string | null | undefined;
|
|
2280
|
-
userAgent?: string | null | undefined;
|
|
2281
|
-
};
|
|
2282
|
-
user: Record<string, any> & {
|
|
2283
|
-
id: string;
|
|
2284
|
-
createdAt: Date;
|
|
2285
|
-
updatedAt: Date;
|
|
2286
|
-
email: string;
|
|
2287
|
-
emailVerified: boolean;
|
|
2288
|
-
name: string;
|
|
2289
|
-
image?: string | null | undefined;
|
|
2290
|
-
};
|
|
2291
|
-
};
|
|
2292
|
-
}>>[];
|
|
2293
|
-
metadata: {
|
|
2294
|
-
openapi: {
|
|
2295
|
-
operationId: string;
|
|
2296
|
-
description: string;
|
|
2297
|
-
responses: {
|
|
2298
|
-
200: {
|
|
2299
|
-
description: string;
|
|
2300
|
-
content: {
|
|
2301
|
-
"application/json": {
|
|
2302
|
-
schema: {
|
|
2303
|
-
type: "object";
|
|
2304
|
-
properties: {
|
|
2305
|
-
success: {
|
|
2306
|
-
type: string;
|
|
2307
|
-
};
|
|
2308
|
-
};
|
|
2309
|
-
};
|
|
2310
|
-
};
|
|
2311
|
-
};
|
|
2312
|
-
};
|
|
2313
|
-
};
|
|
2314
|
-
};
|
|
2315
|
-
};
|
|
2316
|
-
}, {
|
|
2317
|
-
success: boolean;
|
|
2318
|
-
}>;
|
|
2319
|
-
};
|
|
2320
|
-
hooks: {
|
|
2321
|
-
after: {
|
|
2322
|
-
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
2323
|
-
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2324
|
-
}[];
|
|
2325
|
-
};
|
|
2326
|
-
rateLimit: ({
|
|
2327
|
-
pathMatcher(path: string): path is "/email-otp/send-verification-otp";
|
|
2328
|
-
window: number;
|
|
2329
|
-
max: number;
|
|
2330
|
-
} | {
|
|
2331
|
-
pathMatcher(path: string): path is "/email-otp/check-verification-otp";
|
|
2332
|
-
window: number;
|
|
2333
|
-
max: number;
|
|
2334
|
-
} | {
|
|
2335
|
-
pathMatcher(path: string): path is "/email-otp/verify-email";
|
|
2336
|
-
window: number;
|
|
2337
|
-
max: number;
|
|
2338
|
-
} | {
|
|
2339
|
-
pathMatcher(path: string): path is "/sign-in/email-otp";
|
|
2340
|
-
window: number;
|
|
2341
|
-
max: number;
|
|
2342
|
-
} | {
|
|
2343
|
-
pathMatcher(path: string): path is "/email-otp/request-password-reset";
|
|
2344
|
-
window: number;
|
|
2345
|
-
max: number;
|
|
2346
|
-
} | {
|
|
2347
|
-
pathMatcher(path: string): path is "/email-otp/reset-password";
|
|
2348
|
-
window: number;
|
|
2349
|
-
max: number;
|
|
2350
|
-
} | {
|
|
2351
|
-
pathMatcher(path: string): path is "/forget-password/email-otp";
|
|
2352
|
-
window: number;
|
|
2353
|
-
max: number;
|
|
2354
|
-
} | {
|
|
2355
|
-
pathMatcher(path: string): path is "/email-otp/request-email-change";
|
|
2356
|
-
window: number;
|
|
2357
|
-
max: number;
|
|
2358
|
-
} | {
|
|
2359
|
-
pathMatcher(path: string): path is "/email-otp/change-email";
|
|
2360
|
-
window: number;
|
|
2361
|
-
max: number;
|
|
2362
|
-
})[];
|
|
2363
|
-
options: import("better-auth/plugins/email-otp").EmailOTPOptions;
|
|
2364
|
-
$ERROR_CODES: {
|
|
2365
|
-
OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
|
|
2366
|
-
INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
|
|
2367
|
-
TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
|
|
2368
|
-
};
|
|
2369
|
-
}>;
|
|
2370
|
-
atomListeners: {
|
|
2371
|
-
matcher: (path: string) => path is "/email-otp/verify-email" | "/sign-in/email-otp" | "/email-otp/request-email-change";
|
|
2372
|
-
signal: "$sessionSignal";
|
|
2373
|
-
}[];
|
|
2374
|
-
$ERROR_CODES: {
|
|
2375
|
-
OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
|
|
2376
|
-
INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
|
|
2377
|
-
TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
|
|
2378
|
-
};
|
|
2379
|
-
} | {
|
|
2380
|
-
id: "username";
|
|
2381
|
-
version: string;
|
|
2382
|
-
$InferServerPlugin: {
|
|
2383
|
-
id: "username";
|
|
2384
|
-
version: string;
|
|
2385
|
-
init(ctx: import("better-auth").AuthContext): {
|
|
2386
|
-
options: {
|
|
2387
|
-
databaseHooks: {
|
|
2388
|
-
user: {
|
|
2389
|
-
create: {
|
|
2390
|
-
before(user: {
|
|
2391
|
-
id: string;
|
|
2392
|
-
createdAt: Date;
|
|
2393
|
-
updatedAt: Date;
|
|
2394
|
-
email: string;
|
|
2395
|
-
emailVerified: boolean;
|
|
2396
|
-
name: string;
|
|
2397
|
-
image?: string | null | undefined;
|
|
2398
|
-
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
2399
|
-
data: {
|
|
2400
|
-
displayUsername?: string | undefined;
|
|
2401
|
-
username: string;
|
|
2402
|
-
id: string;
|
|
2403
|
-
createdAt: Date;
|
|
2404
|
-
updatedAt: Date;
|
|
2405
|
-
email: string;
|
|
2406
|
-
emailVerified: boolean;
|
|
2407
|
-
name: string;
|
|
2408
|
-
image?: string | null | undefined;
|
|
2409
|
-
};
|
|
2410
|
-
} | {
|
|
2411
|
-
data: {
|
|
2412
|
-
displayUsername?: string | undefined;
|
|
2413
|
-
id: string;
|
|
2414
|
-
createdAt: Date;
|
|
2415
|
-
updatedAt: Date;
|
|
2416
|
-
email: string;
|
|
2417
|
-
emailVerified: boolean;
|
|
2418
|
-
name: string;
|
|
2419
|
-
image?: string | null | undefined;
|
|
2420
|
-
};
|
|
2421
|
-
}>;
|
|
2422
|
-
};
|
|
2423
|
-
update: {
|
|
2424
|
-
before(user: Partial<{
|
|
2425
|
-
id: string;
|
|
2426
|
-
createdAt: Date;
|
|
2427
|
-
updatedAt: Date;
|
|
2428
|
-
email: string;
|
|
2429
|
-
emailVerified: boolean;
|
|
2430
|
-
name: string;
|
|
2431
|
-
image?: string | null | undefined;
|
|
2432
|
-
}> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
2433
|
-
data: {
|
|
2434
|
-
displayUsername?: string | undefined;
|
|
2435
|
-
username: string;
|
|
2436
|
-
id?: string | undefined;
|
|
2437
|
-
createdAt?: Date | undefined;
|
|
2438
|
-
updatedAt?: Date | undefined;
|
|
2439
|
-
email?: string | undefined;
|
|
2440
|
-
emailVerified?: boolean | undefined;
|
|
2441
|
-
name?: string | undefined;
|
|
2442
|
-
image?: string | null | undefined;
|
|
2443
|
-
};
|
|
2444
|
-
} | {
|
|
2445
|
-
data: {
|
|
2446
|
-
displayUsername?: string | undefined;
|
|
2447
|
-
id?: string | undefined;
|
|
2448
|
-
createdAt?: Date | undefined;
|
|
2449
|
-
updatedAt?: Date | undefined;
|
|
2450
|
-
email?: string | undefined;
|
|
2451
|
-
emailVerified?: boolean | undefined;
|
|
2452
|
-
name?: string | undefined;
|
|
2453
|
-
image?: string | null | undefined;
|
|
2454
|
-
};
|
|
2455
|
-
}>;
|
|
2456
|
-
};
|
|
2457
|
-
};
|
|
2458
|
-
};
|
|
2459
|
-
};
|
|
2460
|
-
};
|
|
2461
|
-
endpoints: {
|
|
2462
|
-
signInUsername: import("better-call").StrictEndpoint<"/sign-in/username", {
|
|
2463
|
-
method: "POST";
|
|
2464
|
-
body: import("zod").ZodObject<{
|
|
2465
|
-
username: import("zod").ZodString;
|
|
2466
|
-
password: import("zod").ZodString;
|
|
2467
|
-
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2468
|
-
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2469
|
-
}, import("zod/v4/core").$strip>;
|
|
2470
|
-
metadata: {
|
|
2471
|
-
openapi: {
|
|
2472
|
-
summary: string;
|
|
2473
|
-
description: string;
|
|
2474
|
-
responses: {
|
|
2475
|
-
200: {
|
|
2476
|
-
description: string;
|
|
2477
|
-
content: {
|
|
2478
|
-
"application/json": {
|
|
2479
|
-
schema: {
|
|
2480
|
-
type: "object";
|
|
2481
|
-
properties: {
|
|
2482
|
-
redirect: {
|
|
2483
|
-
type: string;
|
|
2484
|
-
description: string;
|
|
2485
|
-
};
|
|
2486
|
-
token: {
|
|
2487
|
-
type: string;
|
|
2488
|
-
description: string;
|
|
2489
|
-
};
|
|
2490
|
-
url: {
|
|
2491
|
-
type: string;
|
|
2492
|
-
nullable: boolean;
|
|
2493
|
-
description: string;
|
|
2494
|
-
};
|
|
2495
|
-
user: {
|
|
2496
|
-
$ref: string;
|
|
2497
|
-
};
|
|
2498
|
-
};
|
|
2499
|
-
required: string[];
|
|
2500
|
-
};
|
|
2501
|
-
};
|
|
2502
|
-
};
|
|
2503
|
-
};
|
|
2504
|
-
422: {
|
|
2505
|
-
description: string;
|
|
2506
|
-
content: {
|
|
2507
|
-
"application/json": {
|
|
2508
|
-
schema: {
|
|
2509
|
-
type: "object";
|
|
2510
|
-
properties: {
|
|
2511
|
-
message: {
|
|
2512
|
-
type: string;
|
|
2513
|
-
};
|
|
2514
|
-
};
|
|
2515
|
-
};
|
|
2516
|
-
};
|
|
2517
|
-
};
|
|
2518
|
-
};
|
|
2519
|
-
};
|
|
2520
|
-
};
|
|
2521
|
-
};
|
|
2522
|
-
}, {
|
|
2523
|
-
redirect: boolean;
|
|
2524
|
-
token: string;
|
|
2525
|
-
url: string | undefined;
|
|
2526
|
-
user: {
|
|
2527
|
-
id: string;
|
|
2528
|
-
createdAt: Date;
|
|
2529
|
-
updatedAt: Date;
|
|
2530
|
-
email: string;
|
|
2531
|
-
emailVerified: boolean;
|
|
2532
|
-
name: string;
|
|
2533
|
-
image?: string | null | undefined;
|
|
2534
|
-
} & {
|
|
2535
|
-
username: string;
|
|
2536
|
-
displayUsername: string;
|
|
2537
|
-
};
|
|
2538
|
-
}>;
|
|
2539
|
-
isUsernameAvailable: import("better-call").StrictEndpoint<"/is-username-available", {
|
|
2540
|
-
method: "POST";
|
|
2541
|
-
body: import("zod").ZodObject<{
|
|
2542
|
-
username: import("zod").ZodString;
|
|
2543
|
-
}, import("zod/v4/core").$strip>;
|
|
2544
|
-
}, {
|
|
2545
|
-
available: boolean;
|
|
2546
|
-
}>;
|
|
2547
|
-
};
|
|
2548
|
-
schema: {
|
|
2549
|
-
user: {
|
|
2550
|
-
fields: {
|
|
2551
|
-
username: {
|
|
2552
|
-
type: "string";
|
|
2553
|
-
required: false;
|
|
2554
|
-
sortable: true;
|
|
2555
|
-
unique: true;
|
|
2556
|
-
returned: true;
|
|
2557
|
-
transform: {
|
|
2558
|
-
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
2559
|
-
};
|
|
2560
|
-
};
|
|
2561
|
-
displayUsername: {
|
|
2562
|
-
type: "string";
|
|
2563
|
-
required: false;
|
|
2564
|
-
transform: {
|
|
2565
|
-
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
2566
|
-
};
|
|
2567
|
-
};
|
|
2568
|
-
};
|
|
2569
|
-
};
|
|
2570
|
-
};
|
|
2571
|
-
hooks: {
|
|
2572
|
-
before: {
|
|
2573
|
-
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
2574
|
-
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2575
|
-
}[];
|
|
2576
|
-
};
|
|
2577
|
-
options: import("better-auth/plugins/username").UsernameOptions | undefined;
|
|
2578
|
-
$ERROR_CODES: {
|
|
2579
|
-
EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
|
|
2580
|
-
UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
|
|
2581
|
-
INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
|
|
2582
|
-
USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
|
|
2583
|
-
USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
|
|
2584
|
-
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
2585
|
-
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
2586
|
-
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
2587
|
-
USERNAME_IS_IMMUTABLE: import("better-auth").RawError<"USERNAME_IS_IMMUTABLE">;
|
|
2588
|
-
};
|
|
2589
|
-
};
|
|
1018
|
+
$InferServerPlugin: ReturnType<typeof import("better-auth/plugins").twoFactor>;
|
|
2590
1019
|
atomListeners: {
|
|
2591
|
-
matcher: (path: string) =>
|
|
1020
|
+
matcher: (path: string) => boolean;
|
|
2592
1021
|
signal: "$sessionSignal";
|
|
2593
1022
|
}[];
|
|
1023
|
+
pathMethods: {
|
|
1024
|
+
"/two-factor/disable": "POST";
|
|
1025
|
+
"/two-factor/enable": "POST";
|
|
1026
|
+
"/two-factor/send-otp": "POST";
|
|
1027
|
+
"/two-factor/generate-backup-codes": "POST";
|
|
1028
|
+
"/two-factor/get-totp-uri": "POST";
|
|
1029
|
+
"/two-factor/verify-totp": "POST";
|
|
1030
|
+
"/two-factor/verify-otp": "POST";
|
|
1031
|
+
"/two-factor/verify-backup-code": "POST";
|
|
1032
|
+
};
|
|
1033
|
+
fetchPlugins: {
|
|
1034
|
+
id: string;
|
|
1035
|
+
name: string;
|
|
1036
|
+
hooks: {
|
|
1037
|
+
onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
|
|
1038
|
+
};
|
|
1039
|
+
}[];
|
|
2594
1040
|
$ERROR_CODES: {
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
1041
|
+
OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
|
|
1042
|
+
OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
|
|
1043
|
+
OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
|
|
1044
|
+
TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
|
|
1045
|
+
TOTP_ALREADY_ENABLED: import("better-auth").RawError<"TOTP_ALREADY_ENABLED">;
|
|
1046
|
+
TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
|
|
1047
|
+
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1048
|
+
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1049
|
+
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
1050
|
+
INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
|
|
1051
|
+
TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
|
|
1052
|
+
ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
|
|
1053
|
+
INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
|
|
2604
1054
|
};
|
|
2605
1055
|
} | {
|
|
2606
|
-
id: "
|
|
1056
|
+
id: "magic-link";
|
|
2607
1057
|
version: string;
|
|
2608
|
-
$InferServerPlugin: ReturnType<
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
method: "GET";
|
|
2614
|
-
requireHeaders: true;
|
|
2615
|
-
}, {
|
|
2616
|
-
session: {
|
|
2617
|
-
id: string;
|
|
2618
|
-
createdAt: Date;
|
|
2619
|
-
updatedAt: Date;
|
|
2620
|
-
userId: string;
|
|
2621
|
-
expiresAt: Date;
|
|
2622
|
-
token: string;
|
|
2623
|
-
ipAddress?: string | null | undefined;
|
|
2624
|
-
userAgent?: string | null | undefined;
|
|
2625
|
-
};
|
|
2626
|
-
user: {
|
|
2627
|
-
id: string;
|
|
2628
|
-
createdAt: Date;
|
|
2629
|
-
updatedAt: Date;
|
|
2630
|
-
email: string;
|
|
2631
|
-
emailVerified: boolean;
|
|
2632
|
-
name: string;
|
|
2633
|
-
image?: string | null | undefined;
|
|
2634
|
-
};
|
|
2635
|
-
}[]>;
|
|
2636
|
-
setActiveSession: import("better-call").StrictEndpoint<"/multi-session/set-active", {
|
|
2637
|
-
method: "POST";
|
|
2638
|
-
body: import("zod").ZodObject<{
|
|
2639
|
-
sessionToken: import("zod").ZodString;
|
|
2640
|
-
}, import("zod/v4/core").$strip>;
|
|
2641
|
-
requireHeaders: true;
|
|
2642
|
-
metadata: {
|
|
2643
|
-
openapi: {
|
|
2644
|
-
description: string;
|
|
2645
|
-
responses: {
|
|
2646
|
-
200: {
|
|
2647
|
-
description: string;
|
|
2648
|
-
content: {
|
|
2649
|
-
"application/json": {
|
|
2650
|
-
schema: {
|
|
2651
|
-
type: "object";
|
|
2652
|
-
properties: {
|
|
2653
|
-
session: {
|
|
2654
|
-
$ref: string;
|
|
2655
|
-
};
|
|
2656
|
-
};
|
|
2657
|
-
};
|
|
2658
|
-
};
|
|
2659
|
-
};
|
|
2660
|
-
};
|
|
2661
|
-
};
|
|
2662
|
-
};
|
|
2663
|
-
};
|
|
2664
|
-
}, {
|
|
2665
|
-
session: {
|
|
2666
|
-
id: string;
|
|
2667
|
-
createdAt: Date;
|
|
2668
|
-
updatedAt: Date;
|
|
2669
|
-
userId: string;
|
|
2670
|
-
expiresAt: Date;
|
|
2671
|
-
token: string;
|
|
2672
|
-
ipAddress?: string | null | undefined;
|
|
2673
|
-
userAgent?: string | null | undefined;
|
|
2674
|
-
} & Record<string, any>;
|
|
2675
|
-
user: {
|
|
2676
|
-
id: string;
|
|
2677
|
-
createdAt: Date;
|
|
2678
|
-
updatedAt: Date;
|
|
2679
|
-
email: string;
|
|
2680
|
-
emailVerified: boolean;
|
|
2681
|
-
name: string;
|
|
2682
|
-
image?: string | null | undefined;
|
|
2683
|
-
} & Record<string, any>;
|
|
2684
|
-
}>;
|
|
2685
|
-
revokeDeviceSession: import("better-call").StrictEndpoint<"/multi-session/revoke", {
|
|
2686
|
-
method: "POST";
|
|
2687
|
-
body: import("zod").ZodObject<{
|
|
2688
|
-
sessionToken: import("zod").ZodString;
|
|
2689
|
-
}, import("zod/v4/core").$strip>;
|
|
2690
|
-
requireHeaders: true;
|
|
2691
|
-
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2692
|
-
session: {
|
|
2693
|
-
session: Record<string, any> & {
|
|
2694
|
-
id: string;
|
|
2695
|
-
createdAt: Date;
|
|
2696
|
-
updatedAt: Date;
|
|
2697
|
-
userId: string;
|
|
2698
|
-
expiresAt: Date;
|
|
2699
|
-
token: string;
|
|
2700
|
-
ipAddress?: string | null | undefined;
|
|
2701
|
-
userAgent
|
|
2702
|
-
/**
|
|
2703
|
-
* Content type of the body. Binary bodies default to the Blob's own type,
|
|
2704
|
-
* else `application/octet-stream`; JSON bodies to `application/json`.
|
|
2705
|
-
* Ignored for `FormData`, whose boundary the runtime sets.
|
|
2706
|
-
*/
|
|
2707
|
-
? /**
|
|
2708
|
-
* Content type of the body. Binary bodies default to the Blob's own type,
|
|
2709
|
-
* else `application/octet-stream`; JSON bodies to `application/json`.
|
|
2710
|
-
* Ignored for `FormData`, whose boundary the runtime sets.
|
|
2711
|
-
*/: string | null | undefined;
|
|
2712
|
-
};
|
|
2713
|
-
user: Record<string, any> & {
|
|
2714
|
-
id: string;
|
|
2715
|
-
createdAt: Date;
|
|
2716
|
-
updatedAt: Date;
|
|
2717
|
-
email: string;
|
|
2718
|
-
emailVerified: boolean;
|
|
2719
|
-
name: string;
|
|
2720
|
-
image?: string | null | undefined;
|
|
2721
|
-
};
|
|
2722
|
-
};
|
|
2723
|
-
}>>[];
|
|
2724
|
-
metadata: {
|
|
2725
|
-
openapi: {
|
|
2726
|
-
description: string;
|
|
2727
|
-
responses: {
|
|
2728
|
-
200: {
|
|
2729
|
-
description: string;
|
|
2730
|
-
content: {
|
|
2731
|
-
"application/json": {
|
|
2732
|
-
schema: {
|
|
2733
|
-
type: "object";
|
|
2734
|
-
properties: {
|
|
2735
|
-
status: {
|
|
2736
|
-
type: string;
|
|
2737
|
-
};
|
|
2738
|
-
};
|
|
2739
|
-
};
|
|
2740
|
-
};
|
|
2741
|
-
};
|
|
2742
|
-
};
|
|
2743
|
-
};
|
|
2744
|
-
};
|
|
2745
|
-
};
|
|
2746
|
-
}, {
|
|
2747
|
-
status: boolean;
|
|
2748
|
-
}>;
|
|
2749
|
-
};
|
|
2750
|
-
hooks: {
|
|
2751
|
-
after: {
|
|
2752
|
-
matcher: (context: import("better-auth").HookEndpointContext) => boolean;
|
|
2753
|
-
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
2754
|
-
}[];
|
|
2755
|
-
};
|
|
2756
|
-
options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
|
|
2757
|
-
$ERROR_CODES: {
|
|
2758
|
-
INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
|
|
2759
|
-
};
|
|
2760
|
-
}>;
|
|
1058
|
+
$InferServerPlugin: ReturnType<typeof import("better-auth/plugins").magicLink>;
|
|
1059
|
+
} | {
|
|
1060
|
+
id: "email-otp";
|
|
1061
|
+
version: string;
|
|
1062
|
+
$InferServerPlugin: ReturnType<typeof import("better-auth/plugins").emailOTP>;
|
|
2761
1063
|
atomListeners: {
|
|
2762
|
-
matcher(path: string)
|
|
1064
|
+
matcher: (path: string) => path is "/email-otp/verify-email" | "/sign-in/email-otp" | "/email-otp/request-email-change";
|
|
2763
1065
|
signal: "$sessionSignal";
|
|
2764
1066
|
}[];
|
|
2765
1067
|
$ERROR_CODES: {
|
|
2766
|
-
|
|
1068
|
+
OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
|
|
1069
|
+
INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
|
|
1070
|
+
TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
|
|
2767
1071
|
};
|
|
2768
1072
|
} | {
|
|
2769
|
-
id: "
|
|
1073
|
+
id: "username";
|
|
2770
1074
|
version: string;
|
|
2771
|
-
$InferServerPlugin:
|
|
2772
|
-
id: "
|
|
1075
|
+
$InferServerPlugin: {
|
|
1076
|
+
id: "username";
|
|
2773
1077
|
version: string;
|
|
2774
|
-
init(): {
|
|
1078
|
+
init(ctx: import("better-auth").AuthContext): {
|
|
2775
1079
|
options: {
|
|
2776
1080
|
databaseHooks: {
|
|
2777
1081
|
user: {
|
|
1082
|
+
create: {
|
|
1083
|
+
before(user: {
|
|
1084
|
+
id: string;
|
|
1085
|
+
createdAt: Date;
|
|
1086
|
+
updatedAt: Date;
|
|
1087
|
+
email: string;
|
|
1088
|
+
emailVerified: boolean;
|
|
1089
|
+
name: string;
|
|
1090
|
+
image?: string | null | undefined;
|
|
1091
|
+
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
1092
|
+
data: {
|
|
1093
|
+
displayUsername?: string | undefined;
|
|
1094
|
+
username: string;
|
|
1095
|
+
id: string;
|
|
1096
|
+
createdAt: Date;
|
|
1097
|
+
updatedAt: Date;
|
|
1098
|
+
email: string;
|
|
1099
|
+
emailVerified: boolean;
|
|
1100
|
+
name: string;
|
|
1101
|
+
image?: string | null | undefined;
|
|
1102
|
+
};
|
|
1103
|
+
} | {
|
|
1104
|
+
data: {
|
|
1105
|
+
displayUsername?: string | undefined;
|
|
1106
|
+
id: string;
|
|
1107
|
+
createdAt: Date;
|
|
1108
|
+
updatedAt: Date;
|
|
1109
|
+
email: string;
|
|
1110
|
+
emailVerified: boolean;
|
|
1111
|
+
name: string;
|
|
1112
|
+
image?: string | null | undefined;
|
|
1113
|
+
};
|
|
1114
|
+
}>;
|
|
1115
|
+
};
|
|
2778
1116
|
update: {
|
|
2779
|
-
before(
|
|
1117
|
+
before(user: Partial<{
|
|
2780
1118
|
id: string;
|
|
2781
1119
|
createdAt: Date;
|
|
2782
1120
|
updatedAt: Date;
|
|
@@ -2784,9 +1122,21 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2784
1122
|
emailVerified: boolean;
|
|
2785
1123
|
name: string;
|
|
2786
1124
|
image?: string | null | undefined;
|
|
2787
|
-
}> & Record<string, unknown
|
|
1125
|
+
}> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
1126
|
+
data: {
|
|
1127
|
+
displayUsername?: string | undefined;
|
|
1128
|
+
username: string;
|
|
1129
|
+
id?: string | undefined;
|
|
1130
|
+
createdAt?: Date | undefined;
|
|
1131
|
+
updatedAt?: Date | undefined;
|
|
1132
|
+
email?: string | undefined;
|
|
1133
|
+
emailVerified?: boolean | undefined;
|
|
1134
|
+
name?: string | undefined;
|
|
1135
|
+
image?: string | null | undefined;
|
|
1136
|
+
};
|
|
1137
|
+
} | {
|
|
2788
1138
|
data: {
|
|
2789
|
-
|
|
1139
|
+
displayUsername?: string | undefined;
|
|
2790
1140
|
id?: string | undefined;
|
|
2791
1141
|
createdAt?: Date | undefined;
|
|
2792
1142
|
updatedAt?: Date | undefined;
|
|
@@ -2795,25 +1145,20 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2795
1145
|
name?: string | undefined;
|
|
2796
1146
|
image?: string | null | undefined;
|
|
2797
1147
|
};
|
|
2798
|
-
}
|
|
1148
|
+
}>;
|
|
2799
1149
|
};
|
|
2800
1150
|
};
|
|
2801
1151
|
};
|
|
2802
1152
|
};
|
|
2803
1153
|
};
|
|
2804
|
-
hooks: {
|
|
2805
|
-
before: {
|
|
2806
|
-
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
2807
|
-
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never>>;
|
|
2808
|
-
}[];
|
|
2809
|
-
};
|
|
2810
1154
|
endpoints: {
|
|
2811
|
-
|
|
1155
|
+
signInUsername: import("better-call").StrictEndpoint<"/sign-in/username", {
|
|
2812
1156
|
method: "POST";
|
|
2813
1157
|
body: import("zod").ZodObject<{
|
|
2814
|
-
|
|
1158
|
+
username: import("zod").ZodString;
|
|
2815
1159
|
password: import("zod").ZodString;
|
|
2816
1160
|
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1161
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2817
1162
|
}, import("zod/v4/core").$strip>;
|
|
2818
1163
|
metadata: {
|
|
2819
1164
|
openapi: {
|
|
@@ -2827,167 +1172,50 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2827
1172
|
schema: {
|
|
2828
1173
|
type: "object";
|
|
2829
1174
|
properties: {
|
|
2830
|
-
|
|
2831
|
-
|
|
1175
|
+
redirect: {
|
|
1176
|
+
type: string;
|
|
1177
|
+
description: string;
|
|
2832
1178
|
};
|
|
2833
|
-
|
|
2834
|
-
|
|
1179
|
+
token: {
|
|
1180
|
+
type: string;
|
|
1181
|
+
description: string;
|
|
2835
1182
|
};
|
|
2836
|
-
|
|
2837
|
-
};
|
|
2838
|
-
};
|
|
2839
|
-
};
|
|
2840
|
-
};
|
|
2841
|
-
400: {
|
|
2842
|
-
description: string;
|
|
2843
|
-
};
|
|
2844
|
-
};
|
|
2845
|
-
};
|
|
2846
|
-
};
|
|
2847
|
-
}, {
|
|
2848
|
-
token: string;
|
|
2849
|
-
user: import("better-auth/plugins/phone-number").UserWithPhoneNumber;
|
|
2850
|
-
}>;
|
|
2851
|
-
sendPhoneNumberOTP: import("better-call").StrictEndpoint<"/phone-number/send-otp", {
|
|
2852
|
-
method: "POST";
|
|
2853
|
-
body: import("zod").ZodObject<{
|
|
2854
|
-
phoneNumber: import("zod").ZodString;
|
|
2855
|
-
}, import("zod/v4/core").$strip>;
|
|
2856
|
-
metadata: {
|
|
2857
|
-
openapi: {
|
|
2858
|
-
summary: string;
|
|
2859
|
-
description: string;
|
|
2860
|
-
responses: {
|
|
2861
|
-
200: {
|
|
2862
|
-
description: string;
|
|
2863
|
-
content: {
|
|
2864
|
-
"application/json": {
|
|
2865
|
-
schema: {
|
|
2866
|
-
type: "object";
|
|
2867
|
-
properties: {
|
|
2868
|
-
message: {
|
|
1183
|
+
url: {
|
|
2869
1184
|
type: string;
|
|
1185
|
+
nullable: boolean;
|
|
1186
|
+
description: string;
|
|
1187
|
+
};
|
|
1188
|
+
user: {
|
|
1189
|
+
$ref: string;
|
|
2870
1190
|
};
|
|
2871
1191
|
};
|
|
1192
|
+
required: string[];
|
|
2872
1193
|
};
|
|
2873
1194
|
};
|
|
2874
1195
|
};
|
|
2875
1196
|
};
|
|
2876
|
-
|
|
2877
|
-
};
|
|
2878
|
-
};
|
|
2879
|
-
}, {
|
|
2880
|
-
message: string;
|
|
2881
|
-
}>;
|
|
2882
|
-
consumePhoneNumberOTP: import("better-call").StrictEndpoint<string, {
|
|
2883
|
-
method: "POST";
|
|
2884
|
-
body: import("zod").ZodObject<{
|
|
2885
|
-
phoneNumber: import("zod").ZodString;
|
|
2886
|
-
code: import("zod").ZodString;
|
|
2887
|
-
}, import("zod/v4/core").$strip>;
|
|
2888
|
-
metadata: {
|
|
2889
|
-
readonly scope: "server";
|
|
2890
|
-
};
|
|
2891
|
-
}, {
|
|
2892
|
-
status: boolean;
|
|
2893
|
-
}>;
|
|
2894
|
-
verifyPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/verify", {
|
|
2895
|
-
method: "POST";
|
|
2896
|
-
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
2897
|
-
phoneNumber: import("zod").ZodString;
|
|
2898
|
-
code: import("zod").ZodString;
|
|
2899
|
-
disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2900
|
-
updatePhoneNumber: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2901
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2902
|
-
metadata: {
|
|
2903
|
-
openapi: {
|
|
2904
|
-
summary: string;
|
|
2905
|
-
description: string;
|
|
2906
|
-
responses: {
|
|
2907
|
-
"200": {
|
|
1197
|
+
422: {
|
|
2908
1198
|
description: string;
|
|
2909
1199
|
content: {
|
|
2910
1200
|
"application/json": {
|
|
2911
1201
|
schema: {
|
|
2912
1202
|
type: "object";
|
|
2913
1203
|
properties: {
|
|
2914
|
-
|
|
2915
|
-
type: string;
|
|
2916
|
-
description: string;
|
|
2917
|
-
enum: boolean[];
|
|
2918
|
-
};
|
|
2919
|
-
token: {
|
|
2920
|
-
type: string;
|
|
2921
|
-
nullable: boolean;
|
|
2922
|
-
description: string;
|
|
2923
|
-
};
|
|
2924
|
-
user: {
|
|
1204
|
+
message: {
|
|
2925
1205
|
type: string;
|
|
2926
|
-
nullable: boolean;
|
|
2927
|
-
properties: {
|
|
2928
|
-
id: {
|
|
2929
|
-
type: string;
|
|
2930
|
-
description: string;
|
|
2931
|
-
};
|
|
2932
|
-
email: {
|
|
2933
|
-
type: string;
|
|
2934
|
-
format: string;
|
|
2935
|
-
nullable: boolean;
|
|
2936
|
-
description: string;
|
|
2937
|
-
};
|
|
2938
|
-
emailVerified: {
|
|
2939
|
-
type: string;
|
|
2940
|
-
nullable: boolean;
|
|
2941
|
-
description: string;
|
|
2942
|
-
};
|
|
2943
|
-
name: {
|
|
2944
|
-
type: string;
|
|
2945
|
-
nullable: boolean;
|
|
2946
|
-
description: string;
|
|
2947
|
-
};
|
|
2948
|
-
image: {
|
|
2949
|
-
type: string;
|
|
2950
|
-
format: string;
|
|
2951
|
-
nullable: boolean;
|
|
2952
|
-
description: string;
|
|
2953
|
-
};
|
|
2954
|
-
phoneNumber: {
|
|
2955
|
-
type: string;
|
|
2956
|
-
description: string;
|
|
2957
|
-
};
|
|
2958
|
-
phoneNumberVerified: {
|
|
2959
|
-
type: string;
|
|
2960
|
-
description: string;
|
|
2961
|
-
};
|
|
2962
|
-
createdAt: {
|
|
2963
|
-
type: string;
|
|
2964
|
-
format: string;
|
|
2965
|
-
description: string;
|
|
2966
|
-
};
|
|
2967
|
-
updatedAt: {
|
|
2968
|
-
type: string;
|
|
2969
|
-
format: string;
|
|
2970
|
-
description: string;
|
|
2971
|
-
};
|
|
2972
|
-
};
|
|
2973
|
-
required: string[];
|
|
2974
|
-
description: string;
|
|
2975
1206
|
};
|
|
2976
1207
|
};
|
|
2977
|
-
required: string[];
|
|
2978
1208
|
};
|
|
2979
1209
|
};
|
|
2980
1210
|
};
|
|
2981
1211
|
};
|
|
2982
|
-
400: {
|
|
2983
|
-
description: string;
|
|
2984
|
-
};
|
|
2985
1212
|
};
|
|
2986
1213
|
};
|
|
2987
1214
|
};
|
|
2988
1215
|
}, {
|
|
2989
|
-
|
|
1216
|
+
redirect: boolean;
|
|
2990
1217
|
token: string;
|
|
1218
|
+
url: string | undefined;
|
|
2991
1219
|
user: {
|
|
2992
1220
|
id: string;
|
|
2993
1221
|
createdAt: Date;
|
|
@@ -2996,121 +1224,92 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2996
1224
|
emailVerified: boolean;
|
|
2997
1225
|
name: string;
|
|
2998
1226
|
image?: string | null | undefined;
|
|
2999
|
-
} &
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
token: null;
|
|
3003
|
-
user: import("better-auth/plugins/phone-number").UserWithPhoneNumber;
|
|
3004
|
-
}>;
|
|
3005
|
-
requestPasswordResetPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/request-password-reset", {
|
|
3006
|
-
method: "POST";
|
|
3007
|
-
body: import("zod").ZodObject<{
|
|
3008
|
-
phoneNumber: import("zod").ZodString;
|
|
3009
|
-
}, import("zod/v4/core").$strip>;
|
|
3010
|
-
metadata: {
|
|
3011
|
-
openapi: {
|
|
3012
|
-
description: string;
|
|
3013
|
-
responses: {
|
|
3014
|
-
"200": {
|
|
3015
|
-
description: string;
|
|
3016
|
-
content: {
|
|
3017
|
-
"application/json": {
|
|
3018
|
-
schema: {
|
|
3019
|
-
type: "object";
|
|
3020
|
-
properties: {
|
|
3021
|
-
status: {
|
|
3022
|
-
type: string;
|
|
3023
|
-
description: string;
|
|
3024
|
-
enum: boolean[];
|
|
3025
|
-
};
|
|
3026
|
-
};
|
|
3027
|
-
required: string[];
|
|
3028
|
-
};
|
|
3029
|
-
};
|
|
3030
|
-
};
|
|
3031
|
-
};
|
|
3032
|
-
};
|
|
3033
|
-
};
|
|
1227
|
+
} & {
|
|
1228
|
+
username: string;
|
|
1229
|
+
displayUsername: string;
|
|
3034
1230
|
};
|
|
3035
|
-
}, {
|
|
3036
|
-
status: boolean;
|
|
3037
1231
|
}>;
|
|
3038
|
-
|
|
1232
|
+
isUsernameAvailable: import("better-call").StrictEndpoint<"/is-username-available", {
|
|
3039
1233
|
method: "POST";
|
|
3040
1234
|
body: import("zod").ZodObject<{
|
|
3041
|
-
|
|
3042
|
-
phoneNumber: import("zod").ZodString;
|
|
3043
|
-
newPassword: import("zod").ZodString;
|
|
1235
|
+
username: import("zod").ZodString;
|
|
3044
1236
|
}, import("zod/v4/core").$strip>;
|
|
3045
|
-
metadata: {
|
|
3046
|
-
openapi: {
|
|
3047
|
-
description: string;
|
|
3048
|
-
responses: {
|
|
3049
|
-
"200": {
|
|
3050
|
-
description: string;
|
|
3051
|
-
content: {
|
|
3052
|
-
"application/json": {
|
|
3053
|
-
schema: {
|
|
3054
|
-
type: "object";
|
|
3055
|
-
properties: {
|
|
3056
|
-
status: {
|
|
3057
|
-
type: string;
|
|
3058
|
-
description: string;
|
|
3059
|
-
enum: boolean[];
|
|
3060
|
-
};
|
|
3061
|
-
};
|
|
3062
|
-
required: string[];
|
|
3063
|
-
};
|
|
3064
|
-
};
|
|
3065
|
-
};
|
|
3066
|
-
};
|
|
3067
|
-
};
|
|
3068
|
-
};
|
|
3069
|
-
};
|
|
3070
1237
|
}, {
|
|
3071
|
-
|
|
1238
|
+
available: boolean;
|
|
3072
1239
|
}>;
|
|
3073
1240
|
};
|
|
3074
1241
|
schema: {
|
|
3075
1242
|
user: {
|
|
3076
1243
|
fields: {
|
|
3077
|
-
|
|
1244
|
+
username: {
|
|
3078
1245
|
type: "string";
|
|
3079
1246
|
required: false;
|
|
3080
|
-
unique: true;
|
|
3081
1247
|
sortable: true;
|
|
1248
|
+
unique: true;
|
|
3082
1249
|
returned: true;
|
|
1250
|
+
transform: {
|
|
1251
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
1252
|
+
};
|
|
3083
1253
|
};
|
|
3084
|
-
|
|
3085
|
-
type: "
|
|
1254
|
+
displayUsername: {
|
|
1255
|
+
type: "string";
|
|
3086
1256
|
required: false;
|
|
3087
|
-
|
|
3088
|
-
|
|
1257
|
+
transform: {
|
|
1258
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | unknown[] | Record<string, unknown> | null | undefined;
|
|
1259
|
+
};
|
|
3089
1260
|
};
|
|
3090
1261
|
};
|
|
3091
1262
|
};
|
|
3092
1263
|
};
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
1264
|
+
hooks: {
|
|
1265
|
+
before: {
|
|
1266
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
1267
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
1268
|
+
}[];
|
|
1269
|
+
};
|
|
1270
|
+
options: import("better-auth/plugins").UsernameOptions | undefined;
|
|
3099
1271
|
$ERROR_CODES: {
|
|
3100
|
-
|
|
3101
|
-
INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
|
|
3102
|
-
TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
|
|
3103
|
-
INVALID_PHONE_NUMBER: import("better-auth").RawError<"INVALID_PHONE_NUMBER">;
|
|
3104
|
-
PHONE_NUMBER_EXIST: import("better-auth").RawError<"PHONE_NUMBER_EXIST">;
|
|
3105
|
-
PHONE_NUMBER_NOT_EXIST: import("better-auth").RawError<"PHONE_NUMBER_NOT_EXIST">;
|
|
3106
|
-
INVALID_PHONE_NUMBER_OR_PASSWORD: import("better-auth").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
|
|
1272
|
+
EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
|
|
3107
1273
|
UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
1274
|
+
INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
|
|
1275
|
+
USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
|
|
1276
|
+
USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
|
|
1277
|
+
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
1278
|
+
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
1279
|
+
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
1280
|
+
USERNAME_IS_IMMUTABLE: import("better-auth").RawError<"USERNAME_IS_IMMUTABLE">;
|
|
3112
1281
|
};
|
|
3113
|
-
}
|
|
1282
|
+
};
|
|
1283
|
+
atomListeners: {
|
|
1284
|
+
matcher: (path: string) => path is "/sign-in/username";
|
|
1285
|
+
signal: "$sessionSignal";
|
|
1286
|
+
}[];
|
|
1287
|
+
$ERROR_CODES: {
|
|
1288
|
+
EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
|
|
1289
|
+
UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
|
|
1290
|
+
INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
|
|
1291
|
+
USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
|
|
1292
|
+
USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
|
|
1293
|
+
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
1294
|
+
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
1295
|
+
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
1296
|
+
USERNAME_IS_IMMUTABLE: import("better-auth").RawError<"USERNAME_IS_IMMUTABLE">;
|
|
1297
|
+
};
|
|
1298
|
+
} | {
|
|
1299
|
+
id: "multi-session";
|
|
1300
|
+
version: string;
|
|
1301
|
+
$InferServerPlugin: ReturnType<typeof import("better-auth/plugins").multiSession>;
|
|
1302
|
+
atomListeners: {
|
|
1303
|
+
matcher(path: string): path is "/multi-session/set-active";
|
|
1304
|
+
signal: "$sessionSignal";
|
|
1305
|
+
}[];
|
|
1306
|
+
$ERROR_CODES: {
|
|
1307
|
+
INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
|
|
1308
|
+
};
|
|
1309
|
+
} | {
|
|
1310
|
+
id: "phoneNumber";
|
|
1311
|
+
version: string;
|
|
1312
|
+
$InferServerPlugin: ReturnType<typeof import("better-auth/plugins").phoneNumber>;
|
|
3114
1313
|
atomListeners: {
|
|
3115
1314
|
matcher(path: string): path is "/phone-number/verify" | "/sign-in/phone-number" | "/phone-number/update";
|
|
3116
1315
|
signal: "$sessionSignal";
|
|
@@ -3268,7 +1467,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
3268
1467
|
} | null) => void;
|
|
3269
1468
|
socialProviders: import("better-auth").OAuthProvider[];
|
|
3270
1469
|
authCookies: import("better-auth").BetterAuthCookies;
|
|
3271
|
-
logger: ReturnType<
|
|
1470
|
+
logger: ReturnType<typeof import("better-auth").createLogger>;
|
|
3272
1471
|
rateLimit: {
|
|
3273
1472
|
enabled: boolean;
|
|
3274
1473
|
window: number;
|
|
@@ -5051,8 +3250,8 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
5051
3250
|
} | {
|
|
5052
3251
|
id: "organization";
|
|
5053
3252
|
version: string;
|
|
5054
|
-
$InferServerPlugin: import("better-auth/
|
|
5055
|
-
ac: import("better-auth/
|
|
3253
|
+
$InferServerPlugin: import("better-auth/plugins").OrganizationPlugin<{
|
|
3254
|
+
ac: import("better-auth/plugins").AccessControl<{
|
|
5056
3255
|
readonly organization: readonly ["update", "delete"];
|
|
5057
3256
|
readonly member: readonly ["create", "update", "delete"];
|
|
5058
3257
|
readonly invitation: readonly ["create", "cancel"];
|
|
@@ -5060,9 +3259,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
5060
3259
|
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
5061
3260
|
}>;
|
|
5062
3261
|
roles: {
|
|
5063
|
-
admin: import("better-auth/
|
|
5064
|
-
member: import("better-auth/
|
|
5065
|
-
owner: import("better-auth/
|
|
3262
|
+
admin: import("better-auth/plugins").Role;
|
|
3263
|
+
member: import("better-auth/plugins").Role;
|
|
3264
|
+
owner: import("better-auth/plugins").Role;
|
|
5066
3265
|
};
|
|
5067
3266
|
teams: {
|
|
5068
3267
|
enabled: true;
|
|
@@ -5094,7 +3293,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
5094
3293
|
organizationId: string;
|
|
5095
3294
|
email: string;
|
|
5096
3295
|
role: "admin" | "member" | "owner";
|
|
5097
|
-
status: import("better-auth/
|
|
3296
|
+
status: import("better-auth/plugins").InvitationStatus;
|
|
5098
3297
|
inviterId: string;
|
|
5099
3298
|
expiresAt: Date;
|
|
5100
3299
|
createdAt: Date;
|
|
@@ -5128,7 +3327,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
5128
3327
|
organizationId: string;
|
|
5129
3328
|
email: string;
|
|
5130
3329
|
role: "admin" | "member" | "owner";
|
|
5131
|
-
status: import("better-auth/
|
|
3330
|
+
status: import("better-auth/plugins").InvitationStatus;
|
|
5132
3331
|
inviterId: string;
|
|
5133
3332
|
expiresAt: Date;
|
|
5134
3333
|
createdAt: Date;
|
|
@@ -5202,7 +3401,7 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
5202
3401
|
organizationId: string;
|
|
5203
3402
|
email: string;
|
|
5204
3403
|
role: "admin" | "member" | "owner";
|
|
5205
|
-
status: import("better-auth/
|
|
3404
|
+
status: import("better-auth/plugins").InvitationStatus;
|
|
5206
3405
|
inviterId: string;
|
|
5207
3406
|
expiresAt: Date;
|
|
5208
3407
|
createdAt: Date;
|