better-auth 1.6.26 → 1.6.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.mts +74 -73
- package/dist/api/middlewares/authorization.d.mts +4 -4
- package/dist/api/middlewares/origin-check.d.mts +3 -3
- package/dist/api/routes/account.d.mts +6 -6
- package/dist/api/routes/email-verification.d.mts +1 -1
- package/dist/api/routes/password.d.mts +4 -4
- package/dist/api/routes/session.d.mts +16 -16
- package/dist/api/routes/session.mjs +2 -3
- package/dist/api/routes/sign-in.d.mts +1 -1
- package/dist/api/routes/sign-up.d.mts +1 -1
- package/dist/api/routes/update-session.d.mts +2 -2
- package/dist/api/routes/update-user.d.mts +11 -11
- package/dist/client/session-atom.mjs +33 -44
- package/dist/integrations/next-js.d.mts +2 -2
- package/dist/integrations/svelte-kit.d.mts +1 -1
- package/dist/integrations/tanstack-start-solid.d.mts +1 -1
- package/dist/integrations/tanstack-start.d.mts +1 -1
- package/dist/package.mjs +1 -1
- package/dist/plugins/admin/admin.d.mts +25 -25
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/custom-session/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.mts +6 -6
- package/dist/plugins/generic-oauth/index.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +3 -3
- package/dist/plugins/last-login-method/index.d.mts +2 -2
- package/dist/plugins/magic-link/index.d.mts +2 -2
- package/dist/plugins/mcp/index.d.mts +3 -3
- package/dist/plugins/multi-session/index.d.mts +3 -3
- package/dist/plugins/oauth-popup/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +3 -3
- package/dist/plugins/oidc-provider/index.d.mts +6 -6
- package/dist/plugins/one-time-token/index.d.mts +3 -3
- package/dist/plugins/organization/organization.d.mts +28 -4
- package/dist/plugins/organization/routes/crud-access-control.d.mts +140 -20
- package/dist/plugins/organization/routes/crud-invites.d.mts +149 -29
- package/dist/plugins/organization/routes/crud-members.d.mts +150 -30
- package/dist/plugins/organization/routes/crud-org.d.mts +96 -24
- package/dist/plugins/organization/routes/crud-team.d.mts +207 -39
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/two-factor/backup-codes/index.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.mts +10 -10
- package/dist/plugins/two-factor/totp/index.d.mts +2 -2
- package/dist/plugins/username/index.d.mts +1 -1
- package/package.json +10 -9
|
@@ -19,7 +19,7 @@ declare const createTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
19
19
|
name: z.ZodString;
|
|
20
20
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
22
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
23
23
|
orgOptions: OrganizationOptions;
|
|
24
24
|
roles: typeof defaultRoles & {
|
|
25
25
|
[key: string]: Role<{}>;
|
|
@@ -48,7 +48,7 @@ declare const createTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
48
48
|
image?: string | null | undefined;
|
|
49
49
|
};
|
|
50
50
|
}>;
|
|
51
|
-
}
|
|
51
|
+
}>>[];
|
|
52
52
|
metadata: {
|
|
53
53
|
$Infer: {
|
|
54
54
|
body: z.infer<typeof teamBaseSchema> & InferAdditionalFieldsFromPluginOptions<"team", O>;
|
|
@@ -111,7 +111,7 @@ declare const removeTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
111
111
|
teamId: z.ZodString;
|
|
112
112
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
113
113
|
}, z.core.$strip>;
|
|
114
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
114
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
115
115
|
orgOptions: OrganizationOptions;
|
|
116
116
|
roles: typeof defaultRoles & {
|
|
117
117
|
[key: string]: Role<{}>;
|
|
@@ -140,7 +140,7 @@ declare const removeTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
140
140
|
image?: string | null | undefined;
|
|
141
141
|
};
|
|
142
142
|
}>;
|
|
143
|
-
}
|
|
143
|
+
}>>[];
|
|
144
144
|
metadata: {
|
|
145
145
|
openapi: {
|
|
146
146
|
description: string;
|
|
@@ -182,7 +182,7 @@ declare const updateTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
182
182
|
}, z.core.$strip>;
|
|
183
183
|
}, z.core.$strip>;
|
|
184
184
|
requireHeaders: true;
|
|
185
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
185
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
186
186
|
orgOptions: OrganizationOptions;
|
|
187
187
|
roles: typeof defaultRoles & {
|
|
188
188
|
[key: string]: Role<{}>;
|
|
@@ -211,8 +211,8 @@ declare const updateTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
211
211
|
image?: string | null | undefined;
|
|
212
212
|
};
|
|
213
213
|
}>;
|
|
214
|
-
}
|
|
215
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
214
|
+
}>> | import("better-call").Middleware<{
|
|
215
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
216
216
|
session: {
|
|
217
217
|
session: Record<string, any> & {
|
|
218
218
|
id: string;
|
|
@@ -234,7 +234,31 @@ declare const updateTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
234
234
|
image?: string | null | undefined;
|
|
235
235
|
};
|
|
236
236
|
};
|
|
237
|
-
}
|
|
237
|
+
}>>[];
|
|
238
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
239
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
240
|
+
session: {
|
|
241
|
+
session: Record<string, any> & {
|
|
242
|
+
id: string;
|
|
243
|
+
createdAt: Date;
|
|
244
|
+
updatedAt: Date;
|
|
245
|
+
userId: string;
|
|
246
|
+
expiresAt: Date;
|
|
247
|
+
token: string;
|
|
248
|
+
ipAddress?: string | null | undefined;
|
|
249
|
+
userAgent?: string | null | undefined;
|
|
250
|
+
};
|
|
251
|
+
user: Record<string, any> & {
|
|
252
|
+
id: string;
|
|
253
|
+
createdAt: Date;
|
|
254
|
+
updatedAt: Date;
|
|
255
|
+
email: string;
|
|
256
|
+
emailVerified: boolean;
|
|
257
|
+
name: string;
|
|
258
|
+
image?: string | null | undefined;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
}>>[];
|
|
238
262
|
}>) => Promise<{
|
|
239
263
|
session: {
|
|
240
264
|
session: {
|
|
@@ -260,7 +284,7 @@ declare const updateTeam: <O extends OrganizationOptions>(options: O) => import(
|
|
|
260
284
|
image?: string | null | undefined;
|
|
261
285
|
};
|
|
262
286
|
};
|
|
263
|
-
}
|
|
287
|
+
}>>)[];
|
|
264
288
|
metadata: {
|
|
265
289
|
$Infer: {
|
|
266
290
|
body: {
|
|
@@ -372,7 +396,7 @@ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O)
|
|
|
372
396
|
};
|
|
373
397
|
};
|
|
374
398
|
requireHeaders: true;
|
|
375
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
399
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
376
400
|
orgOptions: OrganizationOptions;
|
|
377
401
|
roles: typeof defaultRoles & {
|
|
378
402
|
[key: string]: Role<{}>;
|
|
@@ -401,8 +425,32 @@ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O)
|
|
|
401
425
|
image?: string | null | undefined;
|
|
402
426
|
};
|
|
403
427
|
}>;
|
|
404
|
-
}
|
|
405
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
428
|
+
}>> | import("better-call").Middleware<{
|
|
429
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
430
|
+
session: {
|
|
431
|
+
session: Record<string, any> & {
|
|
432
|
+
id: string;
|
|
433
|
+
createdAt: Date;
|
|
434
|
+
updatedAt: Date;
|
|
435
|
+
userId: string;
|
|
436
|
+
expiresAt: Date;
|
|
437
|
+
token: string;
|
|
438
|
+
ipAddress?: string | null | undefined;
|
|
439
|
+
userAgent?: string | null | undefined;
|
|
440
|
+
};
|
|
441
|
+
user: Record<string, any> & {
|
|
442
|
+
id: string;
|
|
443
|
+
createdAt: Date;
|
|
444
|
+
updatedAt: Date;
|
|
445
|
+
email: string;
|
|
446
|
+
emailVerified: boolean;
|
|
447
|
+
name: string;
|
|
448
|
+
image?: string | null | undefined;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
}>>[];
|
|
452
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
453
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
406
454
|
session: {
|
|
407
455
|
session: Record<string, any> & {
|
|
408
456
|
id: string;
|
|
@@ -424,7 +472,7 @@ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O)
|
|
|
424
472
|
image?: string | null | undefined;
|
|
425
473
|
};
|
|
426
474
|
};
|
|
427
|
-
}
|
|
475
|
+
}>>[];
|
|
428
476
|
}>) => Promise<{
|
|
429
477
|
session: {
|
|
430
478
|
session: {
|
|
@@ -450,7 +498,7 @@ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O)
|
|
|
450
498
|
image?: string | null | undefined;
|
|
451
499
|
};
|
|
452
500
|
};
|
|
453
|
-
}
|
|
501
|
+
}>>)[];
|
|
454
502
|
}, ({
|
|
455
503
|
id: string;
|
|
456
504
|
name: string;
|
|
@@ -468,7 +516,7 @@ declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => impo
|
|
|
468
516
|
teamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
469
517
|
}, z.core.$strip>;
|
|
470
518
|
requireHeaders: true;
|
|
471
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
519
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
472
520
|
orgOptions: OrganizationOptions;
|
|
473
521
|
roles: typeof defaultRoles & {
|
|
474
522
|
[key: string]: Role<{}>;
|
|
@@ -497,8 +545,8 @@ declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => impo
|
|
|
497
545
|
image?: string | null | undefined;
|
|
498
546
|
};
|
|
499
547
|
}>;
|
|
500
|
-
}
|
|
501
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
548
|
+
}>> | import("better-call").Middleware<{
|
|
549
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
502
550
|
session: {
|
|
503
551
|
session: Record<string, any> & {
|
|
504
552
|
id: string;
|
|
@@ -520,7 +568,31 @@ declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => impo
|
|
|
520
568
|
image?: string | null | undefined;
|
|
521
569
|
};
|
|
522
570
|
};
|
|
523
|
-
}
|
|
571
|
+
}>>[];
|
|
572
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
573
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
574
|
+
session: {
|
|
575
|
+
session: Record<string, any> & {
|
|
576
|
+
id: string;
|
|
577
|
+
createdAt: Date;
|
|
578
|
+
updatedAt: Date;
|
|
579
|
+
userId: string;
|
|
580
|
+
expiresAt: Date;
|
|
581
|
+
token: string;
|
|
582
|
+
ipAddress?: string | null | undefined;
|
|
583
|
+
userAgent?: string | null | undefined;
|
|
584
|
+
};
|
|
585
|
+
user: Record<string, any> & {
|
|
586
|
+
id: string;
|
|
587
|
+
createdAt: Date;
|
|
588
|
+
updatedAt: Date;
|
|
589
|
+
email: string;
|
|
590
|
+
emailVerified: boolean;
|
|
591
|
+
name: string;
|
|
592
|
+
image?: string | null | undefined;
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
}>>[];
|
|
524
596
|
}>) => Promise<{
|
|
525
597
|
session: {
|
|
526
598
|
session: {
|
|
@@ -546,7 +618,7 @@ declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => impo
|
|
|
546
618
|
image?: string | null | undefined;
|
|
547
619
|
};
|
|
548
620
|
};
|
|
549
|
-
}
|
|
621
|
+
}>>)[];
|
|
550
622
|
metadata: {
|
|
551
623
|
openapi: {
|
|
552
624
|
description: string;
|
|
@@ -599,7 +671,7 @@ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => impo
|
|
|
599
671
|
};
|
|
600
672
|
};
|
|
601
673
|
requireHeaders: true;
|
|
602
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
674
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
603
675
|
orgOptions: OrganizationOptions;
|
|
604
676
|
roles: typeof defaultRoles & {
|
|
605
677
|
[key: string]: Role<{}>;
|
|
@@ -628,8 +700,8 @@ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => impo
|
|
|
628
700
|
image?: string | null | undefined;
|
|
629
701
|
};
|
|
630
702
|
}>;
|
|
631
|
-
}
|
|
632
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
703
|
+
}>> | import("better-call").Middleware<{
|
|
704
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
633
705
|
session: {
|
|
634
706
|
session: Record<string, any> & {
|
|
635
707
|
id: string;
|
|
@@ -651,7 +723,31 @@ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => impo
|
|
|
651
723
|
image?: string | null | undefined;
|
|
652
724
|
};
|
|
653
725
|
};
|
|
654
|
-
}
|
|
726
|
+
}>>[];
|
|
727
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
728
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
729
|
+
session: {
|
|
730
|
+
session: Record<string, any> & {
|
|
731
|
+
id: string;
|
|
732
|
+
createdAt: Date;
|
|
733
|
+
updatedAt: Date;
|
|
734
|
+
userId: string;
|
|
735
|
+
expiresAt: Date;
|
|
736
|
+
token: string;
|
|
737
|
+
ipAddress?: string | null | undefined;
|
|
738
|
+
userAgent?: string | null | undefined;
|
|
739
|
+
};
|
|
740
|
+
user: Record<string, any> & {
|
|
741
|
+
id: string;
|
|
742
|
+
createdAt: Date;
|
|
743
|
+
updatedAt: Date;
|
|
744
|
+
email: string;
|
|
745
|
+
emailVerified: boolean;
|
|
746
|
+
name: string;
|
|
747
|
+
image?: string | null | undefined;
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
}>>[];
|
|
655
751
|
}>) => Promise<{
|
|
656
752
|
session: {
|
|
657
753
|
session: {
|
|
@@ -677,7 +773,7 @@ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => impo
|
|
|
677
773
|
image?: string | null | undefined;
|
|
678
774
|
};
|
|
679
775
|
};
|
|
680
|
-
}
|
|
776
|
+
}>>)[];
|
|
681
777
|
}, {
|
|
682
778
|
id: string;
|
|
683
779
|
name: string;
|
|
@@ -733,7 +829,7 @@ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => im
|
|
|
733
829
|
};
|
|
734
830
|
};
|
|
735
831
|
requireHeaders: true;
|
|
736
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
832
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
737
833
|
orgOptions: OrganizationOptions;
|
|
738
834
|
roles: typeof defaultRoles & {
|
|
739
835
|
[key: string]: Role<{}>;
|
|
@@ -762,8 +858,8 @@ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => im
|
|
|
762
858
|
image?: string | null | undefined;
|
|
763
859
|
};
|
|
764
860
|
}>;
|
|
765
|
-
}
|
|
766
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
861
|
+
}>> | import("better-call").Middleware<{
|
|
862
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
767
863
|
session: {
|
|
768
864
|
session: Record<string, any> & {
|
|
769
865
|
id: string;
|
|
@@ -785,7 +881,31 @@ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => im
|
|
|
785
881
|
image?: string | null | undefined;
|
|
786
882
|
};
|
|
787
883
|
};
|
|
788
|
-
}
|
|
884
|
+
}>>[];
|
|
885
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
886
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
887
|
+
session: {
|
|
888
|
+
session: Record<string, any> & {
|
|
889
|
+
id: string;
|
|
890
|
+
createdAt: Date;
|
|
891
|
+
updatedAt: Date;
|
|
892
|
+
userId: string;
|
|
893
|
+
expiresAt: Date;
|
|
894
|
+
token: string;
|
|
895
|
+
ipAddress?: string | null | undefined;
|
|
896
|
+
userAgent?: string | null | undefined;
|
|
897
|
+
};
|
|
898
|
+
user: Record<string, any> & {
|
|
899
|
+
id: string;
|
|
900
|
+
createdAt: Date;
|
|
901
|
+
updatedAt: Date;
|
|
902
|
+
email: string;
|
|
903
|
+
emailVerified: boolean;
|
|
904
|
+
name: string;
|
|
905
|
+
image?: string | null | undefined;
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
}>>[];
|
|
789
909
|
}>) => Promise<{
|
|
790
910
|
session: {
|
|
791
911
|
session: {
|
|
@@ -811,7 +931,7 @@ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => im
|
|
|
811
931
|
image?: string | null | undefined;
|
|
812
932
|
};
|
|
813
933
|
};
|
|
814
|
-
}
|
|
934
|
+
}>>)[];
|
|
815
935
|
}, {
|
|
816
936
|
id: string;
|
|
817
937
|
teamId: string;
|
|
@@ -864,7 +984,7 @@ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => impo
|
|
|
864
984
|
};
|
|
865
985
|
};
|
|
866
986
|
requireHeaders: true;
|
|
867
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
987
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
868
988
|
orgOptions: OrganizationOptions;
|
|
869
989
|
roles: typeof defaultRoles & {
|
|
870
990
|
[key: string]: Role<{}>;
|
|
@@ -893,8 +1013,8 @@ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => impo
|
|
|
893
1013
|
image?: string | null | undefined;
|
|
894
1014
|
};
|
|
895
1015
|
}>;
|
|
896
|
-
}
|
|
897
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1016
|
+
}>> | import("better-call").Middleware<{
|
|
1017
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
898
1018
|
session: {
|
|
899
1019
|
session: Record<string, any> & {
|
|
900
1020
|
id: string;
|
|
@@ -916,7 +1036,31 @@ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => impo
|
|
|
916
1036
|
image?: string | null | undefined;
|
|
917
1037
|
};
|
|
918
1038
|
};
|
|
919
|
-
}
|
|
1039
|
+
}>>[];
|
|
1040
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
1041
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1042
|
+
session: {
|
|
1043
|
+
session: Record<string, any> & {
|
|
1044
|
+
id: string;
|
|
1045
|
+
createdAt: Date;
|
|
1046
|
+
updatedAt: Date;
|
|
1047
|
+
userId: string;
|
|
1048
|
+
expiresAt: Date;
|
|
1049
|
+
token: string;
|
|
1050
|
+
ipAddress?: string | null | undefined;
|
|
1051
|
+
userAgent?: string | null | undefined;
|
|
1052
|
+
};
|
|
1053
|
+
user: Record<string, any> & {
|
|
1054
|
+
id: string;
|
|
1055
|
+
createdAt: Date;
|
|
1056
|
+
updatedAt: Date;
|
|
1057
|
+
email: string;
|
|
1058
|
+
emailVerified: boolean;
|
|
1059
|
+
name: string;
|
|
1060
|
+
image?: string | null | undefined;
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
}>>[];
|
|
920
1064
|
}>) => Promise<{
|
|
921
1065
|
session: {
|
|
922
1066
|
session: {
|
|
@@ -942,7 +1086,7 @@ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => impo
|
|
|
942
1086
|
image?: string | null | undefined;
|
|
943
1087
|
};
|
|
944
1088
|
};
|
|
945
|
-
}
|
|
1089
|
+
}>>)[];
|
|
946
1090
|
}, {
|
|
947
1091
|
id: string;
|
|
948
1092
|
teamId: string;
|
|
@@ -982,7 +1126,7 @@ declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => i
|
|
|
982
1126
|
};
|
|
983
1127
|
};
|
|
984
1128
|
requireHeaders: true;
|
|
985
|
-
use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1129
|
+
use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
986
1130
|
orgOptions: OrganizationOptions;
|
|
987
1131
|
roles: typeof defaultRoles & {
|
|
988
1132
|
[key: string]: Role<{}>;
|
|
@@ -1011,8 +1155,32 @@ declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => i
|
|
|
1011
1155
|
image?: string | null | undefined;
|
|
1012
1156
|
};
|
|
1013
1157
|
}>;
|
|
1014
|
-
}
|
|
1015
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1158
|
+
}>> | import("better-call").Middleware<{
|
|
1159
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1160
|
+
session: {
|
|
1161
|
+
session: Record<string, any> & {
|
|
1162
|
+
id: string;
|
|
1163
|
+
createdAt: Date;
|
|
1164
|
+
updatedAt: Date;
|
|
1165
|
+
userId: string;
|
|
1166
|
+
expiresAt: Date;
|
|
1167
|
+
token: string;
|
|
1168
|
+
ipAddress?: string | null | undefined;
|
|
1169
|
+
userAgent?: string | null | undefined;
|
|
1170
|
+
};
|
|
1171
|
+
user: Record<string, any> & {
|
|
1172
|
+
id: string;
|
|
1173
|
+
createdAt: Date;
|
|
1174
|
+
updatedAt: Date;
|
|
1175
|
+
email: string;
|
|
1176
|
+
emailVerified: boolean;
|
|
1177
|
+
name: string;
|
|
1178
|
+
image?: string | null | undefined;
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
}>>[];
|
|
1182
|
+
}, (inputContext: import("better-call").MiddlewareInputContext<{
|
|
1183
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1016
1184
|
session: {
|
|
1017
1185
|
session: Record<string, any> & {
|
|
1018
1186
|
id: string;
|
|
@@ -1034,7 +1202,7 @@ declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => i
|
|
|
1034
1202
|
image?: string | null | undefined;
|
|
1035
1203
|
};
|
|
1036
1204
|
};
|
|
1037
|
-
}
|
|
1205
|
+
}>>[];
|
|
1038
1206
|
}>) => Promise<{
|
|
1039
1207
|
session: {
|
|
1040
1208
|
session: {
|
|
@@ -1060,7 +1228,7 @@ declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => i
|
|
|
1060
1228
|
image?: string | null | undefined;
|
|
1061
1229
|
};
|
|
1062
1230
|
};
|
|
1063
|
-
}
|
|
1231
|
+
}>>)[];
|
|
1064
1232
|
}, {
|
|
1065
1233
|
message: string;
|
|
1066
1234
|
}>;
|
|
@@ -43,7 +43,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
|
|
|
43
43
|
hooks: {
|
|
44
44
|
before: {
|
|
45
45
|
matcher: (ctx: import("@better-auth/core").HookEndpointContext) => boolean;
|
|
46
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never
|
|
46
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never>>;
|
|
47
47
|
}[];
|
|
48
48
|
};
|
|
49
49
|
endpoints: {
|
|
@@ -202,7 +202,7 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
|
|
|
202
202
|
}, z.core.$strip> | z.ZodObject<{
|
|
203
203
|
password: z.ZodString;
|
|
204
204
|
}, z.core.$strip>;
|
|
205
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
205
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
206
206
|
session: {
|
|
207
207
|
session: Record<string, any> & {
|
|
208
208
|
id: string;
|
|
@@ -224,7 +224,7 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
|
|
|
224
224
|
image?: string | null | undefined;
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
|
-
}
|
|
227
|
+
}>>[];
|
|
228
228
|
metadata: {
|
|
229
229
|
openapi: {
|
|
230
230
|
description: string;
|
|
@@ -41,7 +41,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
41
41
|
password: z.ZodString;
|
|
42
42
|
issuer: z.ZodOptional<z.ZodString>;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
44
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
45
45
|
session: {
|
|
46
46
|
session: Record<string, any> & {
|
|
47
47
|
id: string;
|
|
@@ -63,7 +63,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
63
63
|
image?: string | null | undefined;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
}
|
|
66
|
+
}>>[];
|
|
67
67
|
metadata: {
|
|
68
68
|
openapi: {
|
|
69
69
|
summary: string;
|
|
@@ -121,7 +121,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
121
121
|
}, z.core.$strip> | z.ZodObject<{
|
|
122
122
|
password: z.ZodString;
|
|
123
123
|
}, z.core.$strip>;
|
|
124
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
124
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
125
125
|
session: {
|
|
126
126
|
session: Record<string, any> & {
|
|
127
127
|
id: string;
|
|
@@ -143,7 +143,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
143
143
|
image?: string | null | undefined;
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
|
-
}
|
|
146
|
+
}>>[];
|
|
147
147
|
metadata: {
|
|
148
148
|
openapi: {
|
|
149
149
|
summary: string;
|
|
@@ -288,7 +288,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
288
288
|
}, z.core.$strip> | z.ZodObject<{
|
|
289
289
|
password: z.ZodString;
|
|
290
290
|
}, z.core.$strip>;
|
|
291
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
291
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
292
292
|
session: {
|
|
293
293
|
session: Record<string, any> & {
|
|
294
294
|
id: string;
|
|
@@ -310,7 +310,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
310
310
|
image?: string | null | undefined;
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
|
-
}
|
|
313
|
+
}>>[];
|
|
314
314
|
metadata: {
|
|
315
315
|
openapi: {
|
|
316
316
|
description: string;
|
|
@@ -509,7 +509,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
509
509
|
}>;
|
|
510
510
|
getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
|
|
511
511
|
method: "POST";
|
|
512
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
512
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
513
513
|
session: {
|
|
514
514
|
session: Record<string, any> & {
|
|
515
515
|
id: string;
|
|
@@ -531,7 +531,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
531
531
|
image?: string | null | undefined;
|
|
532
532
|
};
|
|
533
533
|
};
|
|
534
|
-
}
|
|
534
|
+
}>>[];
|
|
535
535
|
body: z.ZodObject<{
|
|
536
536
|
password: z.ZodOptional<z.ZodString>;
|
|
537
537
|
}, z.core.$strip> | z.ZodObject<{
|
|
@@ -612,10 +612,10 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
612
612
|
hooks: {
|
|
613
613
|
after: {
|
|
614
614
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
615
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
615
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
616
616
|
twoFactorRedirect: boolean;
|
|
617
617
|
twoFactorMethods: string[];
|
|
618
|
-
} | undefined
|
|
618
|
+
} | undefined>>;
|
|
619
619
|
}[];
|
|
620
620
|
};
|
|
621
621
|
schema: {
|
|
@@ -98,7 +98,7 @@ declare const totp2fa: (options?: TOTPOptions | undefined) => {
|
|
|
98
98
|
*/
|
|
99
99
|
getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
|
|
100
100
|
method: "POST";
|
|
101
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
101
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
102
102
|
session: {
|
|
103
103
|
session: Record<string, any> & {
|
|
104
104
|
id: string;
|
|
@@ -120,7 +120,7 @@ declare const totp2fa: (options?: TOTPOptions | undefined) => {
|
|
|
120
120
|
image?: string | null | undefined;
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
|
-
}
|
|
123
|
+
}>>[];
|
|
124
124
|
body: z.ZodObject<{
|
|
125
125
|
password: z.ZodOptional<z.ZodString>;
|
|
126
126
|
}, z.core.$strip> | z.ZodObject<{
|
|
@@ -260,7 +260,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
|
|
|
260
260
|
hooks: {
|
|
261
261
|
before: {
|
|
262
262
|
matcher(context: import("@better-auth/core").HookEndpointContext): boolean;
|
|
263
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void
|
|
263
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
|
|
264
264
|
}[];
|
|
265
265
|
};
|
|
266
266
|
options: UsernameOptions | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-auth",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.27",
|
|
4
4
|
"description": "The most comprehensive authentication framework for TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -483,19 +483,19 @@
|
|
|
483
483
|
"@better-fetch/fetch": "1.3.1",
|
|
484
484
|
"@noble/ciphers": "^2.1.1",
|
|
485
485
|
"@noble/hashes": "^2.0.1",
|
|
486
|
-
"better-call": "1.
|
|
486
|
+
"better-call": "1.4.0",
|
|
487
487
|
"defu": "^6.1.4",
|
|
488
488
|
"jose": "^6.1.3",
|
|
489
489
|
"kysely": "^0.28.17 || ^0.29.0",
|
|
490
490
|
"nanostores": "^1.1.1",
|
|
491
491
|
"zod": "^4.3.6",
|
|
492
|
-
"@better-auth/core": "1.6.
|
|
493
|
-
"@better-auth/drizzle-adapter": "1.6.
|
|
494
|
-
"@better-auth/kysely-adapter": "1.6.
|
|
495
|
-
"@better-auth/memory-adapter": "1.6.
|
|
496
|
-
"@better-auth/mongo-adapter": "1.6.
|
|
497
|
-
"@better-auth/prisma-adapter": "1.6.
|
|
498
|
-
"@better-auth/telemetry": "1.6.
|
|
492
|
+
"@better-auth/core": "1.6.27",
|
|
493
|
+
"@better-auth/drizzle-adapter": "1.6.27",
|
|
494
|
+
"@better-auth/kysely-adapter": "1.6.27",
|
|
495
|
+
"@better-auth/memory-adapter": "1.6.27",
|
|
496
|
+
"@better-auth/mongo-adapter": "1.6.27",
|
|
497
|
+
"@better-auth/prisma-adapter": "1.6.27",
|
|
498
|
+
"@better-auth/telemetry": "1.6.27"
|
|
499
499
|
},
|
|
500
500
|
"devDependencies": {
|
|
501
501
|
"@lynx-js/react": "^0.116.3",
|
|
@@ -506,6 +506,7 @@
|
|
|
506
506
|
"@types/google.accounts": "^0.0.18",
|
|
507
507
|
"@types/pg": "^8.16.0",
|
|
508
508
|
"@types/react": "^19.2.14",
|
|
509
|
+
"@types/react-dom": "^19.2.3",
|
|
509
510
|
"@opentelemetry/api": "^1.9.0",
|
|
510
511
|
"@opentelemetry/sdk-trace-base": "^2.10.0",
|
|
511
512
|
"@opentelemetry/sdk-trace-node": "^2.10.0",
|