@neondatabase/auth 0.4.0-beta → 0.4.2-beta
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/{adapter-core-BWM7cWOp.d.mts → adapter-core-BiYHR4I-.d.mts} +462 -155
- package/dist/{adapter-core-Bt4M5I2g.mjs → adapter-core-D4V1J06B.mjs} +3 -2
- package/dist/{better-auth-react-adapter-BDxJ65mF.d.mts → better-auth-react-adapter-D53HN_n5.d.mts} +383 -260
- package/dist/{better-auth-react-adapter-aMv8WeDb.mjs → better-auth-react-adapter-DswZ_kCQ.mjs} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{neon-auth-CS4FpK2X.mjs → neon-auth-BEYvHA5c.mjs} +1 -1
- package/dist/next/index.d.mts +125 -2
- package/dist/next/index.mjs +3 -3
- package/dist/next/server/index.d.mts +108 -13
- package/dist/next/server/index.mjs +351 -31
- package/dist/react/adapters/index.d.mts +2 -2
- package/dist/react/adapters/index.mjs +2 -2
- package/dist/react/index.d.mts +2 -2
- package/dist/react/index.mjs +2 -2
- package/dist/{supabase-adapter-DBt4LJJd.mjs → supabase-adapter-BbSvEBy0.mjs} +1 -1
- package/dist/{supabase-adapter-BGwV0Vu2.d.mts → supabase-adapter-X2YsFZi4.d.mts} +380 -257
- package/dist/types/index.d.mts +2 -2
- package/dist/vanilla/adapters/index.d.mts +2 -2
- package/dist/vanilla/adapters/index.mjs +2 -2
- package/dist/vanilla/index.d.mts +2 -2
- package/dist/vanilla/index.mjs +2 -2
- package/package.json +3 -3
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_auth_react2 from "better-auth/react";
|
|
2
2
|
import { createAuthClient } from "better-auth/react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as better_auth_client3 from "better-auth/client";
|
|
4
4
|
import { BetterAuthClientOptions, createAuthClient as createAuthClient$1 } from "better-auth/client";
|
|
5
5
|
import * as zod0 from "zod";
|
|
6
6
|
import * as jose1 from "jose";
|
|
7
7
|
import { Session, User } from "better-auth/types";
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
8
|
+
import * as better_auth_plugins49 from "better-auth/plugins";
|
|
9
|
+
import * as better_auth327 from "better-auth";
|
|
10
|
+
import * as _better_fetch_fetch189 from "@better-fetch/fetch";
|
|
11
11
|
import { BetterFetchError, BetterFetchError as BetterFetchError$1 } from "@better-fetch/fetch";
|
|
12
12
|
import { Invitation, InvitationInput, InvitationStatus, Member, MemberInput, Organization, OrganizationInput, OrganizationRole, Team, TeamInput, TeamMember, TeamMemberInput } from "better-auth/plugins/organization";
|
|
13
13
|
import { JWKOptions, JWSAlgorithms, Jwk, JwtOptions } from "better-auth/plugins/jwt";
|
|
14
14
|
import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "better-auth/plugins/admin";
|
|
15
15
|
import { EmailOTPOptions } from "better-auth/plugins/email-otp";
|
|
16
16
|
import { MagicLinkOptions } from "better-auth/plugins/magic-link";
|
|
17
|
+
import { PhoneNumberOptions } from "better-auth/plugins/phone-number";
|
|
17
18
|
|
|
18
19
|
//#region src/core/better-auth-types.d.ts
|
|
19
20
|
type BetterAuthSession = Session;
|
|
@@ -42,7 +43,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
42
43
|
pathMethods: {
|
|
43
44
|
"/token/anonymous": "GET";
|
|
44
45
|
};
|
|
45
|
-
getActions: ($fetch:
|
|
46
|
+
getActions: ($fetch: _better_fetch_fetch189.BetterFetch) => {
|
|
46
47
|
getAnonymousToken: (fetchOptions?: any) => Promise<{
|
|
47
48
|
data: {
|
|
48
49
|
token: string;
|
|
@@ -60,11 +61,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
60
61
|
};
|
|
61
62
|
} | {
|
|
62
63
|
id: "better-auth-client";
|
|
63
|
-
$InferServerPlugin: ReturnType<(<O extends
|
|
64
|
+
$InferServerPlugin: ReturnType<(<O extends better_auth_plugins49.JwtOptions>(options?: O) => {
|
|
64
65
|
id: "jwt";
|
|
65
66
|
options: NoInfer<O>;
|
|
66
67
|
endpoints: {
|
|
67
|
-
getJwks:
|
|
68
|
+
getJwks: better_auth327.StrictEndpoint<string, {
|
|
68
69
|
method: "GET";
|
|
69
70
|
metadata: {
|
|
70
71
|
openapi: {
|
|
@@ -141,10 +142,10 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
141
142
|
};
|
|
142
143
|
};
|
|
143
144
|
}, jose1.JSONWebKeySet>;
|
|
144
|
-
getToken:
|
|
145
|
+
getToken: better_auth327.StrictEndpoint<"/token", {
|
|
145
146
|
method: "GET";
|
|
146
147
|
requireHeaders: true;
|
|
147
|
-
use: ((inputContext:
|
|
148
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
148
149
|
session: {
|
|
149
150
|
session: Record<string, any> & {
|
|
150
151
|
id: string;
|
|
@@ -193,24 +194,24 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
193
194
|
}, {
|
|
194
195
|
token: string;
|
|
195
196
|
}>;
|
|
196
|
-
signJWT:
|
|
197
|
+
signJWT: better_auth327.StrictEndpoint<string, {
|
|
197
198
|
method: "POST";
|
|
198
199
|
metadata: {
|
|
199
200
|
$Infer: {
|
|
200
201
|
body: {
|
|
201
202
|
payload: jose1.JWTPayload;
|
|
202
|
-
overrideOptions?:
|
|
203
|
+
overrideOptions?: better_auth_plugins49.JwtOptions | undefined;
|
|
203
204
|
};
|
|
204
205
|
};
|
|
205
206
|
};
|
|
206
207
|
body: zod0.ZodObject<{
|
|
207
208
|
payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
208
209
|
overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
209
|
-
},
|
|
210
|
+
}, better_auth327.$strip>;
|
|
210
211
|
}, {
|
|
211
212
|
token: string;
|
|
212
213
|
}>;
|
|
213
|
-
verifyJWT:
|
|
214
|
+
verifyJWT: better_auth327.StrictEndpoint<string, {
|
|
214
215
|
method: "POST";
|
|
215
216
|
metadata: {
|
|
216
217
|
$Infer: {
|
|
@@ -230,15 +231,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
230
231
|
body: zod0.ZodObject<{
|
|
231
232
|
token: zod0.ZodString;
|
|
232
233
|
issuer: zod0.ZodOptional<zod0.ZodString>;
|
|
233
|
-
},
|
|
234
|
+
}, better_auth327.$strip>;
|
|
234
235
|
}, {
|
|
235
236
|
payload: (jose1.JWTPayload & Required<Pick<jose1.JWTPayload, "sub" | "aud">>) | null;
|
|
236
237
|
}>;
|
|
237
238
|
};
|
|
238
239
|
hooks: {
|
|
239
240
|
after: {
|
|
240
|
-
matcher(context:
|
|
241
|
-
handler: (inputContext:
|
|
241
|
+
matcher(context: better_auth327.HookEndpointContext): boolean;
|
|
242
|
+
handler: (inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<void>;
|
|
242
243
|
}[];
|
|
243
244
|
};
|
|
244
245
|
schema: {
|
|
@@ -267,7 +268,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
267
268
|
pathMethods: {
|
|
268
269
|
[x: string]: "GET";
|
|
269
270
|
};
|
|
270
|
-
getActions: ($fetch:
|
|
271
|
+
getActions: ($fetch: _better_fetch_fetch189.BetterFetch) => {
|
|
271
272
|
jwks: (fetchOptions?: any) => Promise<{
|
|
272
273
|
data: null;
|
|
273
274
|
error: {
|
|
@@ -322,7 +323,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
322
323
|
token: string;
|
|
323
324
|
ipAddress?: string | null | undefined;
|
|
324
325
|
userAgent?: string | null | undefined;
|
|
325
|
-
} & Record<string, unknown>, ctx:
|
|
326
|
+
} & Record<string, unknown>, ctx: better_auth327.GenericEndpointContext | null): Promise<void>;
|
|
326
327
|
};
|
|
327
328
|
};
|
|
328
329
|
};
|
|
@@ -330,22 +331,22 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
330
331
|
};
|
|
331
332
|
hooks: {
|
|
332
333
|
after: {
|
|
333
|
-
matcher(context:
|
|
334
|
-
handler: (inputContext:
|
|
334
|
+
matcher(context: better_auth327.HookEndpointContext): boolean;
|
|
335
|
+
handler: (inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<better_auth_plugins49.SessionWithImpersonatedBy[] | undefined>;
|
|
335
336
|
}[];
|
|
336
337
|
};
|
|
337
338
|
endpoints: {
|
|
338
|
-
setRole:
|
|
339
|
+
setRole: better_auth327.StrictEndpoint<"/admin/set-role", {
|
|
339
340
|
method: "POST";
|
|
340
341
|
body: zod0.ZodObject<{
|
|
341
342
|
userId: zod0.ZodCoercedString<unknown>;
|
|
342
343
|
role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
|
|
343
|
-
},
|
|
344
|
+
}, better_auth327.$strip>;
|
|
344
345
|
requireHeaders: true;
|
|
345
|
-
use: ((inputContext:
|
|
346
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
346
347
|
session: {
|
|
347
|
-
user:
|
|
348
|
-
session:
|
|
348
|
+
user: better_auth_plugins49.UserWithRole;
|
|
349
|
+
session: better_auth327.Session;
|
|
349
350
|
};
|
|
350
351
|
}>)[];
|
|
351
352
|
metadata: {
|
|
@@ -379,17 +380,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
379
380
|
};
|
|
380
381
|
};
|
|
381
382
|
}, {
|
|
382
|
-
user:
|
|
383
|
+
user: better_auth_plugins49.UserWithRole;
|
|
383
384
|
}>;
|
|
384
|
-
getUser:
|
|
385
|
+
getUser: better_auth327.StrictEndpoint<"/admin/get-user", {
|
|
385
386
|
method: "GET";
|
|
386
387
|
query: zod0.ZodObject<{
|
|
387
388
|
id: zod0.ZodString;
|
|
388
|
-
},
|
|
389
|
-
use: ((inputContext:
|
|
389
|
+
}, better_auth327.$strip>;
|
|
390
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
390
391
|
session: {
|
|
391
|
-
user:
|
|
392
|
-
session:
|
|
392
|
+
user: better_auth_plugins49.UserWithRole;
|
|
393
|
+
session: better_auth327.Session;
|
|
393
394
|
};
|
|
394
395
|
}>)[];
|
|
395
396
|
metadata: {
|
|
@@ -416,8 +417,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
416
417
|
};
|
|
417
418
|
};
|
|
418
419
|
};
|
|
419
|
-
},
|
|
420
|
-
createUser:
|
|
420
|
+
}, better_auth_plugins49.UserWithRole>;
|
|
421
|
+
createUser: better_auth327.StrictEndpoint<"/admin/create-user", {
|
|
421
422
|
method: "POST";
|
|
422
423
|
body: zod0.ZodObject<{
|
|
423
424
|
email: zod0.ZodString;
|
|
@@ -425,7 +426,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
425
426
|
name: zod0.ZodString;
|
|
426
427
|
role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
|
|
427
428
|
data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
428
|
-
},
|
|
429
|
+
}, better_auth327.$strip>;
|
|
429
430
|
metadata: {
|
|
430
431
|
openapi: {
|
|
431
432
|
operationId: string;
|
|
@@ -460,18 +461,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
460
461
|
};
|
|
461
462
|
};
|
|
462
463
|
}, {
|
|
463
|
-
user:
|
|
464
|
+
user: better_auth_plugins49.UserWithRole;
|
|
464
465
|
}>;
|
|
465
|
-
adminUpdateUser:
|
|
466
|
+
adminUpdateUser: better_auth327.StrictEndpoint<"/admin/update-user", {
|
|
466
467
|
method: "POST";
|
|
467
468
|
body: zod0.ZodObject<{
|
|
468
469
|
userId: zod0.ZodCoercedString<unknown>;
|
|
469
470
|
data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
|
|
470
|
-
},
|
|
471
|
-
use: ((inputContext:
|
|
471
|
+
}, better_auth327.$strip>;
|
|
472
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
472
473
|
session: {
|
|
473
|
-
user:
|
|
474
|
-
session:
|
|
474
|
+
user: better_auth_plugins49.UserWithRole;
|
|
475
|
+
session: better_auth327.Session;
|
|
475
476
|
};
|
|
476
477
|
}>)[];
|
|
477
478
|
metadata: {
|
|
@@ -498,13 +499,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
498
499
|
};
|
|
499
500
|
};
|
|
500
501
|
};
|
|
501
|
-
},
|
|
502
|
-
listUsers:
|
|
502
|
+
}, better_auth_plugins49.UserWithRole>;
|
|
503
|
+
listUsers: better_auth327.StrictEndpoint<"/admin/list-users", {
|
|
503
504
|
method: "GET";
|
|
504
|
-
use: ((inputContext:
|
|
505
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
505
506
|
session: {
|
|
506
|
-
user:
|
|
507
|
-
session:
|
|
507
|
+
user: better_auth_plugins49.UserWithRole;
|
|
508
|
+
session: better_auth327.Session;
|
|
508
509
|
};
|
|
509
510
|
}>)[];
|
|
510
511
|
query: zod0.ZodObject<{
|
|
@@ -536,7 +537,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
536
537
|
gte: "gte";
|
|
537
538
|
contains: "contains";
|
|
538
539
|
}>>;
|
|
539
|
-
},
|
|
540
|
+
}, better_auth327.$strip>;
|
|
540
541
|
metadata: {
|
|
541
542
|
openapi: {
|
|
542
543
|
operationId: string;
|
|
@@ -575,7 +576,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
575
576
|
};
|
|
576
577
|
};
|
|
577
578
|
}, {
|
|
578
|
-
users:
|
|
579
|
+
users: better_auth_plugins49.UserWithRole[];
|
|
579
580
|
total: number;
|
|
580
581
|
limit: number | undefined;
|
|
581
582
|
offset: number | undefined;
|
|
@@ -583,17 +584,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
583
584
|
users: never[];
|
|
584
585
|
total: number;
|
|
585
586
|
}>;
|
|
586
|
-
listUserSessions:
|
|
587
|
+
listUserSessions: better_auth327.StrictEndpoint<"/admin/list-user-sessions", {
|
|
587
588
|
method: "POST";
|
|
588
|
-
use: ((inputContext:
|
|
589
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
589
590
|
session: {
|
|
590
|
-
user:
|
|
591
|
-
session:
|
|
591
|
+
user: better_auth_plugins49.UserWithRole;
|
|
592
|
+
session: better_auth327.Session;
|
|
592
593
|
};
|
|
593
594
|
}>)[];
|
|
594
595
|
body: zod0.ZodObject<{
|
|
595
596
|
userId: zod0.ZodCoercedString<unknown>;
|
|
596
|
-
},
|
|
597
|
+
}, better_auth327.$strip>;
|
|
597
598
|
metadata: {
|
|
598
599
|
openapi: {
|
|
599
600
|
operationId: string;
|
|
@@ -622,17 +623,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
622
623
|
};
|
|
623
624
|
};
|
|
624
625
|
}, {
|
|
625
|
-
sessions:
|
|
626
|
+
sessions: better_auth_plugins49.SessionWithImpersonatedBy[];
|
|
626
627
|
}>;
|
|
627
|
-
unbanUser:
|
|
628
|
+
unbanUser: better_auth327.StrictEndpoint<"/admin/unban-user", {
|
|
628
629
|
method: "POST";
|
|
629
630
|
body: zod0.ZodObject<{
|
|
630
631
|
userId: zod0.ZodCoercedString<unknown>;
|
|
631
|
-
},
|
|
632
|
-
use: ((inputContext:
|
|
632
|
+
}, better_auth327.$strip>;
|
|
633
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
633
634
|
session: {
|
|
634
|
-
user:
|
|
635
|
-
session:
|
|
635
|
+
user: better_auth_plugins49.UserWithRole;
|
|
636
|
+
session: better_auth327.Session;
|
|
636
637
|
};
|
|
637
638
|
}>)[];
|
|
638
639
|
metadata: {
|
|
@@ -660,19 +661,19 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
660
661
|
};
|
|
661
662
|
};
|
|
662
663
|
}, {
|
|
663
|
-
user:
|
|
664
|
+
user: better_auth_plugins49.UserWithRole;
|
|
664
665
|
}>;
|
|
665
|
-
banUser:
|
|
666
|
+
banUser: better_auth327.StrictEndpoint<"/admin/ban-user", {
|
|
666
667
|
method: "POST";
|
|
667
668
|
body: zod0.ZodObject<{
|
|
668
669
|
userId: zod0.ZodCoercedString<unknown>;
|
|
669
670
|
banReason: zod0.ZodOptional<zod0.ZodString>;
|
|
670
671
|
banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
|
|
671
|
-
},
|
|
672
|
-
use: ((inputContext:
|
|
672
|
+
}, better_auth327.$strip>;
|
|
673
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
673
674
|
session: {
|
|
674
|
-
user:
|
|
675
|
-
session:
|
|
675
|
+
user: better_auth_plugins49.UserWithRole;
|
|
676
|
+
session: better_auth327.Session;
|
|
676
677
|
};
|
|
677
678
|
}>)[];
|
|
678
679
|
metadata: {
|
|
@@ -700,17 +701,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
700
701
|
};
|
|
701
702
|
};
|
|
702
703
|
}, {
|
|
703
|
-
user:
|
|
704
|
+
user: better_auth_plugins49.UserWithRole;
|
|
704
705
|
}>;
|
|
705
|
-
impersonateUser:
|
|
706
|
+
impersonateUser: better_auth327.StrictEndpoint<"/admin/impersonate-user", {
|
|
706
707
|
method: "POST";
|
|
707
708
|
body: zod0.ZodObject<{
|
|
708
709
|
userId: zod0.ZodCoercedString<unknown>;
|
|
709
|
-
},
|
|
710
|
-
use: ((inputContext:
|
|
710
|
+
}, better_auth327.$strip>;
|
|
711
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
711
712
|
session: {
|
|
712
|
-
user:
|
|
713
|
-
session:
|
|
713
|
+
user: better_auth_plugins49.UserWithRole;
|
|
714
|
+
session: better_auth327.Session;
|
|
714
715
|
};
|
|
715
716
|
}>)[];
|
|
716
717
|
metadata: {
|
|
@@ -751,9 +752,9 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
751
752
|
ipAddress?: string | null | undefined;
|
|
752
753
|
userAgent?: string | null | undefined;
|
|
753
754
|
};
|
|
754
|
-
user:
|
|
755
|
+
user: better_auth_plugins49.UserWithRole;
|
|
755
756
|
}>;
|
|
756
|
-
stopImpersonating:
|
|
757
|
+
stopImpersonating: better_auth327.StrictEndpoint<"/admin/stop-impersonating", {
|
|
757
758
|
method: "POST";
|
|
758
759
|
requireHeaders: true;
|
|
759
760
|
}, {
|
|
@@ -777,15 +778,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
777
778
|
image?: string | null | undefined;
|
|
778
779
|
} & Record<string, any>;
|
|
779
780
|
}>;
|
|
780
|
-
revokeUserSession:
|
|
781
|
+
revokeUserSession: better_auth327.StrictEndpoint<"/admin/revoke-user-session", {
|
|
781
782
|
method: "POST";
|
|
782
783
|
body: zod0.ZodObject<{
|
|
783
784
|
sessionToken: zod0.ZodString;
|
|
784
|
-
},
|
|
785
|
-
use: ((inputContext:
|
|
785
|
+
}, better_auth327.$strip>;
|
|
786
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
786
787
|
session: {
|
|
787
|
-
user:
|
|
788
|
-
session:
|
|
788
|
+
user: better_auth_plugins49.UserWithRole;
|
|
789
|
+
session: better_auth327.Session;
|
|
789
790
|
};
|
|
790
791
|
}>)[];
|
|
791
792
|
metadata: {
|
|
@@ -815,15 +816,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
815
816
|
}, {
|
|
816
817
|
success: boolean;
|
|
817
818
|
}>;
|
|
818
|
-
revokeUserSessions:
|
|
819
|
+
revokeUserSessions: better_auth327.StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
819
820
|
method: "POST";
|
|
820
821
|
body: zod0.ZodObject<{
|
|
821
822
|
userId: zod0.ZodCoercedString<unknown>;
|
|
822
|
-
},
|
|
823
|
-
use: ((inputContext:
|
|
823
|
+
}, better_auth327.$strip>;
|
|
824
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
824
825
|
session: {
|
|
825
|
-
user:
|
|
826
|
-
session:
|
|
826
|
+
user: better_auth_plugins49.UserWithRole;
|
|
827
|
+
session: better_auth327.Session;
|
|
827
828
|
};
|
|
828
829
|
}>)[];
|
|
829
830
|
metadata: {
|
|
@@ -853,15 +854,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
853
854
|
}, {
|
|
854
855
|
success: boolean;
|
|
855
856
|
}>;
|
|
856
|
-
removeUser:
|
|
857
|
+
removeUser: better_auth327.StrictEndpoint<"/admin/remove-user", {
|
|
857
858
|
method: "POST";
|
|
858
859
|
body: zod0.ZodObject<{
|
|
859
860
|
userId: zod0.ZodCoercedString<unknown>;
|
|
860
|
-
},
|
|
861
|
-
use: ((inputContext:
|
|
861
|
+
}, better_auth327.$strip>;
|
|
862
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
862
863
|
session: {
|
|
863
|
-
user:
|
|
864
|
-
session:
|
|
864
|
+
user: better_auth_plugins49.UserWithRole;
|
|
865
|
+
session: better_auth327.Session;
|
|
865
866
|
};
|
|
866
867
|
}>)[];
|
|
867
868
|
metadata: {
|
|
@@ -891,16 +892,16 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
891
892
|
}, {
|
|
892
893
|
success: boolean;
|
|
893
894
|
}>;
|
|
894
|
-
setUserPassword:
|
|
895
|
+
setUserPassword: better_auth327.StrictEndpoint<"/admin/set-user-password", {
|
|
895
896
|
method: "POST";
|
|
896
897
|
body: zod0.ZodObject<{
|
|
897
898
|
newPassword: zod0.ZodString;
|
|
898
899
|
userId: zod0.ZodCoercedString<unknown>;
|
|
899
|
-
},
|
|
900
|
-
use: ((inputContext:
|
|
900
|
+
}, better_auth327.$strip>;
|
|
901
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<{
|
|
901
902
|
session: {
|
|
902
|
-
user:
|
|
903
|
-
session:
|
|
903
|
+
user: better_auth_plugins49.UserWithRole;
|
|
904
|
+
session: better_auth327.Session;
|
|
904
905
|
};
|
|
905
906
|
}>)[];
|
|
906
907
|
metadata: {
|
|
@@ -930,18 +931,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
930
931
|
}, {
|
|
931
932
|
status: boolean;
|
|
932
933
|
}>;
|
|
933
|
-
userHasPermission:
|
|
934
|
+
userHasPermission: better_auth327.StrictEndpoint<"/admin/has-permission", {
|
|
934
935
|
method: "POST";
|
|
935
936
|
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
936
937
|
userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
|
|
937
938
|
role: zod0.ZodOptional<zod0.ZodString>;
|
|
938
|
-
},
|
|
939
|
+
}, better_auth327.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
|
|
939
940
|
permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
940
941
|
permissions: zod0.ZodUndefined;
|
|
941
|
-
},
|
|
942
|
+
}, better_auth327.$strip>, zod0.ZodObject<{
|
|
942
943
|
permission: zod0.ZodUndefined;
|
|
943
944
|
permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
944
|
-
},
|
|
945
|
+
}, better_auth327.$strip>]>>;
|
|
945
946
|
metadata: {
|
|
946
947
|
openapi: {
|
|
947
948
|
description: string;
|
|
@@ -1071,13 +1072,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1071
1072
|
};
|
|
1072
1073
|
};
|
|
1073
1074
|
options: NoInfer<{
|
|
1074
|
-
ac:
|
|
1075
|
+
ac: better_auth_plugins49.AccessControl<{
|
|
1075
1076
|
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "delete", "set-password", "get", "update"];
|
|
1076
1077
|
readonly session: readonly ["list", "revoke", "delete"];
|
|
1077
1078
|
}>;
|
|
1078
1079
|
roles: {
|
|
1079
|
-
admin:
|
|
1080
|
-
user:
|
|
1080
|
+
admin: better_auth_plugins49.Role;
|
|
1081
|
+
user: better_auth_plugins49.Role;
|
|
1081
1082
|
};
|
|
1082
1083
|
}>;
|
|
1083
1084
|
};
|
|
@@ -1106,8 +1107,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1106
1107
|
};
|
|
1107
1108
|
} | {
|
|
1108
1109
|
id: "organization";
|
|
1109
|
-
$InferServerPlugin:
|
|
1110
|
-
ac:
|
|
1110
|
+
$InferServerPlugin: better_auth_plugins49.OrganizationPlugin<{
|
|
1111
|
+
ac: better_auth_plugins49.AccessControl<{
|
|
1111
1112
|
readonly organization: readonly ["update", "delete"];
|
|
1112
1113
|
readonly member: readonly ["create", "update", "delete"];
|
|
1113
1114
|
readonly invitation: readonly ["create", "cancel"];
|
|
@@ -1115,9 +1116,9 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1115
1116
|
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
1116
1117
|
}>;
|
|
1117
1118
|
roles: {
|
|
1118
|
-
admin:
|
|
1119
|
-
member:
|
|
1120
|
-
owner:
|
|
1119
|
+
admin: better_auth_plugins49.Role;
|
|
1120
|
+
member: better_auth_plugins49.Role;
|
|
1121
|
+
owner: better_auth_plugins49.Role;
|
|
1121
1122
|
};
|
|
1122
1123
|
teams: {
|
|
1123
1124
|
enabled: false;
|
|
@@ -1125,27 +1126,27 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1125
1126
|
schema: {
|
|
1126
1127
|
organization?: {
|
|
1127
1128
|
additionalFields?: {
|
|
1128
|
-
[key: string]:
|
|
1129
|
+
[key: string]: better_auth327.DBFieldAttribute;
|
|
1129
1130
|
};
|
|
1130
1131
|
};
|
|
1131
1132
|
member?: {
|
|
1132
1133
|
additionalFields?: {
|
|
1133
|
-
[key: string]:
|
|
1134
|
+
[key: string]: better_auth327.DBFieldAttribute;
|
|
1134
1135
|
};
|
|
1135
1136
|
};
|
|
1136
1137
|
invitation?: {
|
|
1137
1138
|
additionalFields?: {
|
|
1138
|
-
[key: string]:
|
|
1139
|
+
[key: string]: better_auth327.DBFieldAttribute;
|
|
1139
1140
|
};
|
|
1140
1141
|
};
|
|
1141
1142
|
team?: {
|
|
1142
1143
|
additionalFields?: {
|
|
1143
|
-
[key: string]:
|
|
1144
|
+
[key: string]: better_auth327.DBFieldAttribute;
|
|
1144
1145
|
};
|
|
1145
1146
|
};
|
|
1146
1147
|
organizationRole?: {
|
|
1147
1148
|
additionalFields?: {
|
|
1148
|
-
[key: string]:
|
|
1149
|
+
[key: string]: better_auth327.DBFieldAttribute;
|
|
1149
1150
|
};
|
|
1150
1151
|
};
|
|
1151
1152
|
} | undefined;
|
|
@@ -1153,7 +1154,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1153
1154
|
enabled: false;
|
|
1154
1155
|
};
|
|
1155
1156
|
}>;
|
|
1156
|
-
getActions: ($fetch:
|
|
1157
|
+
getActions: ($fetch: _better_fetch_fetch189.BetterFetch, _$store: better_auth327.ClientStore, co: BetterAuthClientOptions | undefined) => {
|
|
1157
1158
|
$Infer: {
|
|
1158
1159
|
ActiveOrganization: {
|
|
1159
1160
|
members: {
|
|
@@ -1174,7 +1175,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1174
1175
|
organizationId: string;
|
|
1175
1176
|
email: string;
|
|
1176
1177
|
role: "admin" | "member" | "owner";
|
|
1177
|
-
status:
|
|
1178
|
+
status: better_auth_plugins49.InvitationStatus;
|
|
1178
1179
|
inviterId: string;
|
|
1179
1180
|
expiresAt: Date;
|
|
1180
1181
|
createdAt: Date;
|
|
@@ -1200,7 +1201,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1200
1201
|
organizationId: string;
|
|
1201
1202
|
email: string;
|
|
1202
1203
|
role: "admin" | "member" | "owner";
|
|
1203
|
-
status:
|
|
1204
|
+
status: better_auth_plugins49.InvitationStatus;
|
|
1204
1205
|
inviterId: string;
|
|
1205
1206
|
expiresAt: Date;
|
|
1206
1207
|
createdAt: Date;
|
|
@@ -1250,12 +1251,12 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1250
1251
|
}) => boolean;
|
|
1251
1252
|
};
|
|
1252
1253
|
};
|
|
1253
|
-
getAtoms: ($fetch:
|
|
1254
|
-
$listOrg:
|
|
1255
|
-
$activeOrgSignal:
|
|
1256
|
-
$activeMemberSignal:
|
|
1257
|
-
$activeMemberRoleSignal:
|
|
1258
|
-
activeOrganization:
|
|
1254
|
+
getAtoms: ($fetch: _better_fetch_fetch189.BetterFetch) => {
|
|
1255
|
+
$listOrg: better_auth_react2.PreinitializedWritableAtom<boolean> & object;
|
|
1256
|
+
$activeOrgSignal: better_auth_react2.PreinitializedWritableAtom<boolean> & object;
|
|
1257
|
+
$activeMemberSignal: better_auth_react2.PreinitializedWritableAtom<boolean> & object;
|
|
1258
|
+
$activeMemberRoleSignal: better_auth_react2.PreinitializedWritableAtom<boolean> & object;
|
|
1259
|
+
activeOrganization: better_auth_client3.AuthQueryAtom<better_auth327.Prettify<{
|
|
1259
1260
|
id: string;
|
|
1260
1261
|
name: string;
|
|
1261
1262
|
slug: string;
|
|
@@ -1281,13 +1282,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1281
1282
|
organizationId: string;
|
|
1282
1283
|
email: string;
|
|
1283
1284
|
role: "admin" | "member" | "owner";
|
|
1284
|
-
status:
|
|
1285
|
+
status: better_auth_plugins49.InvitationStatus;
|
|
1285
1286
|
inviterId: string;
|
|
1286
1287
|
expiresAt: Date;
|
|
1287
1288
|
createdAt: Date;
|
|
1288
1289
|
}[];
|
|
1289
1290
|
}>>;
|
|
1290
|
-
listOrganizations:
|
|
1291
|
+
listOrganizations: better_auth_client3.AuthQueryAtom<{
|
|
1291
1292
|
id: string;
|
|
1292
1293
|
name: string;
|
|
1293
1294
|
slug: string;
|
|
@@ -1295,14 +1296,14 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1295
1296
|
logo?: string | null | undefined | undefined;
|
|
1296
1297
|
metadata?: any;
|
|
1297
1298
|
}[]>;
|
|
1298
|
-
activeMember:
|
|
1299
|
+
activeMember: better_auth_client3.AuthQueryAtom<{
|
|
1299
1300
|
id: string;
|
|
1300
1301
|
organizationId: string;
|
|
1301
1302
|
userId: string;
|
|
1302
1303
|
role: string;
|
|
1303
1304
|
createdAt: Date;
|
|
1304
1305
|
}>;
|
|
1305
|
-
activeMemberRole:
|
|
1306
|
+
activeMemberRole: better_auth_client3.AuthQueryAtom<{
|
|
1306
1307
|
role: string;
|
|
1307
1308
|
}>;
|
|
1308
1309
|
};
|
|
@@ -1328,13 +1329,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1328
1329
|
})[];
|
|
1329
1330
|
} | {
|
|
1330
1331
|
id: "email-otp";
|
|
1331
|
-
$InferServerPlugin: ReturnType<(options:
|
|
1332
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins49.EmailOTPOptions) => {
|
|
1332
1333
|
id: "email-otp";
|
|
1333
|
-
init(ctx:
|
|
1334
|
+
init(ctx: better_auth327.AuthContext): {
|
|
1334
1335
|
options: {
|
|
1335
1336
|
emailVerification: {
|
|
1336
1337
|
sendVerificationEmail(data: {
|
|
1337
|
-
user:
|
|
1338
|
+
user: better_auth327.User;
|
|
1338
1339
|
url: string;
|
|
1339
1340
|
token: string;
|
|
1340
1341
|
}, request: Request | undefined): Promise<void>;
|
|
@@ -1342,7 +1343,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1342
1343
|
};
|
|
1343
1344
|
} | undefined;
|
|
1344
1345
|
endpoints: {
|
|
1345
|
-
sendVerificationOTP:
|
|
1346
|
+
sendVerificationOTP: better_auth327.StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
1346
1347
|
method: "POST";
|
|
1347
1348
|
body: zod0.ZodObject<{
|
|
1348
1349
|
email: zod0.ZodString;
|
|
@@ -1351,7 +1352,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1351
1352
|
"email-verification": "email-verification";
|
|
1352
1353
|
"forget-password": "forget-password";
|
|
1353
1354
|
}>;
|
|
1354
|
-
},
|
|
1355
|
+
}, better_auth327.$strip>;
|
|
1355
1356
|
metadata: {
|
|
1356
1357
|
openapi: {
|
|
1357
1358
|
operationId: string;
|
|
@@ -1378,7 +1379,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1378
1379
|
}, {
|
|
1379
1380
|
success: boolean;
|
|
1380
1381
|
}>;
|
|
1381
|
-
createVerificationOTP:
|
|
1382
|
+
createVerificationOTP: better_auth327.StrictEndpoint<string, {
|
|
1382
1383
|
method: "POST";
|
|
1383
1384
|
body: zod0.ZodObject<{
|
|
1384
1385
|
email: zod0.ZodString;
|
|
@@ -1387,7 +1388,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1387
1388
|
"email-verification": "email-verification";
|
|
1388
1389
|
"forget-password": "forget-password";
|
|
1389
1390
|
}>;
|
|
1390
|
-
},
|
|
1391
|
+
}, better_auth327.$strip>;
|
|
1391
1392
|
metadata: {
|
|
1392
1393
|
openapi: {
|
|
1393
1394
|
operationId: string;
|
|
@@ -1407,7 +1408,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1407
1408
|
};
|
|
1408
1409
|
};
|
|
1409
1410
|
}, string>;
|
|
1410
|
-
getVerificationOTP:
|
|
1411
|
+
getVerificationOTP: better_auth327.StrictEndpoint<string, {
|
|
1411
1412
|
method: "GET";
|
|
1412
1413
|
query: zod0.ZodObject<{
|
|
1413
1414
|
email: zod0.ZodString;
|
|
@@ -1416,7 +1417,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1416
1417
|
"email-verification": "email-verification";
|
|
1417
1418
|
"forget-password": "forget-password";
|
|
1418
1419
|
}>;
|
|
1419
|
-
},
|
|
1420
|
+
}, better_auth327.$strip>;
|
|
1420
1421
|
metadata: {
|
|
1421
1422
|
openapi: {
|
|
1422
1423
|
operationId: string;
|
|
@@ -1448,7 +1449,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1448
1449
|
} | {
|
|
1449
1450
|
otp: string;
|
|
1450
1451
|
}>;
|
|
1451
|
-
checkVerificationOTP:
|
|
1452
|
+
checkVerificationOTP: better_auth327.StrictEndpoint<"/email-otp/check-verification-otp", {
|
|
1452
1453
|
method: "POST";
|
|
1453
1454
|
body: zod0.ZodObject<{
|
|
1454
1455
|
email: zod0.ZodString;
|
|
@@ -1458,7 +1459,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1458
1459
|
"forget-password": "forget-password";
|
|
1459
1460
|
}>;
|
|
1460
1461
|
otp: zod0.ZodString;
|
|
1461
|
-
},
|
|
1462
|
+
}, better_auth327.$strip>;
|
|
1462
1463
|
metadata: {
|
|
1463
1464
|
openapi: {
|
|
1464
1465
|
operationId: string;
|
|
@@ -1485,12 +1486,12 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1485
1486
|
}, {
|
|
1486
1487
|
success: boolean;
|
|
1487
1488
|
}>;
|
|
1488
|
-
verifyEmailOTP:
|
|
1489
|
+
verifyEmailOTP: better_auth327.StrictEndpoint<"/email-otp/verify-email", {
|
|
1489
1490
|
method: "POST";
|
|
1490
1491
|
body: zod0.ZodObject<{
|
|
1491
1492
|
email: zod0.ZodString;
|
|
1492
1493
|
otp: zod0.ZodString;
|
|
1493
|
-
},
|
|
1494
|
+
}, better_auth327.$strip>;
|
|
1494
1495
|
metadata: {
|
|
1495
1496
|
openapi: {
|
|
1496
1497
|
description: string;
|
|
@@ -1549,12 +1550,12 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1549
1550
|
image?: string | null | undefined;
|
|
1550
1551
|
} & Record<string, any>;
|
|
1551
1552
|
}>;
|
|
1552
|
-
signInEmailOTP:
|
|
1553
|
+
signInEmailOTP: better_auth327.StrictEndpoint<"/sign-in/email-otp", {
|
|
1553
1554
|
method: "POST";
|
|
1554
1555
|
body: zod0.ZodObject<{
|
|
1555
1556
|
email: zod0.ZodString;
|
|
1556
1557
|
otp: zod0.ZodString;
|
|
1557
|
-
},
|
|
1558
|
+
}, better_auth327.$strip>;
|
|
1558
1559
|
metadata: {
|
|
1559
1560
|
openapi: {
|
|
1560
1561
|
operationId: string;
|
|
@@ -1595,11 +1596,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1595
1596
|
image?: string | null | undefined;
|
|
1596
1597
|
};
|
|
1597
1598
|
}>;
|
|
1598
|
-
requestPasswordResetEmailOTP:
|
|
1599
|
+
requestPasswordResetEmailOTP: better_auth327.StrictEndpoint<"/email-otp/request-password-reset", {
|
|
1599
1600
|
method: "POST";
|
|
1600
1601
|
body: zod0.ZodObject<{
|
|
1601
1602
|
email: zod0.ZodString;
|
|
1602
|
-
},
|
|
1603
|
+
}, better_auth327.$strip>;
|
|
1603
1604
|
metadata: {
|
|
1604
1605
|
openapi: {
|
|
1605
1606
|
operationId: string;
|
|
@@ -1627,11 +1628,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1627
1628
|
}, {
|
|
1628
1629
|
success: boolean;
|
|
1629
1630
|
}>;
|
|
1630
|
-
forgetPasswordEmailOTP:
|
|
1631
|
+
forgetPasswordEmailOTP: better_auth327.StrictEndpoint<"/forget-password/email-otp", {
|
|
1631
1632
|
method: "POST";
|
|
1632
1633
|
body: zod0.ZodObject<{
|
|
1633
1634
|
email: zod0.ZodString;
|
|
1634
|
-
},
|
|
1635
|
+
}, better_auth327.$strip>;
|
|
1635
1636
|
metadata: {
|
|
1636
1637
|
openapi: {
|
|
1637
1638
|
operationId: string;
|
|
@@ -1659,13 +1660,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1659
1660
|
}, {
|
|
1660
1661
|
success: boolean;
|
|
1661
1662
|
}>;
|
|
1662
|
-
resetPasswordEmailOTP:
|
|
1663
|
+
resetPasswordEmailOTP: better_auth327.StrictEndpoint<"/email-otp/reset-password", {
|
|
1663
1664
|
method: "POST";
|
|
1664
1665
|
body: zod0.ZodObject<{
|
|
1665
1666
|
email: zod0.ZodString;
|
|
1666
1667
|
otp: zod0.ZodString;
|
|
1667
1668
|
password: zod0.ZodString;
|
|
1668
|
-
},
|
|
1669
|
+
}, better_auth327.$strip>;
|
|
1669
1670
|
metadata: {
|
|
1670
1671
|
openapi: {
|
|
1671
1672
|
operationId: string;
|
|
@@ -1695,8 +1696,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1695
1696
|
};
|
|
1696
1697
|
hooks: {
|
|
1697
1698
|
after: {
|
|
1698
|
-
matcher(context:
|
|
1699
|
-
handler: (inputContext:
|
|
1699
|
+
matcher(context: better_auth327.HookEndpointContext): boolean;
|
|
1700
|
+
handler: (inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<void>;
|
|
1700
1701
|
}[];
|
|
1701
1702
|
};
|
|
1702
1703
|
$ERROR_CODES: {
|
|
@@ -1733,7 +1734,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1733
1734
|
window: number;
|
|
1734
1735
|
max: number;
|
|
1735
1736
|
})[];
|
|
1736
|
-
options:
|
|
1737
|
+
options: better_auth_plugins49.EmailOTPOptions;
|
|
1737
1738
|
}>;
|
|
1738
1739
|
atomListeners: {
|
|
1739
1740
|
matcher: (path: string) => path is "/email-otp/verify-email" | "/sign-in/email-otp";
|
|
@@ -1741,10 +1742,10 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1741
1742
|
}[];
|
|
1742
1743
|
} | {
|
|
1743
1744
|
id: "magic-link";
|
|
1744
|
-
$InferServerPlugin: ReturnType<(options:
|
|
1745
|
+
$InferServerPlugin: ReturnType<(options: better_auth_plugins49.MagicLinkOptions) => {
|
|
1745
1746
|
id: "magic-link";
|
|
1746
1747
|
endpoints: {
|
|
1747
|
-
signInMagicLink:
|
|
1748
|
+
signInMagicLink: better_auth327.StrictEndpoint<"/sign-in/magic-link", {
|
|
1748
1749
|
method: "POST";
|
|
1749
1750
|
requireHeaders: true;
|
|
1750
1751
|
body: zod0.ZodObject<{
|
|
@@ -1753,7 +1754,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1753
1754
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1754
1755
|
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1755
1756
|
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1756
|
-
},
|
|
1757
|
+
}, better_auth327.$strip>;
|
|
1757
1758
|
metadata: {
|
|
1758
1759
|
openapi: {
|
|
1759
1760
|
operationId: string;
|
|
@@ -1780,15 +1781,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1780
1781
|
}, {
|
|
1781
1782
|
status: boolean;
|
|
1782
1783
|
}>;
|
|
1783
|
-
magicLinkVerify:
|
|
1784
|
+
magicLinkVerify: better_auth327.StrictEndpoint<"/magic-link/verify", {
|
|
1784
1785
|
method: "GET";
|
|
1785
1786
|
query: zod0.ZodObject<{
|
|
1786
1787
|
token: zod0.ZodString;
|
|
1787
1788
|
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1788
1789
|
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1789
1790
|
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1790
|
-
},
|
|
1791
|
-
use: ((inputContext:
|
|
1791
|
+
}, better_auth327.$strip>;
|
|
1792
|
+
use: ((inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<void>)[];
|
|
1792
1793
|
requireHeaders: true;
|
|
1793
1794
|
metadata: {
|
|
1794
1795
|
openapi: {
|
|
@@ -1834,8 +1835,314 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1834
1835
|
window: number;
|
|
1835
1836
|
max: number;
|
|
1836
1837
|
}[];
|
|
1837
|
-
options:
|
|
1838
|
+
options: better_auth_plugins49.MagicLinkOptions;
|
|
1838
1839
|
}>;
|
|
1840
|
+
} | {
|
|
1841
|
+
id: "phoneNumber";
|
|
1842
|
+
$InferServerPlugin: ReturnType<(options?: better_auth_plugins49.PhoneNumberOptions | undefined) => {
|
|
1843
|
+
id: "phone-number";
|
|
1844
|
+
hooks: {
|
|
1845
|
+
before: {
|
|
1846
|
+
matcher: (ctx: better_auth327.HookEndpointContext) => boolean;
|
|
1847
|
+
handler: (inputContext: better_auth327.MiddlewareInputContext<better_auth327.MiddlewareOptions>) => Promise<never>;
|
|
1848
|
+
}[];
|
|
1849
|
+
};
|
|
1850
|
+
endpoints: {
|
|
1851
|
+
signInPhoneNumber: better_auth327.StrictEndpoint<"/sign-in/phone-number", {
|
|
1852
|
+
method: "POST";
|
|
1853
|
+
body: zod0.ZodObject<{
|
|
1854
|
+
phoneNumber: zod0.ZodString;
|
|
1855
|
+
password: zod0.ZodString;
|
|
1856
|
+
rememberMe: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1857
|
+
}, better_auth327.$strip>;
|
|
1858
|
+
metadata: {
|
|
1859
|
+
openapi: {
|
|
1860
|
+
summary: string;
|
|
1861
|
+
description: string;
|
|
1862
|
+
responses: {
|
|
1863
|
+
200: {
|
|
1864
|
+
description: string;
|
|
1865
|
+
content: {
|
|
1866
|
+
"application/json": {
|
|
1867
|
+
schema: {
|
|
1868
|
+
type: "object";
|
|
1869
|
+
properties: {
|
|
1870
|
+
user: {
|
|
1871
|
+
$ref: string;
|
|
1872
|
+
};
|
|
1873
|
+
session: {
|
|
1874
|
+
$ref: string;
|
|
1875
|
+
};
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
};
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
400: {
|
|
1882
|
+
description: string;
|
|
1883
|
+
};
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
};
|
|
1887
|
+
}, {
|
|
1888
|
+
token: string;
|
|
1889
|
+
user: better_auth_plugins49.UserWithPhoneNumber;
|
|
1890
|
+
}>;
|
|
1891
|
+
sendPhoneNumberOTP: better_auth327.StrictEndpoint<"/phone-number/send-otp", {
|
|
1892
|
+
method: "POST";
|
|
1893
|
+
body: zod0.ZodObject<{
|
|
1894
|
+
phoneNumber: zod0.ZodString;
|
|
1895
|
+
}, better_auth327.$strip>;
|
|
1896
|
+
metadata: {
|
|
1897
|
+
openapi: {
|
|
1898
|
+
summary: string;
|
|
1899
|
+
description: string;
|
|
1900
|
+
responses: {
|
|
1901
|
+
200: {
|
|
1902
|
+
description: string;
|
|
1903
|
+
content: {
|
|
1904
|
+
"application/json": {
|
|
1905
|
+
schema: {
|
|
1906
|
+
type: "object";
|
|
1907
|
+
properties: {
|
|
1908
|
+
message: {
|
|
1909
|
+
type: string;
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
};
|
|
1913
|
+
};
|
|
1914
|
+
};
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
};
|
|
1919
|
+
}, {
|
|
1920
|
+
message: string;
|
|
1921
|
+
}>;
|
|
1922
|
+
verifyPhoneNumber: better_auth327.StrictEndpoint<"/phone-number/verify", {
|
|
1923
|
+
method: "POST";
|
|
1924
|
+
body: zod0.ZodObject<{
|
|
1925
|
+
phoneNumber: zod0.ZodString;
|
|
1926
|
+
code: zod0.ZodString;
|
|
1927
|
+
disableSession: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1928
|
+
updatePhoneNumber: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1929
|
+
}, better_auth327.$strip>;
|
|
1930
|
+
metadata: {
|
|
1931
|
+
openapi: {
|
|
1932
|
+
summary: string;
|
|
1933
|
+
description: string;
|
|
1934
|
+
responses: {
|
|
1935
|
+
"200": {
|
|
1936
|
+
description: string;
|
|
1937
|
+
content: {
|
|
1938
|
+
"application/json": {
|
|
1939
|
+
schema: {
|
|
1940
|
+
type: "object";
|
|
1941
|
+
properties: {
|
|
1942
|
+
status: {
|
|
1943
|
+
type: string;
|
|
1944
|
+
description: string;
|
|
1945
|
+
enum: boolean[];
|
|
1946
|
+
};
|
|
1947
|
+
token: {
|
|
1948
|
+
type: string;
|
|
1949
|
+
nullable: boolean;
|
|
1950
|
+
description: string;
|
|
1951
|
+
};
|
|
1952
|
+
user: {
|
|
1953
|
+
type: string;
|
|
1954
|
+
nullable: boolean;
|
|
1955
|
+
properties: {
|
|
1956
|
+
id: {
|
|
1957
|
+
type: string;
|
|
1958
|
+
description: string;
|
|
1959
|
+
};
|
|
1960
|
+
email: {
|
|
1961
|
+
type: string;
|
|
1962
|
+
format: string;
|
|
1963
|
+
nullable: boolean;
|
|
1964
|
+
description: string;
|
|
1965
|
+
};
|
|
1966
|
+
emailVerified: {
|
|
1967
|
+
type: string;
|
|
1968
|
+
nullable: boolean;
|
|
1969
|
+
description: string;
|
|
1970
|
+
};
|
|
1971
|
+
name: {
|
|
1972
|
+
type: string;
|
|
1973
|
+
nullable: boolean;
|
|
1974
|
+
description: string;
|
|
1975
|
+
};
|
|
1976
|
+
image: {
|
|
1977
|
+
type: string;
|
|
1978
|
+
format: string;
|
|
1979
|
+
nullable: boolean;
|
|
1980
|
+
description: string;
|
|
1981
|
+
};
|
|
1982
|
+
phoneNumber: {
|
|
1983
|
+
type: string;
|
|
1984
|
+
description: string;
|
|
1985
|
+
};
|
|
1986
|
+
phoneNumberVerified: {
|
|
1987
|
+
type: string;
|
|
1988
|
+
description: string;
|
|
1989
|
+
};
|
|
1990
|
+
createdAt: {
|
|
1991
|
+
type: string;
|
|
1992
|
+
format: string;
|
|
1993
|
+
description: string;
|
|
1994
|
+
};
|
|
1995
|
+
updatedAt: {
|
|
1996
|
+
type: string;
|
|
1997
|
+
format: string;
|
|
1998
|
+
description: string;
|
|
1999
|
+
};
|
|
2000
|
+
};
|
|
2001
|
+
required: string[];
|
|
2002
|
+
description: string;
|
|
2003
|
+
};
|
|
2004
|
+
};
|
|
2005
|
+
required: string[];
|
|
2006
|
+
};
|
|
2007
|
+
};
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
400: {
|
|
2011
|
+
description: string;
|
|
2012
|
+
};
|
|
2013
|
+
};
|
|
2014
|
+
};
|
|
2015
|
+
};
|
|
2016
|
+
}, {
|
|
2017
|
+
status: boolean;
|
|
2018
|
+
token: string;
|
|
2019
|
+
user: {
|
|
2020
|
+
id: string;
|
|
2021
|
+
createdAt: Date;
|
|
2022
|
+
updatedAt: Date;
|
|
2023
|
+
email: string;
|
|
2024
|
+
emailVerified: boolean;
|
|
2025
|
+
name: string;
|
|
2026
|
+
image?: string | null | undefined;
|
|
2027
|
+
} & better_auth_plugins49.UserWithPhoneNumber;
|
|
2028
|
+
} | {
|
|
2029
|
+
status: boolean;
|
|
2030
|
+
token: null;
|
|
2031
|
+
user: better_auth_plugins49.UserWithPhoneNumber;
|
|
2032
|
+
}>;
|
|
2033
|
+
requestPasswordResetPhoneNumber: better_auth327.StrictEndpoint<"/phone-number/request-password-reset", {
|
|
2034
|
+
method: "POST";
|
|
2035
|
+
body: zod0.ZodObject<{
|
|
2036
|
+
phoneNumber: zod0.ZodString;
|
|
2037
|
+
}, better_auth327.$strip>;
|
|
2038
|
+
metadata: {
|
|
2039
|
+
openapi: {
|
|
2040
|
+
description: string;
|
|
2041
|
+
responses: {
|
|
2042
|
+
"200": {
|
|
2043
|
+
description: string;
|
|
2044
|
+
content: {
|
|
2045
|
+
"application/json": {
|
|
2046
|
+
schema: {
|
|
2047
|
+
type: "object";
|
|
2048
|
+
properties: {
|
|
2049
|
+
status: {
|
|
2050
|
+
type: string;
|
|
2051
|
+
description: string;
|
|
2052
|
+
enum: boolean[];
|
|
2053
|
+
};
|
|
2054
|
+
};
|
|
2055
|
+
required: string[];
|
|
2056
|
+
};
|
|
2057
|
+
};
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2061
|
+
};
|
|
2062
|
+
};
|
|
2063
|
+
}, {
|
|
2064
|
+
status: boolean;
|
|
2065
|
+
}>;
|
|
2066
|
+
resetPasswordPhoneNumber: better_auth327.StrictEndpoint<"/phone-number/reset-password", {
|
|
2067
|
+
method: "POST";
|
|
2068
|
+
body: zod0.ZodObject<{
|
|
2069
|
+
otp: zod0.ZodString;
|
|
2070
|
+
phoneNumber: zod0.ZodString;
|
|
2071
|
+
newPassword: zod0.ZodString;
|
|
2072
|
+
}, better_auth327.$strip>;
|
|
2073
|
+
metadata: {
|
|
2074
|
+
openapi: {
|
|
2075
|
+
description: string;
|
|
2076
|
+
responses: {
|
|
2077
|
+
"200": {
|
|
2078
|
+
description: string;
|
|
2079
|
+
content: {
|
|
2080
|
+
"application/json": {
|
|
2081
|
+
schema: {
|
|
2082
|
+
type: "object";
|
|
2083
|
+
properties: {
|
|
2084
|
+
status: {
|
|
2085
|
+
type: string;
|
|
2086
|
+
description: string;
|
|
2087
|
+
enum: boolean[];
|
|
2088
|
+
};
|
|
2089
|
+
};
|
|
2090
|
+
required: string[];
|
|
2091
|
+
};
|
|
2092
|
+
};
|
|
2093
|
+
};
|
|
2094
|
+
};
|
|
2095
|
+
};
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
}, {
|
|
2099
|
+
status: boolean;
|
|
2100
|
+
}>;
|
|
2101
|
+
};
|
|
2102
|
+
schema: {
|
|
2103
|
+
user: {
|
|
2104
|
+
fields: {
|
|
2105
|
+
phoneNumber: {
|
|
2106
|
+
type: "string";
|
|
2107
|
+
required: false;
|
|
2108
|
+
unique: true;
|
|
2109
|
+
sortable: true;
|
|
2110
|
+
returned: true;
|
|
2111
|
+
};
|
|
2112
|
+
phoneNumberVerified: {
|
|
2113
|
+
type: "boolean";
|
|
2114
|
+
required: false;
|
|
2115
|
+
returned: true;
|
|
2116
|
+
input: false;
|
|
2117
|
+
};
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
};
|
|
2121
|
+
rateLimit: {
|
|
2122
|
+
pathMatcher(path: string): boolean;
|
|
2123
|
+
window: number;
|
|
2124
|
+
max: number;
|
|
2125
|
+
}[];
|
|
2126
|
+
options: better_auth_plugins49.PhoneNumberOptions | undefined;
|
|
2127
|
+
$ERROR_CODES: {
|
|
2128
|
+
readonly INVALID_PHONE_NUMBER: "Invalid phone number";
|
|
2129
|
+
readonly PHONE_NUMBER_EXIST: "Phone number already exists";
|
|
2130
|
+
readonly PHONE_NUMBER_NOT_EXIST: "phone number isn't registered";
|
|
2131
|
+
readonly INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password";
|
|
2132
|
+
readonly UNEXPECTED_ERROR: "Unexpected error";
|
|
2133
|
+
readonly OTP_NOT_FOUND: "OTP not found";
|
|
2134
|
+
readonly OTP_EXPIRED: "OTP expired";
|
|
2135
|
+
readonly INVALID_OTP: "Invalid OTP";
|
|
2136
|
+
readonly PHONE_NUMBER_NOT_VERIFIED: "Phone number not verified";
|
|
2137
|
+
readonly PHONE_NUMBER_CANNOT_BE_UPDATED: "Phone number cannot be updated";
|
|
2138
|
+
readonly SEND_OTP_NOT_IMPLEMENTED: "sendOTP not implemented";
|
|
2139
|
+
readonly TOO_MANY_ATTEMPTS: "Too many attempts";
|
|
2140
|
+
};
|
|
2141
|
+
}>;
|
|
2142
|
+
atomListeners: {
|
|
2143
|
+
matcher(path: string): path is "/phone-number/verify" | "/sign-in/phone-number" | "/phone-number/update";
|
|
2144
|
+
signal: "$sessionSignal";
|
|
2145
|
+
}[];
|
|
1839
2146
|
})[];
|
|
1840
2147
|
type SupportedBetterAuthClientPlugins = typeof supportedBetterAuthClientPlugins;
|
|
1841
2148
|
declare abstract class NeonAuthAdapterCore {
|
|
@@ -1861,4 +2168,4 @@ declare abstract class NeonAuthAdapterCore {
|
|
|
1861
2168
|
getJWTToken(allowAnonymous: boolean): Promise<string | null>;
|
|
1862
2169
|
}
|
|
1863
2170
|
//#endregion
|
|
1864
|
-
export {
|
|
2171
|
+
export { VanillaBetterAuthClient as A, ReactBetterAuthClient as C, TeamMember as D, TeamInput as E, BetterAuthSession as M, BetterAuthUser as N, TeamMemberInput as O, PhoneNumberOptions as S, Team as T, Member as _, BetterAuthInstance as a, OrganizationInput as b, InferAdminRolesFromOption as c, InvitationStatus as d, JWKOptions as f, MagicLinkOptions as g, JwtOptions as h, AdminOptions as i, BetterAuthErrorResponse as j, UserWithRole as k, Invitation as l, Jwk as m, NeonAuthAdapterCoreAuthOptions as n, BetterFetchError$1 as o, JWSAlgorithms as p, SupportedBetterAuthClientPlugins as r, EmailOTPOptions as s, NeonAuthAdapterCore as t, InvitationInput as u, MemberInput as v, SessionWithImpersonatedBy as w, OrganizationRole as x, Organization as y };
|