@xk2800/nextjs-template 0.6.1-beta.1 → 0.6.1-beta.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/components/auth/forgotPasswordForm.tsx +1 -1
- package/components/dashboard/twoFactorCard.tsx +2 -1
- package/dist/activity/logger.js +5 -1
- package/dist/activity/logger.js.map +1 -1
- package/dist/activity/logger.mjs +3 -3
- package/dist/activity/queries.d.mts +1 -1
- package/dist/activity/queries.d.ts +1 -1
- package/dist/activity/queries.js +5 -1
- package/dist/activity/queries.js.map +1 -1
- package/dist/activity/queries.mjs +2 -2
- package/dist/admin/queries.js +5 -1
- package/dist/admin/queries.js.map +1 -1
- package/dist/admin/queries.mjs +2 -2
- package/dist/auth/helpers.d.mts +15 -0
- package/dist/auth/helpers.d.ts +15 -0
- package/dist/auth/helpers.js +10 -4
- package/dist/auth/helpers.js.map +1 -1
- package/dist/auth/helpers.mjs +5 -5
- package/dist/auth/index.d.mts +289 -239
- package/dist/auth/index.d.ts +289 -239
- package/dist/auth/index.js +10 -4
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/index.mjs +5 -5
- package/dist/auth-client/index.d.mts +2844 -71
- package/dist/auth-client/index.d.ts +2844 -71
- package/dist/auth-client/index.js +1 -8
- package/dist/auth-client/index.js.map +1 -1
- package/dist/auth-client/index.mjs +1 -8
- package/dist/auth-client/index.mjs.map +1 -1
- package/dist/{chunk-LPL6U5RD.mjs → chunk-4B7MJOLH.mjs} +7 -3
- package/dist/chunk-4B7MJOLH.mjs.map +1 -0
- package/dist/{chunk-FJAZNE3I.mjs → chunk-5PYDAD4P.mjs} +3 -3
- package/dist/{chunk-FJAZNE3I.mjs.map → chunk-5PYDAD4P.mjs.map} +1 -1
- package/dist/{chunk-AGUEAXPN.mjs → chunk-IF3JZRSZ.mjs} +4 -4
- package/dist/{chunk-AGUEAXPN.mjs.map → chunk-IF3JZRSZ.mjs.map} +1 -1
- package/dist/{chunk-B4FKFE7P.mjs → chunk-OHAUKE2Q.mjs} +4 -4
- package/dist/{chunk-B4FKFE7P.mjs.map → chunk-OHAUKE2Q.mjs.map} +1 -1
- package/dist/{chunk-ZGAODGU3.mjs → chunk-V72CFFU2.mjs} +12 -10
- package/dist/chunk-V72CFFU2.mjs.map +1 -0
- package/dist/db/index.d.mts +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +5 -1
- package/dist/db/index.js.map +1 -1
- package/dist/db/index.mjs +2 -2
- package/dist/db/schema.d.mts +1 -1
- package/dist/db/schema.d.ts +1 -1
- package/dist/db/schema.js +5 -1
- package/dist/db/schema.js.map +1 -1
- package/dist/db/schema.mjs +1 -1
- package/dist/{schema-c2sve45Z.d.mts → schema-BrBmQFkn.d.mts} +51 -0
- package/dist/{schema-c2sve45Z.d.ts → schema-BrBmQFkn.d.ts} +51 -0
- package/dist/sessions/queries.js +5 -1
- package/dist/sessions/queries.js.map +1 -1
- package/dist/sessions/queries.mjs +2 -2
- package/dist/settings/queries.d.mts +1 -1
- package/dist/settings/queries.d.ts +1 -1
- package/dist/settings/queries.js +5 -1
- package/dist/settings/queries.js.map +1 -1
- package/dist/settings/queries.mjs +3 -3
- package/dist/users/queries.js +5 -1
- package/dist/users/queries.js.map +1 -1
- package/dist/users/queries.mjs +2 -2
- package/lib/auth-client.ts +2 -21
- package/package.json +4 -4
- package/dist/chunk-LPL6U5RD.mjs.map +0 -1
- package/dist/chunk-ZGAODGU3.mjs.map +0 -1
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _better_auth_passkey from '@better-auth/passkey';
|
|
2
2
|
import * as _simplewebauthn_server from '@simplewebauthn/server';
|
|
3
|
-
import * as better_auth_plugins from 'better-auth/plugins';
|
|
4
3
|
import * as zod_v4_core from 'zod/v4/core';
|
|
5
4
|
import * as zod from 'zod';
|
|
5
|
+
import * as better_auth_plugins from 'better-auth/plugins';
|
|
6
6
|
import * as better_call from 'better-call';
|
|
7
7
|
import * as better_auth from 'better-auth';
|
|
8
8
|
import { BetterAuthOptions } from 'better-auth';
|
|
@@ -70,70 +70,15 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
hooks: {
|
|
73
|
-
before: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void
|
|
74
|
-
after: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void
|
|
73
|
+
before: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void>>;
|
|
74
|
+
after: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void>>;
|
|
75
75
|
};
|
|
76
76
|
baseURL: string;
|
|
77
77
|
secret: string;
|
|
78
78
|
onAPIError: {
|
|
79
79
|
errorURL: string;
|
|
80
80
|
};
|
|
81
|
-
plugins: [
|
|
82
|
-
id: "one-tap";
|
|
83
|
-
version: string;
|
|
84
|
-
endpoints: {
|
|
85
|
-
oneTapCallback: better_call.StrictEndpoint<"/one-tap/callback", {
|
|
86
|
-
method: "POST";
|
|
87
|
-
body: zod.ZodObject<{
|
|
88
|
-
idToken: zod.ZodString;
|
|
89
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
90
|
-
}, zod_v4_core.$strip>;
|
|
91
|
-
metadata: {
|
|
92
|
-
openapi: {
|
|
93
|
-
summary: string;
|
|
94
|
-
description: string;
|
|
95
|
-
responses: {
|
|
96
|
-
200: {
|
|
97
|
-
description: string;
|
|
98
|
-
content: {
|
|
99
|
-
"application/json": {
|
|
100
|
-
schema: {
|
|
101
|
-
type: "object";
|
|
102
|
-
properties: {
|
|
103
|
-
session: {
|
|
104
|
-
$ref: string;
|
|
105
|
-
};
|
|
106
|
-
user: {
|
|
107
|
-
$ref: string;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
400: {
|
|
115
|
-
description: string;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
}, {
|
|
121
|
-
error: string;
|
|
122
|
-
} | {
|
|
123
|
-
token: string;
|
|
124
|
-
user: {
|
|
125
|
-
id: string;
|
|
126
|
-
createdAt: Date;
|
|
127
|
-
updatedAt: Date;
|
|
128
|
-
email: string;
|
|
129
|
-
emailVerified: boolean;
|
|
130
|
-
name: string;
|
|
131
|
-
image?: string | null | undefined;
|
|
132
|
-
};
|
|
133
|
-
}>;
|
|
134
|
-
};
|
|
135
|
-
options: better_auth_plugins.OneTapOptions | undefined;
|
|
136
|
-
}[], {
|
|
81
|
+
plugins: [{
|
|
137
82
|
id: "admin";
|
|
138
83
|
version: string;
|
|
139
84
|
init(): {
|
|
@@ -183,7 +128,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
183
128
|
hooks: {
|
|
184
129
|
after: {
|
|
185
130
|
matcher(context: better_auth.HookEndpointContext): boolean;
|
|
186
|
-
handler: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<better_auth_plugins.SessionWithImpersonatedBy[] | undefined
|
|
131
|
+
handler: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<better_auth_plugins.SessionWithImpersonatedBy[] | undefined>>;
|
|
187
132
|
}[];
|
|
188
133
|
};
|
|
189
134
|
endpoints: {
|
|
@@ -194,7 +139,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
194
139
|
role: zod.ZodUnion<readonly [zod.ZodString, zod.ZodArray<zod.ZodString>]>;
|
|
195
140
|
}, zod_v4_core.$strip>;
|
|
196
141
|
requireHeaders: true;
|
|
197
|
-
use: (
|
|
142
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
198
143
|
session: {
|
|
199
144
|
user: better_auth_plugins.UserWithRole;
|
|
200
145
|
session: {
|
|
@@ -208,7 +153,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
208
153
|
userAgent?: string | null | undefined;
|
|
209
154
|
};
|
|
210
155
|
};
|
|
211
|
-
}
|
|
156
|
+
}>>[];
|
|
212
157
|
metadata: {
|
|
213
158
|
openapi: {
|
|
214
159
|
operationId: string;
|
|
@@ -247,7 +192,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
247
192
|
query: zod.ZodObject<{
|
|
248
193
|
id: zod.ZodString;
|
|
249
194
|
}, zod_v4_core.$strip>;
|
|
250
|
-
use: (
|
|
195
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
251
196
|
session: {
|
|
252
197
|
user: better_auth_plugins.UserWithRole;
|
|
253
198
|
session: {
|
|
@@ -261,7 +206,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
261
206
|
userAgent?: string | null | undefined;
|
|
262
207
|
};
|
|
263
208
|
};
|
|
264
|
-
}
|
|
209
|
+
}>>[];
|
|
265
210
|
metadata: {
|
|
266
211
|
openapi: {
|
|
267
212
|
operationId: string;
|
|
@@ -338,7 +283,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
338
283
|
userId: zod.ZodCoercedString<unknown>;
|
|
339
284
|
data: zod.ZodRecord<zod.ZodAny, zod.ZodAny>;
|
|
340
285
|
}, zod_v4_core.$strip>;
|
|
341
|
-
use: (
|
|
286
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
342
287
|
session: {
|
|
343
288
|
user: better_auth_plugins.UserWithRole;
|
|
344
289
|
session: {
|
|
@@ -352,7 +297,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
352
297
|
userAgent?: string | null | undefined;
|
|
353
298
|
};
|
|
354
299
|
};
|
|
355
|
-
}
|
|
300
|
+
}>>[];
|
|
356
301
|
metadata: {
|
|
357
302
|
openapi: {
|
|
358
303
|
operationId: string;
|
|
@@ -380,7 +325,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
380
325
|
}, better_auth_plugins.UserWithRole>;
|
|
381
326
|
listUsers: better_call.StrictEndpoint<"/admin/list-users", {
|
|
382
327
|
method: "GET";
|
|
383
|
-
use: (
|
|
328
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
384
329
|
session: {
|
|
385
330
|
user: better_auth_plugins.UserWithRole;
|
|
386
331
|
session: {
|
|
@@ -394,7 +339,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
394
339
|
userAgent?: string | null | undefined;
|
|
395
340
|
};
|
|
396
341
|
};
|
|
397
|
-
}
|
|
342
|
+
}>>[];
|
|
398
343
|
query: zod.ZodObject<{
|
|
399
344
|
searchValue: zod.ZodOptional<zod.ZodString>;
|
|
400
345
|
searchField: zod.ZodOptional<zod.ZodEnum<{
|
|
@@ -416,13 +361,13 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
416
361
|
filterField: zod.ZodOptional<zod.ZodString>;
|
|
417
362
|
filterValue: zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, zod.ZodBoolean]>, zod.ZodArray<zod.ZodString>]>, zod.ZodArray<zod.ZodNumber>]>>;
|
|
418
363
|
filterOperator: zod.ZodOptional<zod.ZodEnum<{
|
|
364
|
+
in: "in";
|
|
365
|
+
lte: "lte";
|
|
419
366
|
eq: "eq";
|
|
420
367
|
ne: "ne";
|
|
368
|
+
lt: "lt";
|
|
421
369
|
gt: "gt";
|
|
422
370
|
gte: "gte";
|
|
423
|
-
lt: "lt";
|
|
424
|
-
lte: "lte";
|
|
425
|
-
in: "in";
|
|
426
371
|
not_in: "not_in";
|
|
427
372
|
contains: "contains";
|
|
428
373
|
starts_with: "starts_with";
|
|
@@ -472,7 +417,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
472
417
|
}>;
|
|
473
418
|
listUserSessions: better_call.StrictEndpoint<"/admin/list-user-sessions", {
|
|
474
419
|
method: "POST";
|
|
475
|
-
use: (
|
|
420
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
476
421
|
session: {
|
|
477
422
|
user: better_auth_plugins.UserWithRole;
|
|
478
423
|
session: {
|
|
@@ -486,7 +431,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
486
431
|
userAgent?: string | null | undefined;
|
|
487
432
|
};
|
|
488
433
|
};
|
|
489
|
-
}
|
|
434
|
+
}>>[];
|
|
490
435
|
body: zod.ZodObject<{
|
|
491
436
|
userId: zod.ZodCoercedString<unknown>;
|
|
492
437
|
}, zod_v4_core.$strip>;
|
|
@@ -525,7 +470,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
525
470
|
body: zod.ZodObject<{
|
|
526
471
|
userId: zod.ZodCoercedString<unknown>;
|
|
527
472
|
}, zod_v4_core.$strip>;
|
|
528
|
-
use: (
|
|
473
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
529
474
|
session: {
|
|
530
475
|
user: better_auth_plugins.UserWithRole;
|
|
531
476
|
session: {
|
|
@@ -539,7 +484,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
539
484
|
userAgent?: string | null | undefined;
|
|
540
485
|
};
|
|
541
486
|
};
|
|
542
|
-
}
|
|
487
|
+
}>>[];
|
|
543
488
|
metadata: {
|
|
544
489
|
openapi: {
|
|
545
490
|
operationId: string;
|
|
@@ -574,7 +519,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
574
519
|
banReason: zod.ZodOptional<zod.ZodString>;
|
|
575
520
|
banExpiresIn: zod.ZodOptional<zod.ZodNumber>;
|
|
576
521
|
}, zod_v4_core.$strip>;
|
|
577
|
-
use: (
|
|
522
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
578
523
|
session: {
|
|
579
524
|
user: better_auth_plugins.UserWithRole;
|
|
580
525
|
session: {
|
|
@@ -588,7 +533,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
588
533
|
userAgent?: string | null | undefined;
|
|
589
534
|
};
|
|
590
535
|
};
|
|
591
|
-
}
|
|
536
|
+
}>>[];
|
|
592
537
|
metadata: {
|
|
593
538
|
openapi: {
|
|
594
539
|
operationId: string;
|
|
@@ -621,7 +566,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
621
566
|
body: zod.ZodObject<{
|
|
622
567
|
userId: zod.ZodCoercedString<unknown>;
|
|
623
568
|
}, zod_v4_core.$strip>;
|
|
624
|
-
use: (
|
|
569
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
625
570
|
session: {
|
|
626
571
|
user: better_auth_plugins.UserWithRole;
|
|
627
572
|
session: {
|
|
@@ -635,7 +580,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
635
580
|
userAgent?: string | null | undefined;
|
|
636
581
|
};
|
|
637
582
|
};
|
|
638
|
-
}
|
|
583
|
+
}>>[];
|
|
639
584
|
metadata: {
|
|
640
585
|
openapi: {
|
|
641
586
|
operationId: string;
|
|
@@ -705,7 +650,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
705
650
|
body: zod.ZodObject<{
|
|
706
651
|
sessionToken: zod.ZodString;
|
|
707
652
|
}, zod_v4_core.$strip>;
|
|
708
|
-
use: (
|
|
653
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
709
654
|
session: {
|
|
710
655
|
user: better_auth_plugins.UserWithRole;
|
|
711
656
|
session: {
|
|
@@ -719,7 +664,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
719
664
|
userAgent?: string | null | undefined;
|
|
720
665
|
};
|
|
721
666
|
};
|
|
722
|
-
}
|
|
667
|
+
}>>[];
|
|
723
668
|
metadata: {
|
|
724
669
|
openapi: {
|
|
725
670
|
operationId: string;
|
|
@@ -752,7 +697,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
752
697
|
body: zod.ZodObject<{
|
|
753
698
|
userId: zod.ZodCoercedString<unknown>;
|
|
754
699
|
}, zod_v4_core.$strip>;
|
|
755
|
-
use: (
|
|
700
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
756
701
|
session: {
|
|
757
702
|
user: better_auth_plugins.UserWithRole;
|
|
758
703
|
session: {
|
|
@@ -766,7 +711,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
766
711
|
userAgent?: string | null | undefined;
|
|
767
712
|
};
|
|
768
713
|
};
|
|
769
|
-
}
|
|
714
|
+
}>>[];
|
|
770
715
|
metadata: {
|
|
771
716
|
openapi: {
|
|
772
717
|
operationId: string;
|
|
@@ -799,7 +744,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
799
744
|
body: zod.ZodObject<{
|
|
800
745
|
userId: zod.ZodCoercedString<unknown>;
|
|
801
746
|
}, zod_v4_core.$strip>;
|
|
802
|
-
use: (
|
|
747
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
803
748
|
session: {
|
|
804
749
|
user: better_auth_plugins.UserWithRole;
|
|
805
750
|
session: {
|
|
@@ -813,7 +758,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
813
758
|
userAgent?: string | null | undefined;
|
|
814
759
|
};
|
|
815
760
|
};
|
|
816
|
-
}
|
|
761
|
+
}>>[];
|
|
817
762
|
metadata: {
|
|
818
763
|
openapi: {
|
|
819
764
|
operationId: string;
|
|
@@ -847,7 +792,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
847
792
|
newPassword: zod.ZodString;
|
|
848
793
|
userId: zod.ZodCoercedString<unknown>;
|
|
849
794
|
}, zod_v4_core.$strip>;
|
|
850
|
-
use: (
|
|
795
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
851
796
|
session: {
|
|
852
797
|
user: better_auth_plugins.UserWithRole;
|
|
853
798
|
session: {
|
|
@@ -861,7 +806,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
861
806
|
userAgent?: string | null | undefined;
|
|
862
807
|
};
|
|
863
808
|
};
|
|
864
|
-
}
|
|
809
|
+
}>>[];
|
|
865
810
|
metadata: {
|
|
866
811
|
openapi: {
|
|
867
812
|
operationId: string;
|
|
@@ -1036,12 +981,20 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1036
981
|
method: "POST";
|
|
1037
982
|
body: zod.ZodObject<{
|
|
1038
983
|
password: zod.ZodOptional<zod.ZodString>;
|
|
984
|
+
method: zod.ZodDefault<zod.ZodEnum<{
|
|
985
|
+
otp: "otp";
|
|
986
|
+
totp: "totp";
|
|
987
|
+
}>>;
|
|
1039
988
|
issuer: zod.ZodOptional<zod.ZodString>;
|
|
1040
989
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
1041
990
|
password: zod.ZodString;
|
|
991
|
+
method: zod.ZodDefault<zod.ZodEnum<{
|
|
992
|
+
otp: "otp";
|
|
993
|
+
totp: "totp";
|
|
994
|
+
}>>;
|
|
1042
995
|
issuer: zod.ZodOptional<zod.ZodString>;
|
|
1043
996
|
}, zod_v4_core.$strip>;
|
|
1044
|
-
use: (
|
|
997
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1045
998
|
session: {
|
|
1046
999
|
session: Record<string, any> & {
|
|
1047
1000
|
id: string;
|
|
@@ -1063,7 +1016,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1063
1016
|
image?: string | null | undefined;
|
|
1064
1017
|
};
|
|
1065
1018
|
};
|
|
1066
|
-
}
|
|
1019
|
+
}>>[];
|
|
1067
1020
|
metadata: {
|
|
1068
1021
|
openapi: {
|
|
1069
1022
|
summary: string;
|
|
@@ -1076,6 +1029,11 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1076
1029
|
schema: {
|
|
1077
1030
|
type: "object";
|
|
1078
1031
|
properties: {
|
|
1032
|
+
method: {
|
|
1033
|
+
type: string;
|
|
1034
|
+
enum: string[];
|
|
1035
|
+
description: string;
|
|
1036
|
+
};
|
|
1079
1037
|
totpURI: {
|
|
1080
1038
|
type: string;
|
|
1081
1039
|
description: string;
|
|
@@ -1088,6 +1046,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1088
1046
|
description: string;
|
|
1089
1047
|
};
|
|
1090
1048
|
};
|
|
1049
|
+
required: string[];
|
|
1091
1050
|
};
|
|
1092
1051
|
};
|
|
1093
1052
|
};
|
|
@@ -1096,6 +1055,9 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1096
1055
|
};
|
|
1097
1056
|
};
|
|
1098
1057
|
}, {
|
|
1058
|
+
method: "otp";
|
|
1059
|
+
} | {
|
|
1060
|
+
method: "totp";
|
|
1099
1061
|
totpURI: string;
|
|
1100
1062
|
backupCodes: string[];
|
|
1101
1063
|
}>;
|
|
@@ -1106,7 +1068,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1106
1068
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
1107
1069
|
password: zod.ZodString;
|
|
1108
1070
|
}, zod_v4_core.$strip>;
|
|
1109
|
-
use: (
|
|
1071
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1110
1072
|
session: {
|
|
1111
1073
|
session: Record<string, any> & {
|
|
1112
1074
|
id: string;
|
|
@@ -1128,7 +1090,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1128
1090
|
image?: string | null | undefined;
|
|
1129
1091
|
};
|
|
1130
1092
|
};
|
|
1131
|
-
}
|
|
1093
|
+
}>>[];
|
|
1132
1094
|
metadata: {
|
|
1133
1095
|
openapi: {
|
|
1134
1096
|
summary: string;
|
|
@@ -1273,7 +1235,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1273
1235
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
1274
1236
|
password: zod.ZodString;
|
|
1275
1237
|
}, zod_v4_core.$strip>;
|
|
1276
|
-
use: (
|
|
1238
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1277
1239
|
session: {
|
|
1278
1240
|
session: Record<string, any> & {
|
|
1279
1241
|
id: string;
|
|
@@ -1295,7 +1257,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1295
1257
|
image?: string | null | undefined;
|
|
1296
1258
|
};
|
|
1297
1259
|
};
|
|
1298
|
-
}
|
|
1260
|
+
}>>[];
|
|
1299
1261
|
metadata: {
|
|
1300
1262
|
openapi: {
|
|
1301
1263
|
description: string;
|
|
@@ -1494,7 +1456,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1494
1456
|
}>;
|
|
1495
1457
|
getTOTPURI: better_call.StrictEndpoint<"/two-factor/get-totp-uri", {
|
|
1496
1458
|
method: "POST";
|
|
1497
|
-
use: (
|
|
1459
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1498
1460
|
session: {
|
|
1499
1461
|
session: Record<string, any> & {
|
|
1500
1462
|
id: string;
|
|
@@ -1516,7 +1478,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1516
1478
|
image?: string | null | undefined;
|
|
1517
1479
|
};
|
|
1518
1480
|
};
|
|
1519
|
-
}
|
|
1481
|
+
}>>[];
|
|
1520
1482
|
body: zod.ZodObject<{
|
|
1521
1483
|
password: zod.ZodOptional<zod.ZodString>;
|
|
1522
1484
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
@@ -1599,10 +1561,10 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1599
1561
|
hooks: {
|
|
1600
1562
|
after: {
|
|
1601
1563
|
matcher(context: better_auth.HookEndpointContext): boolean;
|
|
1602
|
-
handler: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1564
|
+
handler: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1603
1565
|
twoFactorRedirect: boolean;
|
|
1604
1566
|
twoFactorMethods: string[];
|
|
1605
|
-
} | undefined
|
|
1567
|
+
} | undefined>>;
|
|
1606
1568
|
}[];
|
|
1607
1569
|
};
|
|
1608
1570
|
schema: {
|
|
@@ -1668,8 +1630,11 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1668
1630
|
}[];
|
|
1669
1631
|
$ERROR_CODES: {
|
|
1670
1632
|
OTP_NOT_ENABLED: better_auth.RawError<"OTP_NOT_ENABLED">;
|
|
1633
|
+
OTP_NOT_CONFIGURED: better_auth.RawError<"OTP_NOT_CONFIGURED">;
|
|
1671
1634
|
OTP_HAS_EXPIRED: better_auth.RawError<"OTP_HAS_EXPIRED">;
|
|
1672
1635
|
TOTP_NOT_ENABLED: better_auth.RawError<"TOTP_NOT_ENABLED">;
|
|
1636
|
+
TOTP_ALREADY_ENABLED: better_auth.RawError<"TOTP_ALREADY_ENABLED">;
|
|
1637
|
+
TOTP_NOT_CONFIGURED: better_auth.RawError<"TOTP_NOT_CONFIGURED">;
|
|
1673
1638
|
TWO_FACTOR_NOT_ENABLED: better_auth.RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
1674
1639
|
BACKUP_CODES_NOT_ENABLED: better_auth.RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
1675
1640
|
INVALID_BACKUP_CODE: better_auth.RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -1684,7 +1649,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1684
1649
|
endpoints: {
|
|
1685
1650
|
generatePasskeyRegistrationOptions: better_call.StrictEndpoint<"/passkey/generate-register-options", {
|
|
1686
1651
|
method: "GET";
|
|
1687
|
-
use: (
|
|
1652
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1688
1653
|
session: {
|
|
1689
1654
|
session: Record<string, any> & {
|
|
1690
1655
|
id: string;
|
|
@@ -1706,7 +1671,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1706
1671
|
image?: string | null | undefined;
|
|
1707
1672
|
};
|
|
1708
1673
|
};
|
|
1709
|
-
}
|
|
1674
|
+
}>>[];
|
|
1710
1675
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
1711
1676
|
authenticatorAttachment: zod.ZodOptional<zod.ZodEnum<{
|
|
1712
1677
|
platform: "platform";
|
|
@@ -1719,15 +1684,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1719
1684
|
openapi: {
|
|
1720
1685
|
operationId: string;
|
|
1721
1686
|
description: string;
|
|
1722
|
-
parameters:
|
|
1723
|
-
name: string;
|
|
1724
|
-
in: "query";
|
|
1725
|
-
required: false;
|
|
1726
|
-
description: string;
|
|
1727
|
-
schema: {
|
|
1728
|
-
type: "string";
|
|
1729
|
-
};
|
|
1730
|
-
}[];
|
|
1687
|
+
parameters: better_call.OpenAPIParameter[];
|
|
1731
1688
|
responses: {
|
|
1732
1689
|
200: {
|
|
1733
1690
|
description: string;
|
|
@@ -1929,8 +1886,9 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1929
1886
|
body: zod.ZodObject<{
|
|
1930
1887
|
response: zod.ZodAny;
|
|
1931
1888
|
name: zod.ZodOptional<zod.ZodString>;
|
|
1889
|
+
createSession: zod.ZodOptional<zod.ZodBoolean>;
|
|
1932
1890
|
}, zod_v4_core.$strip>;
|
|
1933
|
-
use: (
|
|
1891
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1934
1892
|
session: {
|
|
1935
1893
|
session: Record<string, any> & {
|
|
1936
1894
|
id: string;
|
|
@@ -1952,7 +1910,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1952
1910
|
image?: string | null | undefined;
|
|
1953
1911
|
};
|
|
1954
1912
|
};
|
|
1955
|
-
}
|
|
1913
|
+
}>>[];
|
|
1956
1914
|
metadata: {
|
|
1957
1915
|
openapi: {
|
|
1958
1916
|
operationId: string;
|
|
@@ -1963,7 +1921,20 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
1963
1921
|
content: {
|
|
1964
1922
|
"application/json": {
|
|
1965
1923
|
schema: {
|
|
1966
|
-
|
|
1924
|
+
readonly type: "object";
|
|
1925
|
+
readonly allOf: readonly [{
|
|
1926
|
+
readonly $ref: "#/components/schemas/Passkey";
|
|
1927
|
+
}, {
|
|
1928
|
+
readonly type: "object";
|
|
1929
|
+
readonly properties: {
|
|
1930
|
+
readonly session: {
|
|
1931
|
+
readonly $ref: "#/components/schemas/Session";
|
|
1932
|
+
};
|
|
1933
|
+
readonly user: {
|
|
1934
|
+
readonly $ref: "#/components/schemas/User";
|
|
1935
|
+
};
|
|
1936
|
+
};
|
|
1937
|
+
}];
|
|
1967
1938
|
};
|
|
1968
1939
|
};
|
|
1969
1940
|
};
|
|
@@ -2034,7 +2005,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2034
2005
|
}>;
|
|
2035
2006
|
listPasskeys: better_call.StrictEndpoint<"/passkey/list-user-passkeys", {
|
|
2036
2007
|
method: "GET";
|
|
2037
|
-
use: (
|
|
2008
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2038
2009
|
session: {
|
|
2039
2010
|
session: Record<string, any> & {
|
|
2040
2011
|
id: string;
|
|
@@ -2056,7 +2027,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2056
2027
|
image?: string | null | undefined;
|
|
2057
2028
|
};
|
|
2058
2029
|
};
|
|
2059
|
-
}
|
|
2030
|
+
}>>[];
|
|
2060
2031
|
metadata: {
|
|
2061
2032
|
openapi: {
|
|
2062
2033
|
description: string;
|
|
@@ -2085,7 +2056,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2085
2056
|
body: zod.ZodObject<{
|
|
2086
2057
|
id: zod.ZodString;
|
|
2087
2058
|
}, zod_v4_core.$strip>;
|
|
2088
|
-
use: ((
|
|
2059
|
+
use: (better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2089
2060
|
session: {
|
|
2090
2061
|
session: Record<string, any> & {
|
|
2091
2062
|
id: string;
|
|
@@ -2107,9 +2078,9 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2107
2078
|
image?: string | null | undefined;
|
|
2108
2079
|
};
|
|
2109
2080
|
};
|
|
2110
|
-
}
|
|
2081
|
+
}>> | better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2111
2082
|
verifiedResource: {};
|
|
2112
|
-
}
|
|
2083
|
+
}>>)[];
|
|
2113
2084
|
metadata: {
|
|
2114
2085
|
openapi: {
|
|
2115
2086
|
description: string;
|
|
@@ -2143,7 +2114,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2143
2114
|
id: zod.ZodString;
|
|
2144
2115
|
name: zod.ZodString;
|
|
2145
2116
|
}, zod_v4_core.$strip>;
|
|
2146
|
-
use: ((
|
|
2117
|
+
use: (better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2147
2118
|
session: {
|
|
2148
2119
|
session: Record<string, any> & {
|
|
2149
2120
|
id: string;
|
|
@@ -2165,9 +2136,9 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2165
2136
|
image?: string | null | undefined;
|
|
2166
2137
|
};
|
|
2167
2138
|
};
|
|
2168
|
-
}
|
|
2139
|
+
}>> | better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2169
2140
|
verifiedResource: {};
|
|
2170
|
-
}
|
|
2141
|
+
}>>)[];
|
|
2171
2142
|
metadata: {
|
|
2172
2143
|
openapi: {
|
|
2173
2144
|
description: string;
|
|
@@ -2254,6 +2225,7 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2254
2225
|
PASSKEY_NOT_FOUND: better_auth.RawError<"PASSKEY_NOT_FOUND">;
|
|
2255
2226
|
AUTHENTICATION_FAILED: better_auth.RawError<"AUTHENTICATION_FAILED">;
|
|
2256
2227
|
UNABLE_TO_CREATE_SESSION: better_auth.RawError<"UNABLE_TO_CREATE_SESSION">;
|
|
2228
|
+
USER_NOT_FOUND: better_auth.RawError<"USER_NOT_FOUND">;
|
|
2257
2229
|
FAILED_TO_UPDATE_PASSKEY: better_auth.RawError<"FAILED_TO_UPDATE_PASSKEY">;
|
|
2258
2230
|
PREVIOUSLY_REGISTERED: better_auth.RawError<"PREVIOUSLY_REGISTERED">;
|
|
2259
2231
|
REGISTRATION_CANCELLED: better_auth.RawError<"REGISTRATION_CANCELLED">;
|
|
@@ -2264,7 +2236,60 @@ declare function createAuth(overrides?: AuthOverrides): better_auth.Auth<{
|
|
|
2264
2236
|
RESOLVED_USER_INVALID: better_auth.RawError<"RESOLVED_USER_INVALID">;
|
|
2265
2237
|
};
|
|
2266
2238
|
options: _better_auth_passkey.PasskeyOptions | undefined;
|
|
2267
|
-
}
|
|
2239
|
+
}, ...{
|
|
2240
|
+
id: "one-tap";
|
|
2241
|
+
version: string;
|
|
2242
|
+
endpoints: {
|
|
2243
|
+
oneTapCallback: better_call.StrictEndpoint<"/one-tap/callback", {
|
|
2244
|
+
method: "POST";
|
|
2245
|
+
body: zod.ZodObject<{
|
|
2246
|
+
idToken: zod.ZodString;
|
|
2247
|
+
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2248
|
+
}, zod_v4_core.$strip>;
|
|
2249
|
+
metadata: {
|
|
2250
|
+
openapi: {
|
|
2251
|
+
summary: string;
|
|
2252
|
+
description: string;
|
|
2253
|
+
responses: {
|
|
2254
|
+
200: {
|
|
2255
|
+
description: string;
|
|
2256
|
+
content: {
|
|
2257
|
+
"application/json": {
|
|
2258
|
+
schema: {
|
|
2259
|
+
type: "object";
|
|
2260
|
+
properties: {
|
|
2261
|
+
session: {
|
|
2262
|
+
$ref: string;
|
|
2263
|
+
};
|
|
2264
|
+
user: {
|
|
2265
|
+
$ref: string;
|
|
2266
|
+
};
|
|
2267
|
+
};
|
|
2268
|
+
};
|
|
2269
|
+
};
|
|
2270
|
+
};
|
|
2271
|
+
};
|
|
2272
|
+
400: {
|
|
2273
|
+
description: string;
|
|
2274
|
+
};
|
|
2275
|
+
};
|
|
2276
|
+
};
|
|
2277
|
+
};
|
|
2278
|
+
}, {
|
|
2279
|
+
token: string;
|
|
2280
|
+
user: {
|
|
2281
|
+
id: string;
|
|
2282
|
+
createdAt: Date;
|
|
2283
|
+
updatedAt: Date;
|
|
2284
|
+
email: string;
|
|
2285
|
+
emailVerified: boolean;
|
|
2286
|
+
name: string;
|
|
2287
|
+
image?: string | null | undefined;
|
|
2288
|
+
};
|
|
2289
|
+
}>;
|
|
2290
|
+
};
|
|
2291
|
+
options: better_auth_plugins.OneTapOptions | undefined;
|
|
2292
|
+
}[]];
|
|
2268
2293
|
}>;
|
|
2269
2294
|
declare const auth: better_auth.Auth<{
|
|
2270
2295
|
database: (options: BetterAuthOptions) => better_auth.DBAdapter<BetterAuthOptions>;
|
|
@@ -2326,70 +2351,15 @@ declare const auth: better_auth.Auth<{
|
|
|
2326
2351
|
};
|
|
2327
2352
|
};
|
|
2328
2353
|
hooks: {
|
|
2329
|
-
before: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void
|
|
2330
|
-
after: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void
|
|
2354
|
+
before: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void>>;
|
|
2355
|
+
after: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void>>;
|
|
2331
2356
|
};
|
|
2332
2357
|
baseURL: string;
|
|
2333
2358
|
secret: string;
|
|
2334
2359
|
onAPIError: {
|
|
2335
2360
|
errorURL: string;
|
|
2336
2361
|
};
|
|
2337
|
-
plugins: [
|
|
2338
|
-
id: "one-tap";
|
|
2339
|
-
version: string;
|
|
2340
|
-
endpoints: {
|
|
2341
|
-
oneTapCallback: better_call.StrictEndpoint<"/one-tap/callback", {
|
|
2342
|
-
method: "POST";
|
|
2343
|
-
body: zod.ZodObject<{
|
|
2344
|
-
idToken: zod.ZodString;
|
|
2345
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2346
|
-
}, zod_v4_core.$strip>;
|
|
2347
|
-
metadata: {
|
|
2348
|
-
openapi: {
|
|
2349
|
-
summary: string;
|
|
2350
|
-
description: string;
|
|
2351
|
-
responses: {
|
|
2352
|
-
200: {
|
|
2353
|
-
description: string;
|
|
2354
|
-
content: {
|
|
2355
|
-
"application/json": {
|
|
2356
|
-
schema: {
|
|
2357
|
-
type: "object";
|
|
2358
|
-
properties: {
|
|
2359
|
-
session: {
|
|
2360
|
-
$ref: string;
|
|
2361
|
-
};
|
|
2362
|
-
user: {
|
|
2363
|
-
$ref: string;
|
|
2364
|
-
};
|
|
2365
|
-
};
|
|
2366
|
-
};
|
|
2367
|
-
};
|
|
2368
|
-
};
|
|
2369
|
-
};
|
|
2370
|
-
400: {
|
|
2371
|
-
description: string;
|
|
2372
|
-
};
|
|
2373
|
-
};
|
|
2374
|
-
};
|
|
2375
|
-
};
|
|
2376
|
-
}, {
|
|
2377
|
-
error: string;
|
|
2378
|
-
} | {
|
|
2379
|
-
token: string;
|
|
2380
|
-
user: {
|
|
2381
|
-
id: string;
|
|
2382
|
-
createdAt: Date;
|
|
2383
|
-
updatedAt: Date;
|
|
2384
|
-
email: string;
|
|
2385
|
-
emailVerified: boolean;
|
|
2386
|
-
name: string;
|
|
2387
|
-
image?: string | null | undefined;
|
|
2388
|
-
};
|
|
2389
|
-
}>;
|
|
2390
|
-
};
|
|
2391
|
-
options: better_auth_plugins.OneTapOptions | undefined;
|
|
2392
|
-
}[], {
|
|
2362
|
+
plugins: [{
|
|
2393
2363
|
id: "admin";
|
|
2394
2364
|
version: string;
|
|
2395
2365
|
init(): {
|
|
@@ -2439,7 +2409,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2439
2409
|
hooks: {
|
|
2440
2410
|
after: {
|
|
2441
2411
|
matcher(context: better_auth.HookEndpointContext): boolean;
|
|
2442
|
-
handler: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<better_auth_plugins.SessionWithImpersonatedBy[] | undefined
|
|
2412
|
+
handler: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<better_auth_plugins.SessionWithImpersonatedBy[] | undefined>>;
|
|
2443
2413
|
}[];
|
|
2444
2414
|
};
|
|
2445
2415
|
endpoints: {
|
|
@@ -2450,7 +2420,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2450
2420
|
role: zod.ZodUnion<readonly [zod.ZodString, zod.ZodArray<zod.ZodString>]>;
|
|
2451
2421
|
}, zod_v4_core.$strip>;
|
|
2452
2422
|
requireHeaders: true;
|
|
2453
|
-
use: (
|
|
2423
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2454
2424
|
session: {
|
|
2455
2425
|
user: better_auth_plugins.UserWithRole;
|
|
2456
2426
|
session: {
|
|
@@ -2464,7 +2434,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2464
2434
|
userAgent?: string | null | undefined;
|
|
2465
2435
|
};
|
|
2466
2436
|
};
|
|
2467
|
-
}
|
|
2437
|
+
}>>[];
|
|
2468
2438
|
metadata: {
|
|
2469
2439
|
openapi: {
|
|
2470
2440
|
operationId: string;
|
|
@@ -2503,7 +2473,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2503
2473
|
query: zod.ZodObject<{
|
|
2504
2474
|
id: zod.ZodString;
|
|
2505
2475
|
}, zod_v4_core.$strip>;
|
|
2506
|
-
use: (
|
|
2476
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2507
2477
|
session: {
|
|
2508
2478
|
user: better_auth_plugins.UserWithRole;
|
|
2509
2479
|
session: {
|
|
@@ -2517,7 +2487,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2517
2487
|
userAgent?: string | null | undefined;
|
|
2518
2488
|
};
|
|
2519
2489
|
};
|
|
2520
|
-
}
|
|
2490
|
+
}>>[];
|
|
2521
2491
|
metadata: {
|
|
2522
2492
|
openapi: {
|
|
2523
2493
|
operationId: string;
|
|
@@ -2594,7 +2564,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2594
2564
|
userId: zod.ZodCoercedString<unknown>;
|
|
2595
2565
|
data: zod.ZodRecord<zod.ZodAny, zod.ZodAny>;
|
|
2596
2566
|
}, zod_v4_core.$strip>;
|
|
2597
|
-
use: (
|
|
2567
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2598
2568
|
session: {
|
|
2599
2569
|
user: better_auth_plugins.UserWithRole;
|
|
2600
2570
|
session: {
|
|
@@ -2608,7 +2578,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2608
2578
|
userAgent?: string | null | undefined;
|
|
2609
2579
|
};
|
|
2610
2580
|
};
|
|
2611
|
-
}
|
|
2581
|
+
}>>[];
|
|
2612
2582
|
metadata: {
|
|
2613
2583
|
openapi: {
|
|
2614
2584
|
operationId: string;
|
|
@@ -2636,7 +2606,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2636
2606
|
}, better_auth_plugins.UserWithRole>;
|
|
2637
2607
|
listUsers: better_call.StrictEndpoint<"/admin/list-users", {
|
|
2638
2608
|
method: "GET";
|
|
2639
|
-
use: (
|
|
2609
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2640
2610
|
session: {
|
|
2641
2611
|
user: better_auth_plugins.UserWithRole;
|
|
2642
2612
|
session: {
|
|
@@ -2650,7 +2620,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2650
2620
|
userAgent?: string | null | undefined;
|
|
2651
2621
|
};
|
|
2652
2622
|
};
|
|
2653
|
-
}
|
|
2623
|
+
}>>[];
|
|
2654
2624
|
query: zod.ZodObject<{
|
|
2655
2625
|
searchValue: zod.ZodOptional<zod.ZodString>;
|
|
2656
2626
|
searchField: zod.ZodOptional<zod.ZodEnum<{
|
|
@@ -2672,13 +2642,13 @@ declare const auth: better_auth.Auth<{
|
|
|
2672
2642
|
filterField: zod.ZodOptional<zod.ZodString>;
|
|
2673
2643
|
filterValue: zod.ZodOptional<zod.ZodUnion<[zod.ZodUnion<[zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, zod.ZodBoolean]>, zod.ZodArray<zod.ZodString>]>, zod.ZodArray<zod.ZodNumber>]>>;
|
|
2674
2644
|
filterOperator: zod.ZodOptional<zod.ZodEnum<{
|
|
2645
|
+
in: "in";
|
|
2646
|
+
lte: "lte";
|
|
2675
2647
|
eq: "eq";
|
|
2676
2648
|
ne: "ne";
|
|
2649
|
+
lt: "lt";
|
|
2677
2650
|
gt: "gt";
|
|
2678
2651
|
gte: "gte";
|
|
2679
|
-
lt: "lt";
|
|
2680
|
-
lte: "lte";
|
|
2681
|
-
in: "in";
|
|
2682
2652
|
not_in: "not_in";
|
|
2683
2653
|
contains: "contains";
|
|
2684
2654
|
starts_with: "starts_with";
|
|
@@ -2728,7 +2698,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2728
2698
|
}>;
|
|
2729
2699
|
listUserSessions: better_call.StrictEndpoint<"/admin/list-user-sessions", {
|
|
2730
2700
|
method: "POST";
|
|
2731
|
-
use: (
|
|
2701
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2732
2702
|
session: {
|
|
2733
2703
|
user: better_auth_plugins.UserWithRole;
|
|
2734
2704
|
session: {
|
|
@@ -2742,7 +2712,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2742
2712
|
userAgent?: string | null | undefined;
|
|
2743
2713
|
};
|
|
2744
2714
|
};
|
|
2745
|
-
}
|
|
2715
|
+
}>>[];
|
|
2746
2716
|
body: zod.ZodObject<{
|
|
2747
2717
|
userId: zod.ZodCoercedString<unknown>;
|
|
2748
2718
|
}, zod_v4_core.$strip>;
|
|
@@ -2781,7 +2751,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2781
2751
|
body: zod.ZodObject<{
|
|
2782
2752
|
userId: zod.ZodCoercedString<unknown>;
|
|
2783
2753
|
}, zod_v4_core.$strip>;
|
|
2784
|
-
use: (
|
|
2754
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2785
2755
|
session: {
|
|
2786
2756
|
user: better_auth_plugins.UserWithRole;
|
|
2787
2757
|
session: {
|
|
@@ -2795,7 +2765,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2795
2765
|
userAgent?: string | null | undefined;
|
|
2796
2766
|
};
|
|
2797
2767
|
};
|
|
2798
|
-
}
|
|
2768
|
+
}>>[];
|
|
2799
2769
|
metadata: {
|
|
2800
2770
|
openapi: {
|
|
2801
2771
|
operationId: string;
|
|
@@ -2830,7 +2800,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2830
2800
|
banReason: zod.ZodOptional<zod.ZodString>;
|
|
2831
2801
|
banExpiresIn: zod.ZodOptional<zod.ZodNumber>;
|
|
2832
2802
|
}, zod_v4_core.$strip>;
|
|
2833
|
-
use: (
|
|
2803
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2834
2804
|
session: {
|
|
2835
2805
|
user: better_auth_plugins.UserWithRole;
|
|
2836
2806
|
session: {
|
|
@@ -2844,7 +2814,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2844
2814
|
userAgent?: string | null | undefined;
|
|
2845
2815
|
};
|
|
2846
2816
|
};
|
|
2847
|
-
}
|
|
2817
|
+
}>>[];
|
|
2848
2818
|
metadata: {
|
|
2849
2819
|
openapi: {
|
|
2850
2820
|
operationId: string;
|
|
@@ -2877,7 +2847,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2877
2847
|
body: zod.ZodObject<{
|
|
2878
2848
|
userId: zod.ZodCoercedString<unknown>;
|
|
2879
2849
|
}, zod_v4_core.$strip>;
|
|
2880
|
-
use: (
|
|
2850
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2881
2851
|
session: {
|
|
2882
2852
|
user: better_auth_plugins.UserWithRole;
|
|
2883
2853
|
session: {
|
|
@@ -2891,7 +2861,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2891
2861
|
userAgent?: string | null | undefined;
|
|
2892
2862
|
};
|
|
2893
2863
|
};
|
|
2894
|
-
}
|
|
2864
|
+
}>>[];
|
|
2895
2865
|
metadata: {
|
|
2896
2866
|
openapi: {
|
|
2897
2867
|
operationId: string;
|
|
@@ -2961,7 +2931,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2961
2931
|
body: zod.ZodObject<{
|
|
2962
2932
|
sessionToken: zod.ZodString;
|
|
2963
2933
|
}, zod_v4_core.$strip>;
|
|
2964
|
-
use: (
|
|
2934
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
2965
2935
|
session: {
|
|
2966
2936
|
user: better_auth_plugins.UserWithRole;
|
|
2967
2937
|
session: {
|
|
@@ -2975,7 +2945,7 @@ declare const auth: better_auth.Auth<{
|
|
|
2975
2945
|
userAgent?: string | null | undefined;
|
|
2976
2946
|
};
|
|
2977
2947
|
};
|
|
2978
|
-
}
|
|
2948
|
+
}>>[];
|
|
2979
2949
|
metadata: {
|
|
2980
2950
|
openapi: {
|
|
2981
2951
|
operationId: string;
|
|
@@ -3008,7 +2978,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3008
2978
|
body: zod.ZodObject<{
|
|
3009
2979
|
userId: zod.ZodCoercedString<unknown>;
|
|
3010
2980
|
}, zod_v4_core.$strip>;
|
|
3011
|
-
use: (
|
|
2981
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3012
2982
|
session: {
|
|
3013
2983
|
user: better_auth_plugins.UserWithRole;
|
|
3014
2984
|
session: {
|
|
@@ -3022,7 +2992,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3022
2992
|
userAgent?: string | null | undefined;
|
|
3023
2993
|
};
|
|
3024
2994
|
};
|
|
3025
|
-
}
|
|
2995
|
+
}>>[];
|
|
3026
2996
|
metadata: {
|
|
3027
2997
|
openapi: {
|
|
3028
2998
|
operationId: string;
|
|
@@ -3055,7 +3025,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3055
3025
|
body: zod.ZodObject<{
|
|
3056
3026
|
userId: zod.ZodCoercedString<unknown>;
|
|
3057
3027
|
}, zod_v4_core.$strip>;
|
|
3058
|
-
use: (
|
|
3028
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3059
3029
|
session: {
|
|
3060
3030
|
user: better_auth_plugins.UserWithRole;
|
|
3061
3031
|
session: {
|
|
@@ -3069,7 +3039,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3069
3039
|
userAgent?: string | null | undefined;
|
|
3070
3040
|
};
|
|
3071
3041
|
};
|
|
3072
|
-
}
|
|
3042
|
+
}>>[];
|
|
3073
3043
|
metadata: {
|
|
3074
3044
|
openapi: {
|
|
3075
3045
|
operationId: string;
|
|
@@ -3103,7 +3073,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3103
3073
|
newPassword: zod.ZodString;
|
|
3104
3074
|
userId: zod.ZodCoercedString<unknown>;
|
|
3105
3075
|
}, zod_v4_core.$strip>;
|
|
3106
|
-
use: (
|
|
3076
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3107
3077
|
session: {
|
|
3108
3078
|
user: better_auth_plugins.UserWithRole;
|
|
3109
3079
|
session: {
|
|
@@ -3117,7 +3087,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3117
3087
|
userAgent?: string | null | undefined;
|
|
3118
3088
|
};
|
|
3119
3089
|
};
|
|
3120
|
-
}
|
|
3090
|
+
}>>[];
|
|
3121
3091
|
metadata: {
|
|
3122
3092
|
openapi: {
|
|
3123
3093
|
operationId: string;
|
|
@@ -3292,12 +3262,20 @@ declare const auth: better_auth.Auth<{
|
|
|
3292
3262
|
method: "POST";
|
|
3293
3263
|
body: zod.ZodObject<{
|
|
3294
3264
|
password: zod.ZodOptional<zod.ZodString>;
|
|
3265
|
+
method: zod.ZodDefault<zod.ZodEnum<{
|
|
3266
|
+
otp: "otp";
|
|
3267
|
+
totp: "totp";
|
|
3268
|
+
}>>;
|
|
3295
3269
|
issuer: zod.ZodOptional<zod.ZodString>;
|
|
3296
3270
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
3297
3271
|
password: zod.ZodString;
|
|
3272
|
+
method: zod.ZodDefault<zod.ZodEnum<{
|
|
3273
|
+
otp: "otp";
|
|
3274
|
+
totp: "totp";
|
|
3275
|
+
}>>;
|
|
3298
3276
|
issuer: zod.ZodOptional<zod.ZodString>;
|
|
3299
3277
|
}, zod_v4_core.$strip>;
|
|
3300
|
-
use: (
|
|
3278
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3301
3279
|
session: {
|
|
3302
3280
|
session: Record<string, any> & {
|
|
3303
3281
|
id: string;
|
|
@@ -3319,7 +3297,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3319
3297
|
image?: string | null | undefined;
|
|
3320
3298
|
};
|
|
3321
3299
|
};
|
|
3322
|
-
}
|
|
3300
|
+
}>>[];
|
|
3323
3301
|
metadata: {
|
|
3324
3302
|
openapi: {
|
|
3325
3303
|
summary: string;
|
|
@@ -3332,6 +3310,11 @@ declare const auth: better_auth.Auth<{
|
|
|
3332
3310
|
schema: {
|
|
3333
3311
|
type: "object";
|
|
3334
3312
|
properties: {
|
|
3313
|
+
method: {
|
|
3314
|
+
type: string;
|
|
3315
|
+
enum: string[];
|
|
3316
|
+
description: string;
|
|
3317
|
+
};
|
|
3335
3318
|
totpURI: {
|
|
3336
3319
|
type: string;
|
|
3337
3320
|
description: string;
|
|
@@ -3344,6 +3327,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3344
3327
|
description: string;
|
|
3345
3328
|
};
|
|
3346
3329
|
};
|
|
3330
|
+
required: string[];
|
|
3347
3331
|
};
|
|
3348
3332
|
};
|
|
3349
3333
|
};
|
|
@@ -3352,6 +3336,9 @@ declare const auth: better_auth.Auth<{
|
|
|
3352
3336
|
};
|
|
3353
3337
|
};
|
|
3354
3338
|
}, {
|
|
3339
|
+
method: "otp";
|
|
3340
|
+
} | {
|
|
3341
|
+
method: "totp";
|
|
3355
3342
|
totpURI: string;
|
|
3356
3343
|
backupCodes: string[];
|
|
3357
3344
|
}>;
|
|
@@ -3362,7 +3349,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3362
3349
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
3363
3350
|
password: zod.ZodString;
|
|
3364
3351
|
}, zod_v4_core.$strip>;
|
|
3365
|
-
use: (
|
|
3352
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3366
3353
|
session: {
|
|
3367
3354
|
session: Record<string, any> & {
|
|
3368
3355
|
id: string;
|
|
@@ -3384,7 +3371,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3384
3371
|
image?: string | null | undefined;
|
|
3385
3372
|
};
|
|
3386
3373
|
};
|
|
3387
|
-
}
|
|
3374
|
+
}>>[];
|
|
3388
3375
|
metadata: {
|
|
3389
3376
|
openapi: {
|
|
3390
3377
|
summary: string;
|
|
@@ -3529,7 +3516,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3529
3516
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
3530
3517
|
password: zod.ZodString;
|
|
3531
3518
|
}, zod_v4_core.$strip>;
|
|
3532
|
-
use: (
|
|
3519
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3533
3520
|
session: {
|
|
3534
3521
|
session: Record<string, any> & {
|
|
3535
3522
|
id: string;
|
|
@@ -3551,7 +3538,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3551
3538
|
image?: string | null | undefined;
|
|
3552
3539
|
};
|
|
3553
3540
|
};
|
|
3554
|
-
}
|
|
3541
|
+
}>>[];
|
|
3555
3542
|
metadata: {
|
|
3556
3543
|
openapi: {
|
|
3557
3544
|
description: string;
|
|
@@ -3750,7 +3737,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3750
3737
|
}>;
|
|
3751
3738
|
getTOTPURI: better_call.StrictEndpoint<"/two-factor/get-totp-uri", {
|
|
3752
3739
|
method: "POST";
|
|
3753
|
-
use: (
|
|
3740
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3754
3741
|
session: {
|
|
3755
3742
|
session: Record<string, any> & {
|
|
3756
3743
|
id: string;
|
|
@@ -3772,7 +3759,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3772
3759
|
image?: string | null | undefined;
|
|
3773
3760
|
};
|
|
3774
3761
|
};
|
|
3775
|
-
}
|
|
3762
|
+
}>>[];
|
|
3776
3763
|
body: zod.ZodObject<{
|
|
3777
3764
|
password: zod.ZodOptional<zod.ZodString>;
|
|
3778
3765
|
}, zod_v4_core.$strip> | zod.ZodObject<{
|
|
@@ -3855,10 +3842,10 @@ declare const auth: better_auth.Auth<{
|
|
|
3855
3842
|
hooks: {
|
|
3856
3843
|
after: {
|
|
3857
3844
|
matcher(context: better_auth.HookEndpointContext): boolean;
|
|
3858
|
-
handler: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3845
|
+
handler: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3859
3846
|
twoFactorRedirect: boolean;
|
|
3860
3847
|
twoFactorMethods: string[];
|
|
3861
|
-
} | undefined
|
|
3848
|
+
} | undefined>>;
|
|
3862
3849
|
}[];
|
|
3863
3850
|
};
|
|
3864
3851
|
schema: {
|
|
@@ -3924,8 +3911,11 @@ declare const auth: better_auth.Auth<{
|
|
|
3924
3911
|
}[];
|
|
3925
3912
|
$ERROR_CODES: {
|
|
3926
3913
|
OTP_NOT_ENABLED: better_auth.RawError<"OTP_NOT_ENABLED">;
|
|
3914
|
+
OTP_NOT_CONFIGURED: better_auth.RawError<"OTP_NOT_CONFIGURED">;
|
|
3927
3915
|
OTP_HAS_EXPIRED: better_auth.RawError<"OTP_HAS_EXPIRED">;
|
|
3928
3916
|
TOTP_NOT_ENABLED: better_auth.RawError<"TOTP_NOT_ENABLED">;
|
|
3917
|
+
TOTP_ALREADY_ENABLED: better_auth.RawError<"TOTP_ALREADY_ENABLED">;
|
|
3918
|
+
TOTP_NOT_CONFIGURED: better_auth.RawError<"TOTP_NOT_CONFIGURED">;
|
|
3929
3919
|
TWO_FACTOR_NOT_ENABLED: better_auth.RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
3930
3920
|
BACKUP_CODES_NOT_ENABLED: better_auth.RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
3931
3921
|
INVALID_BACKUP_CODE: better_auth.RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -3940,7 +3930,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3940
3930
|
endpoints: {
|
|
3941
3931
|
generatePasskeyRegistrationOptions: better_call.StrictEndpoint<"/passkey/generate-register-options", {
|
|
3942
3932
|
method: "GET";
|
|
3943
|
-
use: (
|
|
3933
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
3944
3934
|
session: {
|
|
3945
3935
|
session: Record<string, any> & {
|
|
3946
3936
|
id: string;
|
|
@@ -3962,7 +3952,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3962
3952
|
image?: string | null | undefined;
|
|
3963
3953
|
};
|
|
3964
3954
|
};
|
|
3965
|
-
}
|
|
3955
|
+
}>>[];
|
|
3966
3956
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
3967
3957
|
authenticatorAttachment: zod.ZodOptional<zod.ZodEnum<{
|
|
3968
3958
|
platform: "platform";
|
|
@@ -3975,15 +3965,7 @@ declare const auth: better_auth.Auth<{
|
|
|
3975
3965
|
openapi: {
|
|
3976
3966
|
operationId: string;
|
|
3977
3967
|
description: string;
|
|
3978
|
-
parameters:
|
|
3979
|
-
name: string;
|
|
3980
|
-
in: "query";
|
|
3981
|
-
required: false;
|
|
3982
|
-
description: string;
|
|
3983
|
-
schema: {
|
|
3984
|
-
type: "string";
|
|
3985
|
-
};
|
|
3986
|
-
}[];
|
|
3968
|
+
parameters: better_call.OpenAPIParameter[];
|
|
3987
3969
|
responses: {
|
|
3988
3970
|
200: {
|
|
3989
3971
|
description: string;
|
|
@@ -4185,8 +4167,9 @@ declare const auth: better_auth.Auth<{
|
|
|
4185
4167
|
body: zod.ZodObject<{
|
|
4186
4168
|
response: zod.ZodAny;
|
|
4187
4169
|
name: zod.ZodOptional<zod.ZodString>;
|
|
4170
|
+
createSession: zod.ZodOptional<zod.ZodBoolean>;
|
|
4188
4171
|
}, zod_v4_core.$strip>;
|
|
4189
|
-
use: (
|
|
4172
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
4190
4173
|
session: {
|
|
4191
4174
|
session: Record<string, any> & {
|
|
4192
4175
|
id: string;
|
|
@@ -4208,7 +4191,7 @@ declare const auth: better_auth.Auth<{
|
|
|
4208
4191
|
image?: string | null | undefined;
|
|
4209
4192
|
};
|
|
4210
4193
|
};
|
|
4211
|
-
}
|
|
4194
|
+
}>>[];
|
|
4212
4195
|
metadata: {
|
|
4213
4196
|
openapi: {
|
|
4214
4197
|
operationId: string;
|
|
@@ -4219,7 +4202,20 @@ declare const auth: better_auth.Auth<{
|
|
|
4219
4202
|
content: {
|
|
4220
4203
|
"application/json": {
|
|
4221
4204
|
schema: {
|
|
4222
|
-
|
|
4205
|
+
readonly type: "object";
|
|
4206
|
+
readonly allOf: readonly [{
|
|
4207
|
+
readonly $ref: "#/components/schemas/Passkey";
|
|
4208
|
+
}, {
|
|
4209
|
+
readonly type: "object";
|
|
4210
|
+
readonly properties: {
|
|
4211
|
+
readonly session: {
|
|
4212
|
+
readonly $ref: "#/components/schemas/Session";
|
|
4213
|
+
};
|
|
4214
|
+
readonly user: {
|
|
4215
|
+
readonly $ref: "#/components/schemas/User";
|
|
4216
|
+
};
|
|
4217
|
+
};
|
|
4218
|
+
}];
|
|
4223
4219
|
};
|
|
4224
4220
|
};
|
|
4225
4221
|
};
|
|
@@ -4290,7 +4286,7 @@ declare const auth: better_auth.Auth<{
|
|
|
4290
4286
|
}>;
|
|
4291
4287
|
listPasskeys: better_call.StrictEndpoint<"/passkey/list-user-passkeys", {
|
|
4292
4288
|
method: "GET";
|
|
4293
|
-
use: (
|
|
4289
|
+
use: better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
4294
4290
|
session: {
|
|
4295
4291
|
session: Record<string, any> & {
|
|
4296
4292
|
id: string;
|
|
@@ -4312,7 +4308,7 @@ declare const auth: better_auth.Auth<{
|
|
|
4312
4308
|
image?: string | null | undefined;
|
|
4313
4309
|
};
|
|
4314
4310
|
};
|
|
4315
|
-
}
|
|
4311
|
+
}>>[];
|
|
4316
4312
|
metadata: {
|
|
4317
4313
|
openapi: {
|
|
4318
4314
|
description: string;
|
|
@@ -4341,7 +4337,7 @@ declare const auth: better_auth.Auth<{
|
|
|
4341
4337
|
body: zod.ZodObject<{
|
|
4342
4338
|
id: zod.ZodString;
|
|
4343
4339
|
}, zod_v4_core.$strip>;
|
|
4344
|
-
use: ((
|
|
4340
|
+
use: (better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
4345
4341
|
session: {
|
|
4346
4342
|
session: Record<string, any> & {
|
|
4347
4343
|
id: string;
|
|
@@ -4363,9 +4359,9 @@ declare const auth: better_auth.Auth<{
|
|
|
4363
4359
|
image?: string | null | undefined;
|
|
4364
4360
|
};
|
|
4365
4361
|
};
|
|
4366
|
-
}
|
|
4362
|
+
}>> | better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
4367
4363
|
verifiedResource: {};
|
|
4368
|
-
}
|
|
4364
|
+
}>>)[];
|
|
4369
4365
|
metadata: {
|
|
4370
4366
|
openapi: {
|
|
4371
4367
|
description: string;
|
|
@@ -4399,7 +4395,7 @@ declare const auth: better_auth.Auth<{
|
|
|
4399
4395
|
id: zod.ZodString;
|
|
4400
4396
|
name: zod.ZodString;
|
|
4401
4397
|
}, zod_v4_core.$strip>;
|
|
4402
|
-
use: ((
|
|
4398
|
+
use: (better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
4403
4399
|
session: {
|
|
4404
4400
|
session: Record<string, any> & {
|
|
4405
4401
|
id: string;
|
|
@@ -4421,9 +4417,9 @@ declare const auth: better_auth.Auth<{
|
|
|
4421
4417
|
image?: string | null | undefined;
|
|
4422
4418
|
};
|
|
4423
4419
|
};
|
|
4424
|
-
}
|
|
4420
|
+
}>> | better_call.Middleware<better_call.MiddlewareOptions, (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
4425
4421
|
verifiedResource: {};
|
|
4426
|
-
}
|
|
4422
|
+
}>>)[];
|
|
4427
4423
|
metadata: {
|
|
4428
4424
|
openapi: {
|
|
4429
4425
|
description: string;
|
|
@@ -4510,6 +4506,7 @@ declare const auth: better_auth.Auth<{
|
|
|
4510
4506
|
PASSKEY_NOT_FOUND: better_auth.RawError<"PASSKEY_NOT_FOUND">;
|
|
4511
4507
|
AUTHENTICATION_FAILED: better_auth.RawError<"AUTHENTICATION_FAILED">;
|
|
4512
4508
|
UNABLE_TO_CREATE_SESSION: better_auth.RawError<"UNABLE_TO_CREATE_SESSION">;
|
|
4509
|
+
USER_NOT_FOUND: better_auth.RawError<"USER_NOT_FOUND">;
|
|
4513
4510
|
FAILED_TO_UPDATE_PASSKEY: better_auth.RawError<"FAILED_TO_UPDATE_PASSKEY">;
|
|
4514
4511
|
PREVIOUSLY_REGISTERED: better_auth.RawError<"PREVIOUSLY_REGISTERED">;
|
|
4515
4512
|
REGISTRATION_CANCELLED: better_auth.RawError<"REGISTRATION_CANCELLED">;
|
|
@@ -4520,7 +4517,60 @@ declare const auth: better_auth.Auth<{
|
|
|
4520
4517
|
RESOLVED_USER_INVALID: better_auth.RawError<"RESOLVED_USER_INVALID">;
|
|
4521
4518
|
};
|
|
4522
4519
|
options: _better_auth_passkey.PasskeyOptions | undefined;
|
|
4523
|
-
}
|
|
4520
|
+
}, ...{
|
|
4521
|
+
id: "one-tap";
|
|
4522
|
+
version: string;
|
|
4523
|
+
endpoints: {
|
|
4524
|
+
oneTapCallback: better_call.StrictEndpoint<"/one-tap/callback", {
|
|
4525
|
+
method: "POST";
|
|
4526
|
+
body: zod.ZodObject<{
|
|
4527
|
+
idToken: zod.ZodString;
|
|
4528
|
+
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
4529
|
+
}, zod_v4_core.$strip>;
|
|
4530
|
+
metadata: {
|
|
4531
|
+
openapi: {
|
|
4532
|
+
summary: string;
|
|
4533
|
+
description: string;
|
|
4534
|
+
responses: {
|
|
4535
|
+
200: {
|
|
4536
|
+
description: string;
|
|
4537
|
+
content: {
|
|
4538
|
+
"application/json": {
|
|
4539
|
+
schema: {
|
|
4540
|
+
type: "object";
|
|
4541
|
+
properties: {
|
|
4542
|
+
session: {
|
|
4543
|
+
$ref: string;
|
|
4544
|
+
};
|
|
4545
|
+
user: {
|
|
4546
|
+
$ref: string;
|
|
4547
|
+
};
|
|
4548
|
+
};
|
|
4549
|
+
};
|
|
4550
|
+
};
|
|
4551
|
+
};
|
|
4552
|
+
};
|
|
4553
|
+
400: {
|
|
4554
|
+
description: string;
|
|
4555
|
+
};
|
|
4556
|
+
};
|
|
4557
|
+
};
|
|
4558
|
+
};
|
|
4559
|
+
}, {
|
|
4560
|
+
token: string;
|
|
4561
|
+
user: {
|
|
4562
|
+
id: string;
|
|
4563
|
+
createdAt: Date;
|
|
4564
|
+
updatedAt: Date;
|
|
4565
|
+
email: string;
|
|
4566
|
+
emailVerified: boolean;
|
|
4567
|
+
name: string;
|
|
4568
|
+
image?: string | null | undefined;
|
|
4569
|
+
};
|
|
4570
|
+
}>;
|
|
4571
|
+
};
|
|
4572
|
+
options: better_auth_plugins.OneTapOptions | undefined;
|
|
4573
|
+
}[]];
|
|
4524
4574
|
}>;
|
|
4525
4575
|
|
|
4526
4576
|
export { auth, createAuth };
|