@neondatabase/auth 0.1.0-beta.14 → 0.1.0-beta.15
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-BPv4mLT0.mjs → adapter-core-ChIlSbGg.mjs} +126 -1
- package/dist/{adapter-core-9F3bfyWA.d.mts → adapter-core-CtcS7ex8.d.mts} +128 -120
- package/dist/{better-auth-react-adapter-BYvAsZdj.d.mts → better-auth-react-adapter-AucJqubr.d.mts} +7 -7
- package/dist/{better-auth-react-adapter-BkeuhSFt.mjs → better-auth-react-adapter-C3_WRaIy.mjs} +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +2 -1
- package/dist/{neon-auth-BhLZg9v8.mjs → neon-auth-sSiNq4zM.mjs} +1 -1
- package/dist/next/index.d.mts +7 -7
- package/dist/next/index.mjs +7 -8
- package/dist/react/adapters/index.d.mts +3 -2
- package/dist/react/adapters/index.mjs +2 -1
- package/dist/react/index.d.mts +3 -2
- package/dist/react/index.mjs +2 -1
- package/dist/{supabase-adapter-_2wgvfZ3.d.mts → supabase-adapter-Bbn88gZj.d.mts} +261 -261
- package/dist/{supabase-adapter-rl2coLdb.mjs → supabase-adapter-DhlcXYb9.mjs} +1 -1
- package/dist/types/index.d.mts +3 -7
- package/dist/vanilla/adapters/index.d.mts +3 -2
- package/dist/vanilla/adapters/index.mjs +2 -1
- package/dist/vanilla/index.d.mts +3 -2
- package/dist/vanilla/index.mjs +2 -1
- package/llms.txt +157 -0
- package/package.json +3 -2
- /package/dist/{better-auth-types-CE4hLv9E.d.mts → better-auth-types-VqadyqlG.d.mts} +0 -0
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import { createAuthClient } from "better-auth/react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_auth_client23 from "better-auth/client";
|
|
3
3
|
import { BetterAuthClientOptions, createAuthClient as createAuthClient$1 } from "better-auth/client";
|
|
4
|
-
import * as
|
|
4
|
+
import * as better_auth_client_plugins11 from "better-auth/client/plugins";
|
|
5
5
|
import * as zod0 from "zod";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
6
|
+
import * as jose1 from "jose";
|
|
7
|
+
import * as better_auth303 from "better-auth";
|
|
8
|
+
import * as _better_fetch_fetch177 from "@better-fetch/fetch";
|
|
9
|
+
import { BetterFetchError as BetterFetchError$1 } from "@better-fetch/fetch";
|
|
10
|
+
import * as nanostores1 from "nanostores";
|
|
10
11
|
import * as better_call0 from "better-call";
|
|
11
12
|
import * as better_auth_plugins_email_otp0 from "better-auth/plugins/email-otp";
|
|
13
|
+
import { EmailOTPOptions } from "better-auth/plugins/email-otp";
|
|
14
|
+
import { Invitation, InvitationInput, InvitationStatus, Member, MemberInput, Organization, OrganizationInput, OrganizationRole, Team, TeamInput, TeamMember, TeamMemberInput } from "better-auth/plugins/organization";
|
|
15
|
+
import { JWKOptions, JWSAlgorithms, Jwk, JwtOptions } from "better-auth/plugins/jwt";
|
|
16
|
+
import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "better-auth/plugins/admin";
|
|
12
17
|
|
|
18
|
+
//#region src/types/index.d.ts
|
|
19
|
+
type BetterAuthInstance = ReturnType<typeof createAuthClient$1<{
|
|
20
|
+
plugins: SupportedBetterAuthClientPlugins;
|
|
21
|
+
}> | typeof createAuthClient<{
|
|
22
|
+
plugins: SupportedBetterAuthClientPlugins;
|
|
23
|
+
}>>;
|
|
24
|
+
//#endregion
|
|
13
25
|
//#region src/core/adapter-core.d.ts
|
|
14
26
|
interface NeonAuthAdapterCoreAuthOptions extends Omit<BetterAuthClientOptions, 'plugins'> {}
|
|
15
27
|
declare const supportedBetterAuthClientPlugins: ({
|
|
@@ -17,7 +29,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
17
29
|
pathMethods: {
|
|
18
30
|
"/token/anonymous": "GET";
|
|
19
31
|
};
|
|
20
|
-
getActions: ($fetch:
|
|
32
|
+
getActions: ($fetch: _better_fetch_fetch177.BetterFetch) => {
|
|
21
33
|
getAnonymousToken: (fetchOptions?: any) => Promise<{
|
|
22
34
|
data: {
|
|
23
35
|
token: string;
|
|
@@ -35,9 +47,9 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
35
47
|
};
|
|
36
48
|
} | {
|
|
37
49
|
id: "better-auth-client";
|
|
38
|
-
$InferServerPlugin: ReturnType<(options?:
|
|
50
|
+
$InferServerPlugin: ReturnType<(options?: better_auth_client_plugins11.JwtOptions | undefined) => {
|
|
39
51
|
id: "jwt";
|
|
40
|
-
options:
|
|
52
|
+
options: better_auth_client_plugins11.JwtOptions | undefined;
|
|
41
53
|
endpoints: {
|
|
42
54
|
getJwks: better_call0.StrictEndpoint<string, {
|
|
43
55
|
method: "GET";
|
|
@@ -117,7 +129,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
117
129
|
};
|
|
118
130
|
} & {
|
|
119
131
|
use: any[];
|
|
120
|
-
},
|
|
132
|
+
}, jose1.JSONWebKeySet>;
|
|
121
133
|
getToken: better_call0.StrictEndpoint<"/token", {
|
|
122
134
|
method: "GET";
|
|
123
135
|
requireHeaders: true;
|
|
@@ -178,15 +190,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
178
190
|
SERVER_ONLY: true;
|
|
179
191
|
$Infer: {
|
|
180
192
|
body: {
|
|
181
|
-
payload:
|
|
182
|
-
overrideOptions?:
|
|
193
|
+
payload: jose1.JWTPayload;
|
|
194
|
+
overrideOptions?: better_auth_client_plugins11.JwtOptions | undefined;
|
|
183
195
|
};
|
|
184
196
|
};
|
|
185
197
|
};
|
|
186
198
|
body: zod0.ZodObject<{
|
|
187
199
|
payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
188
200
|
overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
189
|
-
},
|
|
201
|
+
}, better_auth303.$strip>;
|
|
190
202
|
} & {
|
|
191
203
|
use: any[];
|
|
192
204
|
}, {
|
|
@@ -213,16 +225,16 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
213
225
|
body: zod0.ZodObject<{
|
|
214
226
|
token: zod0.ZodString;
|
|
215
227
|
issuer: zod0.ZodOptional<zod0.ZodString>;
|
|
216
|
-
},
|
|
228
|
+
}, better_auth303.$strip>;
|
|
217
229
|
} & {
|
|
218
230
|
use: any[];
|
|
219
231
|
}, {
|
|
220
|
-
payload: (
|
|
232
|
+
payload: (jose1.JWTPayload & Required<Pick<jose1.JWTPayload, "sub" | "aud">>) | null;
|
|
221
233
|
}>;
|
|
222
234
|
};
|
|
223
235
|
hooks: {
|
|
224
236
|
after: {
|
|
225
|
-
matcher(context:
|
|
237
|
+
matcher(context: better_auth303.HookEndpointContext): boolean;
|
|
226
238
|
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
|
|
227
239
|
}[];
|
|
228
240
|
};
|
|
@@ -252,7 +264,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
252
264
|
pathMethods: {
|
|
253
265
|
[x: string]: "GET";
|
|
254
266
|
};
|
|
255
|
-
getActions: ($fetch:
|
|
267
|
+
getActions: ($fetch: _better_fetch_fetch177.BetterFetch) => {
|
|
256
268
|
jwks: (fetchOptions?: any) => Promise<{
|
|
257
269
|
data: null;
|
|
258
270
|
error: {
|
|
@@ -261,7 +273,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
261
273
|
statusText: string;
|
|
262
274
|
};
|
|
263
275
|
} | {
|
|
264
|
-
data:
|
|
276
|
+
data: jose1.JSONWebKeySet;
|
|
265
277
|
error: null;
|
|
266
278
|
}>;
|
|
267
279
|
};
|
|
@@ -307,7 +319,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
307
319
|
token: string;
|
|
308
320
|
ipAddress?: string | null | undefined;
|
|
309
321
|
userAgent?: string | null | undefined;
|
|
310
|
-
} & Record<string, unknown>, ctx:
|
|
322
|
+
} & Record<string, unknown>, ctx: better_auth303.GenericEndpointContext | null): Promise<void>;
|
|
311
323
|
};
|
|
312
324
|
};
|
|
313
325
|
};
|
|
@@ -315,8 +327,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
315
327
|
};
|
|
316
328
|
hooks: {
|
|
317
329
|
after: {
|
|
318
|
-
matcher(context:
|
|
319
|
-
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<
|
|
330
|
+
matcher(context: better_auth303.HookEndpointContext): boolean;
|
|
331
|
+
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_client_plugins11.SessionWithImpersonatedBy[] | undefined>;
|
|
320
332
|
}[];
|
|
321
333
|
};
|
|
322
334
|
endpoints: {
|
|
@@ -325,12 +337,12 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
325
337
|
body: zod0.ZodObject<{
|
|
326
338
|
userId: zod0.ZodCoercedString<unknown>;
|
|
327
339
|
role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
|
|
328
|
-
},
|
|
340
|
+
}, better_auth303.$strip>;
|
|
329
341
|
requireHeaders: true;
|
|
330
342
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
331
343
|
session: {
|
|
332
|
-
user:
|
|
333
|
-
session:
|
|
344
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
345
|
+
session: better_auth303.Session;
|
|
334
346
|
};
|
|
335
347
|
}>)[];
|
|
336
348
|
metadata: {
|
|
@@ -366,17 +378,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
366
378
|
} & {
|
|
367
379
|
use: any[];
|
|
368
380
|
}, {
|
|
369
|
-
user:
|
|
381
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
370
382
|
}>;
|
|
371
383
|
getUser: better_call0.StrictEndpoint<"/admin/get-user", {
|
|
372
384
|
method: "GET";
|
|
373
385
|
query: zod0.ZodObject<{
|
|
374
386
|
id: zod0.ZodString;
|
|
375
|
-
},
|
|
387
|
+
}, better_auth303.$strip>;
|
|
376
388
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
377
389
|
session: {
|
|
378
|
-
user:
|
|
379
|
-
session:
|
|
390
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
391
|
+
session: better_auth303.Session;
|
|
380
392
|
};
|
|
381
393
|
}>)[];
|
|
382
394
|
metadata: {
|
|
@@ -422,7 +434,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
422
434
|
name: zod0.ZodString;
|
|
423
435
|
role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
|
|
424
436
|
data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
425
|
-
},
|
|
437
|
+
}, better_auth303.$strip>;
|
|
426
438
|
metadata: {
|
|
427
439
|
openapi: {
|
|
428
440
|
operationId: string;
|
|
@@ -459,18 +471,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
459
471
|
} & {
|
|
460
472
|
use: any[];
|
|
461
473
|
}, {
|
|
462
|
-
user:
|
|
474
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
463
475
|
}>;
|
|
464
476
|
adminUpdateUser: better_call0.StrictEndpoint<"/admin/update-user", {
|
|
465
477
|
method: "POST";
|
|
466
478
|
body: zod0.ZodObject<{
|
|
467
479
|
userId: zod0.ZodCoercedString<unknown>;
|
|
468
480
|
data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
|
|
469
|
-
},
|
|
481
|
+
}, better_auth303.$strip>;
|
|
470
482
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
471
483
|
session: {
|
|
472
|
-
user:
|
|
473
|
-
session:
|
|
484
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
485
|
+
session: better_auth303.Session;
|
|
474
486
|
};
|
|
475
487
|
}>)[];
|
|
476
488
|
metadata: {
|
|
@@ -499,13 +511,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
499
511
|
};
|
|
500
512
|
} & {
|
|
501
513
|
use: any[];
|
|
502
|
-
},
|
|
514
|
+
}, better_auth_client_plugins11.UserWithRole>;
|
|
503
515
|
listUsers: better_call0.StrictEndpoint<"/admin/list-users", {
|
|
504
516
|
method: "GET";
|
|
505
517
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
506
518
|
session: {
|
|
507
|
-
user:
|
|
508
|
-
session:
|
|
519
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
520
|
+
session: better_auth303.Session;
|
|
509
521
|
};
|
|
510
522
|
}>)[];
|
|
511
523
|
query: zod0.ZodObject<{
|
|
@@ -537,7 +549,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
537
549
|
gte: "gte";
|
|
538
550
|
contains: "contains";
|
|
539
551
|
}>>;
|
|
540
|
-
},
|
|
552
|
+
}, better_auth303.$strip>;
|
|
541
553
|
metadata: {
|
|
542
554
|
openapi: {
|
|
543
555
|
operationId: string;
|
|
@@ -578,7 +590,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
578
590
|
} & {
|
|
579
591
|
use: any[];
|
|
580
592
|
}, {
|
|
581
|
-
users:
|
|
593
|
+
users: better_auth_client_plugins11.UserWithRole[];
|
|
582
594
|
total: number;
|
|
583
595
|
limit: number | undefined;
|
|
584
596
|
offset: number | undefined;
|
|
@@ -590,13 +602,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
590
602
|
method: "POST";
|
|
591
603
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
592
604
|
session: {
|
|
593
|
-
user:
|
|
594
|
-
session:
|
|
605
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
606
|
+
session: better_auth303.Session;
|
|
595
607
|
};
|
|
596
608
|
}>)[];
|
|
597
609
|
body: zod0.ZodObject<{
|
|
598
610
|
userId: zod0.ZodCoercedString<unknown>;
|
|
599
|
-
},
|
|
611
|
+
}, better_auth303.$strip>;
|
|
600
612
|
metadata: {
|
|
601
613
|
openapi: {
|
|
602
614
|
operationId: string;
|
|
@@ -627,17 +639,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
627
639
|
} & {
|
|
628
640
|
use: any[];
|
|
629
641
|
}, {
|
|
630
|
-
sessions:
|
|
642
|
+
sessions: better_auth_client_plugins11.SessionWithImpersonatedBy[];
|
|
631
643
|
}>;
|
|
632
644
|
unbanUser: better_call0.StrictEndpoint<"/admin/unban-user", {
|
|
633
645
|
method: "POST";
|
|
634
646
|
body: zod0.ZodObject<{
|
|
635
647
|
userId: zod0.ZodCoercedString<unknown>;
|
|
636
|
-
},
|
|
648
|
+
}, better_auth303.$strip>;
|
|
637
649
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
638
650
|
session: {
|
|
639
|
-
user:
|
|
640
|
-
session:
|
|
651
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
652
|
+
session: better_auth303.Session;
|
|
641
653
|
};
|
|
642
654
|
}>)[];
|
|
643
655
|
metadata: {
|
|
@@ -683,11 +695,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
683
695
|
userId: zod0.ZodCoercedString<unknown>;
|
|
684
696
|
banReason: zod0.ZodOptional<zod0.ZodString>;
|
|
685
697
|
banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
|
|
686
|
-
},
|
|
698
|
+
}, better_auth303.$strip>;
|
|
687
699
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
688
700
|
session: {
|
|
689
|
-
user:
|
|
690
|
-
session:
|
|
701
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
702
|
+
session: better_auth303.Session;
|
|
691
703
|
};
|
|
692
704
|
}>)[];
|
|
693
705
|
metadata: {
|
|
@@ -731,11 +743,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
731
743
|
method: "POST";
|
|
732
744
|
body: zod0.ZodObject<{
|
|
733
745
|
userId: zod0.ZodCoercedString<unknown>;
|
|
734
|
-
},
|
|
746
|
+
}, better_auth303.$strip>;
|
|
735
747
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
736
748
|
session: {
|
|
737
|
-
user:
|
|
738
|
-
session:
|
|
749
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
750
|
+
session: better_auth303.Session;
|
|
739
751
|
};
|
|
740
752
|
}>)[];
|
|
741
753
|
metadata: {
|
|
@@ -778,7 +790,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
778
790
|
ipAddress?: string | null | undefined;
|
|
779
791
|
userAgent?: string | null | undefined;
|
|
780
792
|
};
|
|
781
|
-
user:
|
|
793
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
782
794
|
}>;
|
|
783
795
|
stopImpersonating: better_call0.StrictEndpoint<"/admin/stop-impersonating", {
|
|
784
796
|
method: "POST";
|
|
@@ -786,18 +798,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
786
798
|
} & {
|
|
787
799
|
use: any[];
|
|
788
800
|
}, {
|
|
789
|
-
session:
|
|
790
|
-
user:
|
|
801
|
+
session: better_auth303.Session & Record<string, any>;
|
|
802
|
+
user: better_auth303.User & Record<string, any>;
|
|
791
803
|
}>;
|
|
792
804
|
revokeUserSession: better_call0.StrictEndpoint<"/admin/revoke-user-session", {
|
|
793
805
|
method: "POST";
|
|
794
806
|
body: zod0.ZodObject<{
|
|
795
807
|
sessionToken: zod0.ZodString;
|
|
796
|
-
},
|
|
808
|
+
}, better_auth303.$strip>;
|
|
797
809
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
798
810
|
session: {
|
|
799
|
-
user:
|
|
800
|
-
session:
|
|
811
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
812
|
+
session: better_auth303.Session;
|
|
801
813
|
};
|
|
802
814
|
}>)[];
|
|
803
815
|
metadata: {
|
|
@@ -833,11 +845,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
833
845
|
method: "POST";
|
|
834
846
|
body: zod0.ZodObject<{
|
|
835
847
|
userId: zod0.ZodCoercedString<unknown>;
|
|
836
|
-
},
|
|
848
|
+
}, better_auth303.$strip>;
|
|
837
849
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
838
850
|
session: {
|
|
839
|
-
user:
|
|
840
|
-
session:
|
|
851
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
852
|
+
session: better_auth303.Session;
|
|
841
853
|
};
|
|
842
854
|
}>)[];
|
|
843
855
|
metadata: {
|
|
@@ -873,11 +885,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
873
885
|
method: "POST";
|
|
874
886
|
body: zod0.ZodObject<{
|
|
875
887
|
userId: zod0.ZodCoercedString<unknown>;
|
|
876
|
-
},
|
|
888
|
+
}, better_auth303.$strip>;
|
|
877
889
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
878
890
|
session: {
|
|
879
|
-
user:
|
|
880
|
-
session:
|
|
891
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
892
|
+
session: better_auth303.Session;
|
|
881
893
|
};
|
|
882
894
|
}>)[];
|
|
883
895
|
metadata: {
|
|
@@ -914,11 +926,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
914
926
|
body: zod0.ZodObject<{
|
|
915
927
|
newPassword: zod0.ZodString;
|
|
916
928
|
userId: zod0.ZodCoercedString<unknown>;
|
|
917
|
-
},
|
|
929
|
+
}, better_auth303.$strip>;
|
|
918
930
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
919
931
|
session: {
|
|
920
|
-
user:
|
|
921
|
-
session:
|
|
932
|
+
user: better_auth_client_plugins11.UserWithRole;
|
|
933
|
+
session: better_auth303.Session;
|
|
922
934
|
};
|
|
923
935
|
}>)[];
|
|
924
936
|
metadata: {
|
|
@@ -955,13 +967,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
955
967
|
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
956
968
|
userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
|
|
957
969
|
role: zod0.ZodOptional<zod0.ZodString>;
|
|
958
|
-
},
|
|
970
|
+
}, better_auth303.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
|
|
959
971
|
permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
960
972
|
permissions: zod0.ZodUndefined;
|
|
961
|
-
},
|
|
973
|
+
}, better_auth303.$strip>, zod0.ZodObject<{
|
|
962
974
|
permission: zod0.ZodUndefined;
|
|
963
975
|
permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
964
|
-
},
|
|
976
|
+
}, better_auth303.$strip>]>>;
|
|
965
977
|
metadata: {
|
|
966
978
|
openapi: {
|
|
967
979
|
description: string;
|
|
@@ -1118,8 +1130,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1118
1130
|
};
|
|
1119
1131
|
} | {
|
|
1120
1132
|
id: "organization";
|
|
1121
|
-
$InferServerPlugin:
|
|
1122
|
-
ac:
|
|
1133
|
+
$InferServerPlugin: better_auth_client23.OrganizationPlugin<{
|
|
1134
|
+
ac: better_auth_client23.AccessControl<{
|
|
1123
1135
|
readonly organization: readonly ["update", "delete"];
|
|
1124
1136
|
readonly member: readonly ["create", "update", "delete"];
|
|
1125
1137
|
readonly invitation: readonly ["create", "cancel"];
|
|
@@ -1127,9 +1139,9 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1127
1139
|
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
1128
1140
|
}>;
|
|
1129
1141
|
roles: {
|
|
1130
|
-
admin:
|
|
1131
|
-
member:
|
|
1132
|
-
owner:
|
|
1142
|
+
admin: better_auth_client23.Role;
|
|
1143
|
+
member: better_auth_client23.Role;
|
|
1144
|
+
owner: better_auth_client23.Role;
|
|
1133
1145
|
};
|
|
1134
1146
|
teams: {
|
|
1135
1147
|
enabled: false;
|
|
@@ -1137,27 +1149,27 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1137
1149
|
schema: {
|
|
1138
1150
|
organization?: {
|
|
1139
1151
|
additionalFields?: {
|
|
1140
|
-
[key: string]:
|
|
1152
|
+
[key: string]: better_auth303.DBFieldAttribute;
|
|
1141
1153
|
};
|
|
1142
1154
|
};
|
|
1143
1155
|
member?: {
|
|
1144
1156
|
additionalFields?: {
|
|
1145
|
-
[key: string]:
|
|
1157
|
+
[key: string]: better_auth303.DBFieldAttribute;
|
|
1146
1158
|
};
|
|
1147
1159
|
};
|
|
1148
1160
|
invitation?: {
|
|
1149
1161
|
additionalFields?: {
|
|
1150
|
-
[key: string]:
|
|
1162
|
+
[key: string]: better_auth303.DBFieldAttribute;
|
|
1151
1163
|
};
|
|
1152
1164
|
};
|
|
1153
1165
|
team?: {
|
|
1154
1166
|
additionalFields?: {
|
|
1155
|
-
[key: string]:
|
|
1167
|
+
[key: string]: better_auth303.DBFieldAttribute;
|
|
1156
1168
|
};
|
|
1157
1169
|
};
|
|
1158
1170
|
organizationRole?: {
|
|
1159
1171
|
additionalFields?: {
|
|
1160
|
-
[key: string]:
|
|
1172
|
+
[key: string]: better_auth303.DBFieldAttribute;
|
|
1161
1173
|
};
|
|
1162
1174
|
};
|
|
1163
1175
|
} | undefined;
|
|
@@ -1165,7 +1177,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1165
1177
|
enabled: false;
|
|
1166
1178
|
};
|
|
1167
1179
|
}>;
|
|
1168
|
-
getActions: ($fetch:
|
|
1180
|
+
getActions: ($fetch: _better_fetch_fetch177.BetterFetch, _$store: better_auth303.ClientStore, co: BetterAuthClientOptions | undefined) => {
|
|
1169
1181
|
$Infer: {
|
|
1170
1182
|
ActiveOrganization: {
|
|
1171
1183
|
members: {
|
|
@@ -1186,7 +1198,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1186
1198
|
organizationId: string;
|
|
1187
1199
|
email: string;
|
|
1188
1200
|
role: "admin" | "member" | "owner";
|
|
1189
|
-
status:
|
|
1201
|
+
status: better_auth_client23.InvitationStatus;
|
|
1190
1202
|
inviterId: string;
|
|
1191
1203
|
expiresAt: Date;
|
|
1192
1204
|
createdAt: Date;
|
|
@@ -1212,7 +1224,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1212
1224
|
organizationId: string;
|
|
1213
1225
|
email: string;
|
|
1214
1226
|
role: "admin" | "member" | "owner";
|
|
1215
|
-
status:
|
|
1227
|
+
status: better_auth_client23.InvitationStatus;
|
|
1216
1228
|
inviterId: string;
|
|
1217
1229
|
expiresAt: Date;
|
|
1218
1230
|
createdAt: Date;
|
|
@@ -1243,7 +1255,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1243
1255
|
permission: {
|
|
1244
1256
|
readonly organization?: ("delete" | "update")[] | undefined;
|
|
1245
1257
|
readonly member?: ("delete" | "create" | "update")[] | undefined;
|
|
1246
|
-
readonly invitation?: ("
|
|
1258
|
+
readonly invitation?: ("cancel" | "create")[] | undefined;
|
|
1247
1259
|
readonly team?: ("delete" | "create" | "update")[] | undefined;
|
|
1248
1260
|
readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
|
|
1249
1261
|
};
|
|
@@ -1252,7 +1264,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1252
1264
|
permissions: {
|
|
1253
1265
|
readonly organization?: ("delete" | "update")[] | undefined;
|
|
1254
1266
|
readonly member?: ("delete" | "create" | "update")[] | undefined;
|
|
1255
|
-
readonly invitation?: ("
|
|
1267
|
+
readonly invitation?: ("cancel" | "create")[] | undefined;
|
|
1256
1268
|
readonly team?: ("delete" | "create" | "update")[] | undefined;
|
|
1257
1269
|
readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
|
|
1258
1270
|
};
|
|
@@ -1262,13 +1274,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1262
1274
|
}) => boolean;
|
|
1263
1275
|
};
|
|
1264
1276
|
};
|
|
1265
|
-
getAtoms: ($fetch:
|
|
1266
|
-
$listOrg:
|
|
1267
|
-
$activeOrgSignal:
|
|
1268
|
-
$activeMemberSignal:
|
|
1269
|
-
$activeMemberRoleSignal:
|
|
1270
|
-
activeOrganization:
|
|
1271
|
-
data:
|
|
1277
|
+
getAtoms: ($fetch: _better_fetch_fetch177.BetterFetch) => {
|
|
1278
|
+
$listOrg: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
1279
|
+
$activeOrgSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
1280
|
+
$activeMemberSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
1281
|
+
$activeMemberRoleSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
1282
|
+
activeOrganization: nanostores1.PreinitializedWritableAtom<{
|
|
1283
|
+
data: better_auth303.Prettify<{
|
|
1272
1284
|
id: string;
|
|
1273
1285
|
name: string;
|
|
1274
1286
|
slug: string;
|
|
@@ -1294,20 +1306,20 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1294
1306
|
organizationId: string;
|
|
1295
1307
|
email: string;
|
|
1296
1308
|
role: "admin" | "member" | "owner";
|
|
1297
|
-
status:
|
|
1309
|
+
status: better_auth_client23.InvitationStatus;
|
|
1298
1310
|
inviterId: string;
|
|
1299
1311
|
expiresAt: Date;
|
|
1300
1312
|
createdAt: Date;
|
|
1301
1313
|
}[];
|
|
1302
1314
|
}> | null;
|
|
1303
|
-
error: null |
|
|
1315
|
+
error: null | _better_fetch_fetch177.BetterFetchError;
|
|
1304
1316
|
isPending: boolean;
|
|
1305
1317
|
isRefetching: boolean;
|
|
1306
1318
|
refetch: (queryParams?: {
|
|
1307
|
-
query?:
|
|
1319
|
+
query?: better_auth303.SessionQueryParams;
|
|
1308
1320
|
} | undefined) => Promise<void>;
|
|
1309
1321
|
}> & object;
|
|
1310
|
-
listOrganizations:
|
|
1322
|
+
listOrganizations: nanostores1.PreinitializedWritableAtom<{
|
|
1311
1323
|
data: {
|
|
1312
1324
|
id: string;
|
|
1313
1325
|
name: string;
|
|
@@ -1316,14 +1328,14 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1316
1328
|
logo?: string | null | undefined | undefined;
|
|
1317
1329
|
metadata?: any;
|
|
1318
1330
|
}[] | null;
|
|
1319
|
-
error: null |
|
|
1331
|
+
error: null | _better_fetch_fetch177.BetterFetchError;
|
|
1320
1332
|
isPending: boolean;
|
|
1321
1333
|
isRefetching: boolean;
|
|
1322
1334
|
refetch: (queryParams?: {
|
|
1323
|
-
query?:
|
|
1335
|
+
query?: better_auth303.SessionQueryParams;
|
|
1324
1336
|
} | undefined) => Promise<void>;
|
|
1325
1337
|
}> & object;
|
|
1326
|
-
activeMember:
|
|
1338
|
+
activeMember: nanostores1.PreinitializedWritableAtom<{
|
|
1327
1339
|
data: {
|
|
1328
1340
|
id: string;
|
|
1329
1341
|
organizationId: string;
|
|
@@ -1331,22 +1343,22 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1331
1343
|
role: string;
|
|
1332
1344
|
createdAt: Date;
|
|
1333
1345
|
} | null;
|
|
1334
|
-
error: null |
|
|
1346
|
+
error: null | _better_fetch_fetch177.BetterFetchError;
|
|
1335
1347
|
isPending: boolean;
|
|
1336
1348
|
isRefetching: boolean;
|
|
1337
1349
|
refetch: (queryParams?: {
|
|
1338
|
-
query?:
|
|
1350
|
+
query?: better_auth303.SessionQueryParams;
|
|
1339
1351
|
} | undefined) => Promise<void>;
|
|
1340
1352
|
}> & object;
|
|
1341
|
-
activeMemberRole:
|
|
1353
|
+
activeMemberRole: nanostores1.PreinitializedWritableAtom<{
|
|
1342
1354
|
data: {
|
|
1343
1355
|
role: string;
|
|
1344
1356
|
} | null;
|
|
1345
|
-
error: null |
|
|
1357
|
+
error: null | _better_fetch_fetch177.BetterFetchError;
|
|
1346
1358
|
isPending: boolean;
|
|
1347
1359
|
isRefetching: boolean;
|
|
1348
1360
|
refetch: (queryParams?: {
|
|
1349
|
-
query?:
|
|
1361
|
+
query?: better_auth303.SessionQueryParams;
|
|
1350
1362
|
} | undefined) => Promise<void>;
|
|
1351
1363
|
}> & object;
|
|
1352
1364
|
};
|
|
@@ -1374,11 +1386,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1374
1386
|
id: "email-otp";
|
|
1375
1387
|
$InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp0.EmailOTPOptions) => {
|
|
1376
1388
|
id: "email-otp";
|
|
1377
|
-
init(ctx:
|
|
1389
|
+
init(ctx: better_auth303.AuthContext): {
|
|
1378
1390
|
options: {
|
|
1379
1391
|
emailVerification: {
|
|
1380
1392
|
sendVerificationEmail(data: {
|
|
1381
|
-
user:
|
|
1393
|
+
user: better_auth303.User;
|
|
1382
1394
|
url: string;
|
|
1383
1395
|
token: string;
|
|
1384
1396
|
}, request: Request | undefined): Promise<void>;
|
|
@@ -1395,7 +1407,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1395
1407
|
"email-verification": "email-verification";
|
|
1396
1408
|
"forget-password": "forget-password";
|
|
1397
1409
|
}>;
|
|
1398
|
-
},
|
|
1410
|
+
}, better_auth303.$strip>;
|
|
1399
1411
|
metadata: {
|
|
1400
1412
|
openapi: {
|
|
1401
1413
|
operationId: string;
|
|
@@ -1433,7 +1445,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1433
1445
|
"email-verification": "email-verification";
|
|
1434
1446
|
"forget-password": "forget-password";
|
|
1435
1447
|
}>;
|
|
1436
|
-
},
|
|
1448
|
+
}, better_auth303.$strip>;
|
|
1437
1449
|
metadata: {
|
|
1438
1450
|
SERVER_ONLY: true;
|
|
1439
1451
|
openapi: {
|
|
@@ -1465,7 +1477,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1465
1477
|
"email-verification": "email-verification";
|
|
1466
1478
|
"forget-password": "forget-password";
|
|
1467
1479
|
}>;
|
|
1468
|
-
},
|
|
1480
|
+
}, better_auth303.$strip>;
|
|
1469
1481
|
metadata: {
|
|
1470
1482
|
SERVER_ONLY: true;
|
|
1471
1483
|
openapi: {
|
|
@@ -1510,7 +1522,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1510
1522
|
"forget-password": "forget-password";
|
|
1511
1523
|
}>;
|
|
1512
1524
|
otp: zod0.ZodString;
|
|
1513
|
-
},
|
|
1525
|
+
}, better_auth303.$strip>;
|
|
1514
1526
|
metadata: {
|
|
1515
1527
|
openapi: {
|
|
1516
1528
|
operationId: string;
|
|
@@ -1544,7 +1556,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1544
1556
|
body: zod0.ZodObject<{
|
|
1545
1557
|
email: zod0.ZodString;
|
|
1546
1558
|
otp: zod0.ZodString;
|
|
1547
|
-
},
|
|
1559
|
+
}, better_auth303.$strip>;
|
|
1548
1560
|
metadata: {
|
|
1549
1561
|
openapi: {
|
|
1550
1562
|
description: string;
|
|
@@ -1610,7 +1622,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1610
1622
|
body: zod0.ZodObject<{
|
|
1611
1623
|
email: zod0.ZodString;
|
|
1612
1624
|
otp: zod0.ZodString;
|
|
1613
|
-
},
|
|
1625
|
+
}, better_auth303.$strip>;
|
|
1614
1626
|
metadata: {
|
|
1615
1627
|
openapi: {
|
|
1616
1628
|
operationId: string;
|
|
@@ -1657,7 +1669,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1657
1669
|
method: "POST";
|
|
1658
1670
|
body: zod0.ZodObject<{
|
|
1659
1671
|
email: zod0.ZodString;
|
|
1660
|
-
},
|
|
1672
|
+
}, better_auth303.$strip>;
|
|
1661
1673
|
metadata: {
|
|
1662
1674
|
openapi: {
|
|
1663
1675
|
operationId: string;
|
|
@@ -1693,7 +1705,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1693
1705
|
email: zod0.ZodString;
|
|
1694
1706
|
otp: zod0.ZodString;
|
|
1695
1707
|
password: zod0.ZodString;
|
|
1696
|
-
},
|
|
1708
|
+
}, better_auth303.$strip>;
|
|
1697
1709
|
metadata: {
|
|
1698
1710
|
openapi: {
|
|
1699
1711
|
operationId: string;
|
|
@@ -1725,7 +1737,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1725
1737
|
};
|
|
1726
1738
|
hooks: {
|
|
1727
1739
|
after: {
|
|
1728
|
-
matcher(context:
|
|
1740
|
+
matcher(context: better_auth303.HookEndpointContext): boolean;
|
|
1729
1741
|
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
|
|
1730
1742
|
}[];
|
|
1731
1743
|
};
|
|
@@ -1770,11 +1782,7 @@ declare abstract class NeonAuthAdapterCore {
|
|
|
1770
1782
|
* See CLAUDE.md for architecture details and API mappings.
|
|
1771
1783
|
*/
|
|
1772
1784
|
constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
|
|
1773
|
-
abstract getBetterAuthInstance():
|
|
1774
|
-
plugins: SupportedBetterAuthClientPlugins;
|
|
1775
|
-
}> | typeof createAuthClient<{
|
|
1776
|
-
plugins: SupportedBetterAuthClientPlugins;
|
|
1777
|
-
}>>;
|
|
1785
|
+
abstract getBetterAuthInstance(): BetterAuthInstance;
|
|
1778
1786
|
/**
|
|
1779
1787
|
* Get JWT token for authenticated or anonymous access.
|
|
1780
1788
|
* Single source of truth for token retrieval logic.
|
|
@@ -1785,4 +1793,4 @@ declare abstract class NeonAuthAdapterCore {
|
|
|
1785
1793
|
getJWTToken(allowAnonymous: boolean): Promise<string | null>;
|
|
1786
1794
|
}
|
|
1787
1795
|
//#endregion
|
|
1788
|
-
export { NeonAuthAdapterCoreAuthOptions as n, SupportedBetterAuthClientPlugins as r, NeonAuthAdapterCore as t };
|
|
1796
|
+
export { TeamInput as C, UserWithRole as E, Team as S, TeamMemberInput as T, MemberInput as _, BetterAuthInstance as a, OrganizationRole as b, InferAdminRolesFromOption as c, InvitationStatus as d, JWKOptions as f, Member as g, JwtOptions as h, AdminOptions as i, 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, Organization as v, TeamMember as w, SessionWithImpersonatedBy as x, OrganizationInput as y };
|