@neondatabase/auth 0.1.0-beta.12 → 0.1.0-beta.13

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.
@@ -1,22 +1,43 @@
1
1
  import { createAuthClient } from "better-auth/react";
2
- import * as better_auth_client11 from "better-auth/client";
3
- import { AuthClient, BetterAuthClientOptions } from "better-auth/client";
4
- import * as better_auth_client_plugins5 from "better-auth/client/plugins";
5
- import * as jose0 from "jose";
2
+ import * as better_auth_client35 from "better-auth/client";
3
+ import { BetterAuthClientOptions, createAuthClient as createAuthClient$1 } from "better-auth/client";
4
+ import * as better_auth_client_plugins17 from "better-auth/client/plugins";
6
5
  import * as zod0 from "zod";
7
- import * as better_auth206 from "better-auth";
8
- import * as _better_fetch_fetch131 from "@better-fetch/fetch";
9
- import * as nanostores1 from "nanostores";
6
+ import * as jose2 from "jose";
7
+ import * as better_auth460 from "better-auth";
8
+ import * as _better_fetch_fetch269 from "@better-fetch/fetch";
9
+ import * as nanostores7 from "nanostores";
10
10
  import * as better_call0 from "better-call";
11
11
  import * as better_auth_plugins_email_otp0 from "better-auth/plugins/email-otp";
12
12
 
13
13
  //#region src/core/adapter-core.d.ts
14
14
  interface NeonAuthAdapterCoreAuthOptions extends Omit<BetterAuthClientOptions, 'plugins'> {}
15
15
  declare const supportedBetterAuthClientPlugins: ({
16
+ id: "anonymous-token";
17
+ pathMethods: {
18
+ "/token/anonymous": "GET";
19
+ };
20
+ getActions: ($fetch: _better_fetch_fetch269.BetterFetch) => {
21
+ getAnonymousToken: (fetchOptions?: any) => Promise<{
22
+ data: {
23
+ token: string;
24
+ expires_at: number;
25
+ };
26
+ error: null;
27
+ } | {
28
+ data: null;
29
+ error: {
30
+ message?: string | undefined;
31
+ status: number;
32
+ statusText: string;
33
+ };
34
+ }>;
35
+ };
36
+ } | {
16
37
  id: "better-auth-client";
17
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins5.JwtOptions | undefined) => {
38
+ $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins17.JwtOptions | undefined) => {
18
39
  id: "jwt";
19
- options: better_auth_client_plugins5.JwtOptions | undefined;
40
+ options: better_auth_client_plugins17.JwtOptions | undefined;
20
41
  endpoints: {
21
42
  getJwks: better_call0.StrictEndpoint<string, {
22
43
  method: "GET";
@@ -96,7 +117,7 @@ declare const supportedBetterAuthClientPlugins: ({
96
117
  };
97
118
  } & {
98
119
  use: any[];
99
- }, jose0.JSONWebKeySet>;
120
+ }, jose2.JSONWebKeySet>;
100
121
  getToken: better_call0.StrictEndpoint<"/token", {
101
122
  method: "GET";
102
123
  requireHeaders: true;
@@ -157,15 +178,15 @@ declare const supportedBetterAuthClientPlugins: ({
157
178
  SERVER_ONLY: true;
158
179
  $Infer: {
159
180
  body: {
160
- payload: jose0.JWTPayload;
161
- overrideOptions?: better_auth_client_plugins5.JwtOptions | undefined;
181
+ payload: jose2.JWTPayload;
182
+ overrideOptions?: better_auth_client_plugins17.JwtOptions | undefined;
162
183
  };
163
184
  };
164
185
  };
165
186
  body: zod0.ZodObject<{
166
187
  payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
167
188
  overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
168
- }, better_auth206.$strip>;
189
+ }, better_auth460.$strip>;
169
190
  } & {
170
191
  use: any[];
171
192
  }, {
@@ -192,16 +213,16 @@ declare const supportedBetterAuthClientPlugins: ({
192
213
  body: zod0.ZodObject<{
193
214
  token: zod0.ZodString;
194
215
  issuer: zod0.ZodOptional<zod0.ZodString>;
195
- }, better_auth206.$strip>;
216
+ }, better_auth460.$strip>;
196
217
  } & {
197
218
  use: any[];
198
219
  }, {
199
- payload: (jose0.JWTPayload & Required<Pick<jose0.JWTPayload, "sub" | "aud">>) | null;
220
+ payload: (jose2.JWTPayload & Required<Pick<jose2.JWTPayload, "sub" | "aud">>) | null;
200
221
  }>;
201
222
  };
202
223
  hooks: {
203
224
  after: {
204
- matcher(context: better_auth206.HookEndpointContext): boolean;
225
+ matcher(context: better_auth460.HookEndpointContext): boolean;
205
226
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
206
227
  }[];
207
228
  };
@@ -231,7 +252,7 @@ declare const supportedBetterAuthClientPlugins: ({
231
252
  pathMethods: {
232
253
  [x: string]: "GET";
233
254
  };
234
- getActions: ($fetch: _better_fetch_fetch131.BetterFetch) => {
255
+ getActions: ($fetch: _better_fetch_fetch269.BetterFetch) => {
235
256
  jwks: (fetchOptions?: any) => Promise<{
236
257
  data: null;
237
258
  error: {
@@ -240,7 +261,7 @@ declare const supportedBetterAuthClientPlugins: ({
240
261
  statusText: string;
241
262
  };
242
263
  } | {
243
- data: jose0.JSONWebKeySet;
264
+ data: jose2.JSONWebKeySet;
244
265
  error: null;
245
266
  }>;
246
267
  };
@@ -286,7 +307,7 @@ declare const supportedBetterAuthClientPlugins: ({
286
307
  token: string;
287
308
  ipAddress?: string | null | undefined;
288
309
  userAgent?: string | null | undefined;
289
- } & Record<string, unknown>, ctx: better_auth206.GenericEndpointContext | null): Promise<void>;
310
+ } & Record<string, unknown>, ctx: better_auth460.GenericEndpointContext | null): Promise<void>;
290
311
  };
291
312
  };
292
313
  };
@@ -294,8 +315,8 @@ declare const supportedBetterAuthClientPlugins: ({
294
315
  };
295
316
  hooks: {
296
317
  after: {
297
- matcher(context: better_auth206.HookEndpointContext): boolean;
298
- handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_client_plugins5.SessionWithImpersonatedBy[] | undefined>;
318
+ matcher(context: better_auth460.HookEndpointContext): boolean;
319
+ handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_client_plugins17.SessionWithImpersonatedBy[] | undefined>;
299
320
  }[];
300
321
  };
301
322
  endpoints: {
@@ -304,12 +325,12 @@ declare const supportedBetterAuthClientPlugins: ({
304
325
  body: zod0.ZodObject<{
305
326
  userId: zod0.ZodCoercedString<unknown>;
306
327
  role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
307
- }, better_auth206.$strip>;
328
+ }, better_auth460.$strip>;
308
329
  requireHeaders: true;
309
330
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
310
331
  session: {
311
- user: better_auth_client_plugins5.UserWithRole;
312
- session: better_auth206.Session;
332
+ user: better_auth_client_plugins17.UserWithRole;
333
+ session: better_auth460.Session;
313
334
  };
314
335
  }>)[];
315
336
  metadata: {
@@ -345,17 +366,17 @@ declare const supportedBetterAuthClientPlugins: ({
345
366
  } & {
346
367
  use: any[];
347
368
  }, {
348
- user: better_auth_client_plugins5.UserWithRole;
369
+ user: better_auth_client_plugins17.UserWithRole;
349
370
  }>;
350
371
  getUser: better_call0.StrictEndpoint<"/admin/get-user", {
351
372
  method: "GET";
352
373
  query: zod0.ZodObject<{
353
374
  id: zod0.ZodString;
354
- }, better_auth206.$strip>;
375
+ }, better_auth460.$strip>;
355
376
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
356
377
  session: {
357
- user: better_auth_client_plugins5.UserWithRole;
358
- session: better_auth206.Session;
378
+ user: better_auth_client_plugins17.UserWithRole;
379
+ session: better_auth460.Session;
359
380
  };
360
381
  }>)[];
361
382
  metadata: {
@@ -401,7 +422,7 @@ declare const supportedBetterAuthClientPlugins: ({
401
422
  name: zod0.ZodString;
402
423
  role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
403
424
  data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
404
- }, better_auth206.$strip>;
425
+ }, better_auth460.$strip>;
405
426
  metadata: {
406
427
  openapi: {
407
428
  operationId: string;
@@ -438,18 +459,18 @@ declare const supportedBetterAuthClientPlugins: ({
438
459
  } & {
439
460
  use: any[];
440
461
  }, {
441
- user: better_auth_client_plugins5.UserWithRole;
462
+ user: better_auth_client_plugins17.UserWithRole;
442
463
  }>;
443
464
  adminUpdateUser: better_call0.StrictEndpoint<"/admin/update-user", {
444
465
  method: "POST";
445
466
  body: zod0.ZodObject<{
446
467
  userId: zod0.ZodCoercedString<unknown>;
447
468
  data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
448
- }, better_auth206.$strip>;
469
+ }, better_auth460.$strip>;
449
470
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
450
471
  session: {
451
- user: better_auth_client_plugins5.UserWithRole;
452
- session: better_auth206.Session;
472
+ user: better_auth_client_plugins17.UserWithRole;
473
+ session: better_auth460.Session;
453
474
  };
454
475
  }>)[];
455
476
  metadata: {
@@ -478,13 +499,13 @@ declare const supportedBetterAuthClientPlugins: ({
478
499
  };
479
500
  } & {
480
501
  use: any[];
481
- }, better_auth_client_plugins5.UserWithRole>;
502
+ }, better_auth_client_plugins17.UserWithRole>;
482
503
  listUsers: better_call0.StrictEndpoint<"/admin/list-users", {
483
504
  method: "GET";
484
505
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
485
506
  session: {
486
- user: better_auth_client_plugins5.UserWithRole;
487
- session: better_auth206.Session;
507
+ user: better_auth_client_plugins17.UserWithRole;
508
+ session: better_auth460.Session;
488
509
  };
489
510
  }>)[];
490
511
  query: zod0.ZodObject<{
@@ -516,7 +537,7 @@ declare const supportedBetterAuthClientPlugins: ({
516
537
  gte: "gte";
517
538
  contains: "contains";
518
539
  }>>;
519
- }, better_auth206.$strip>;
540
+ }, better_auth460.$strip>;
520
541
  metadata: {
521
542
  openapi: {
522
543
  operationId: string;
@@ -557,7 +578,7 @@ declare const supportedBetterAuthClientPlugins: ({
557
578
  } & {
558
579
  use: any[];
559
580
  }, {
560
- users: better_auth_client_plugins5.UserWithRole[];
581
+ users: better_auth_client_plugins17.UserWithRole[];
561
582
  total: number;
562
583
  limit: number | undefined;
563
584
  offset: number | undefined;
@@ -569,13 +590,13 @@ declare const supportedBetterAuthClientPlugins: ({
569
590
  method: "POST";
570
591
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
571
592
  session: {
572
- user: better_auth_client_plugins5.UserWithRole;
573
- session: better_auth206.Session;
593
+ user: better_auth_client_plugins17.UserWithRole;
594
+ session: better_auth460.Session;
574
595
  };
575
596
  }>)[];
576
597
  body: zod0.ZodObject<{
577
598
  userId: zod0.ZodCoercedString<unknown>;
578
- }, better_auth206.$strip>;
599
+ }, better_auth460.$strip>;
579
600
  metadata: {
580
601
  openapi: {
581
602
  operationId: string;
@@ -606,17 +627,17 @@ declare const supportedBetterAuthClientPlugins: ({
606
627
  } & {
607
628
  use: any[];
608
629
  }, {
609
- sessions: better_auth_client_plugins5.SessionWithImpersonatedBy[];
630
+ sessions: better_auth_client_plugins17.SessionWithImpersonatedBy[];
610
631
  }>;
611
632
  unbanUser: better_call0.StrictEndpoint<"/admin/unban-user", {
612
633
  method: "POST";
613
634
  body: zod0.ZodObject<{
614
635
  userId: zod0.ZodCoercedString<unknown>;
615
- }, better_auth206.$strip>;
636
+ }, better_auth460.$strip>;
616
637
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
617
638
  session: {
618
- user: better_auth_client_plugins5.UserWithRole;
619
- session: better_auth206.Session;
639
+ user: better_auth_client_plugins17.UserWithRole;
640
+ session: better_auth460.Session;
620
641
  };
621
642
  }>)[];
622
643
  metadata: {
@@ -662,11 +683,11 @@ declare const supportedBetterAuthClientPlugins: ({
662
683
  userId: zod0.ZodCoercedString<unknown>;
663
684
  banReason: zod0.ZodOptional<zod0.ZodString>;
664
685
  banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
665
- }, better_auth206.$strip>;
686
+ }, better_auth460.$strip>;
666
687
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
667
688
  session: {
668
- user: better_auth_client_plugins5.UserWithRole;
669
- session: better_auth206.Session;
689
+ user: better_auth_client_plugins17.UserWithRole;
690
+ session: better_auth460.Session;
670
691
  };
671
692
  }>)[];
672
693
  metadata: {
@@ -710,11 +731,11 @@ declare const supportedBetterAuthClientPlugins: ({
710
731
  method: "POST";
711
732
  body: zod0.ZodObject<{
712
733
  userId: zod0.ZodCoercedString<unknown>;
713
- }, better_auth206.$strip>;
734
+ }, better_auth460.$strip>;
714
735
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
715
736
  session: {
716
- user: better_auth_client_plugins5.UserWithRole;
717
- session: better_auth206.Session;
737
+ user: better_auth_client_plugins17.UserWithRole;
738
+ session: better_auth460.Session;
718
739
  };
719
740
  }>)[];
720
741
  metadata: {
@@ -757,7 +778,7 @@ declare const supportedBetterAuthClientPlugins: ({
757
778
  ipAddress?: string | null | undefined;
758
779
  userAgent?: string | null | undefined;
759
780
  };
760
- user: better_auth_client_plugins5.UserWithRole;
781
+ user: better_auth_client_plugins17.UserWithRole;
761
782
  }>;
762
783
  stopImpersonating: better_call0.StrictEndpoint<"/admin/stop-impersonating", {
763
784
  method: "POST";
@@ -765,18 +786,18 @@ declare const supportedBetterAuthClientPlugins: ({
765
786
  } & {
766
787
  use: any[];
767
788
  }, {
768
- session: better_auth206.Session & Record<string, any>;
769
- user: better_auth206.User & Record<string, any>;
789
+ session: better_auth460.Session & Record<string, any>;
790
+ user: better_auth460.User & Record<string, any>;
770
791
  }>;
771
792
  revokeUserSession: better_call0.StrictEndpoint<"/admin/revoke-user-session", {
772
793
  method: "POST";
773
794
  body: zod0.ZodObject<{
774
795
  sessionToken: zod0.ZodString;
775
- }, better_auth206.$strip>;
796
+ }, better_auth460.$strip>;
776
797
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
777
798
  session: {
778
- user: better_auth_client_plugins5.UserWithRole;
779
- session: better_auth206.Session;
799
+ user: better_auth_client_plugins17.UserWithRole;
800
+ session: better_auth460.Session;
780
801
  };
781
802
  }>)[];
782
803
  metadata: {
@@ -812,11 +833,11 @@ declare const supportedBetterAuthClientPlugins: ({
812
833
  method: "POST";
813
834
  body: zod0.ZodObject<{
814
835
  userId: zod0.ZodCoercedString<unknown>;
815
- }, better_auth206.$strip>;
836
+ }, better_auth460.$strip>;
816
837
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
817
838
  session: {
818
- user: better_auth_client_plugins5.UserWithRole;
819
- session: better_auth206.Session;
839
+ user: better_auth_client_plugins17.UserWithRole;
840
+ session: better_auth460.Session;
820
841
  };
821
842
  }>)[];
822
843
  metadata: {
@@ -852,11 +873,11 @@ declare const supportedBetterAuthClientPlugins: ({
852
873
  method: "POST";
853
874
  body: zod0.ZodObject<{
854
875
  userId: zod0.ZodCoercedString<unknown>;
855
- }, better_auth206.$strip>;
876
+ }, better_auth460.$strip>;
856
877
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
857
878
  session: {
858
- user: better_auth_client_plugins5.UserWithRole;
859
- session: better_auth206.Session;
879
+ user: better_auth_client_plugins17.UserWithRole;
880
+ session: better_auth460.Session;
860
881
  };
861
882
  }>)[];
862
883
  metadata: {
@@ -893,11 +914,11 @@ declare const supportedBetterAuthClientPlugins: ({
893
914
  body: zod0.ZodObject<{
894
915
  newPassword: zod0.ZodString;
895
916
  userId: zod0.ZodCoercedString<unknown>;
896
- }, better_auth206.$strip>;
917
+ }, better_auth460.$strip>;
897
918
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
898
919
  session: {
899
- user: better_auth_client_plugins5.UserWithRole;
900
- session: better_auth206.Session;
920
+ user: better_auth_client_plugins17.UserWithRole;
921
+ session: better_auth460.Session;
901
922
  };
902
923
  }>)[];
903
924
  metadata: {
@@ -934,13 +955,13 @@ declare const supportedBetterAuthClientPlugins: ({
934
955
  body: zod0.ZodIntersection<zod0.ZodObject<{
935
956
  userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
936
957
  role: zod0.ZodOptional<zod0.ZodString>;
937
- }, better_auth206.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
958
+ }, better_auth460.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
938
959
  permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
939
960
  permissions: zod0.ZodUndefined;
940
- }, better_auth206.$strip>, zod0.ZodObject<{
961
+ }, better_auth460.$strip>, zod0.ZodObject<{
941
962
  permission: zod0.ZodUndefined;
942
963
  permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
943
- }, better_auth206.$strip>]>>;
964
+ }, better_auth460.$strip>]>>;
944
965
  metadata: {
945
966
  openapi: {
946
967
  description: string;
@@ -990,14 +1011,14 @@ declare const supportedBetterAuthClientPlugins: ({
990
1011
  $Infer: {
991
1012
  body: ({
992
1013
  permission: {
993
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
994
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1014
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1015
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
995
1016
  };
996
1017
  permissions?: never | undefined;
997
1018
  } | {
998
1019
  permissions: {
999
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1000
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1020
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1021
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1001
1022
  };
1002
1023
  permission?: never | undefined;
1003
1024
  }) & {
@@ -1076,14 +1097,14 @@ declare const supportedBetterAuthClientPlugins: ({
1076
1097
  admin: {
1077
1098
  checkRolePermission: <R extends "user" | "admin">(data: ({
1078
1099
  permission: {
1079
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1080
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1100
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1101
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1081
1102
  };
1082
1103
  permissions?: never | undefined;
1083
1104
  } | {
1084
1105
  permissions: {
1085
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1086
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1106
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1107
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1087
1108
  };
1088
1109
  permission?: never | undefined;
1089
1110
  }) & {
@@ -1097,8 +1118,8 @@ declare const supportedBetterAuthClientPlugins: ({
1097
1118
  };
1098
1119
  } | {
1099
1120
  id: "organization";
1100
- $InferServerPlugin: better_auth_client11.OrganizationPlugin<{
1101
- ac: better_auth_client11.AccessControl<{
1121
+ $InferServerPlugin: better_auth_client35.OrganizationPlugin<{
1122
+ ac: better_auth_client35.AccessControl<{
1102
1123
  readonly organization: readonly ["update", "delete"];
1103
1124
  readonly member: readonly ["create", "update", "delete"];
1104
1125
  readonly invitation: readonly ["create", "cancel"];
@@ -1106,9 +1127,9 @@ declare const supportedBetterAuthClientPlugins: ({
1106
1127
  readonly ac: readonly ["create", "read", "update", "delete"];
1107
1128
  }>;
1108
1129
  roles: {
1109
- admin: better_auth_client11.Role;
1110
- member: better_auth_client11.Role;
1111
- owner: better_auth_client11.Role;
1130
+ admin: better_auth_client35.Role;
1131
+ member: better_auth_client35.Role;
1132
+ owner: better_auth_client35.Role;
1112
1133
  };
1113
1134
  teams: {
1114
1135
  enabled: false;
@@ -1116,27 +1137,27 @@ declare const supportedBetterAuthClientPlugins: ({
1116
1137
  schema: {
1117
1138
  organization?: {
1118
1139
  additionalFields?: {
1119
- [key: string]: better_auth206.DBFieldAttribute;
1140
+ [key: string]: better_auth460.DBFieldAttribute;
1120
1141
  };
1121
1142
  };
1122
1143
  member?: {
1123
1144
  additionalFields?: {
1124
- [key: string]: better_auth206.DBFieldAttribute;
1145
+ [key: string]: better_auth460.DBFieldAttribute;
1125
1146
  };
1126
1147
  };
1127
1148
  invitation?: {
1128
1149
  additionalFields?: {
1129
- [key: string]: better_auth206.DBFieldAttribute;
1150
+ [key: string]: better_auth460.DBFieldAttribute;
1130
1151
  };
1131
1152
  };
1132
1153
  team?: {
1133
1154
  additionalFields?: {
1134
- [key: string]: better_auth206.DBFieldAttribute;
1155
+ [key: string]: better_auth460.DBFieldAttribute;
1135
1156
  };
1136
1157
  };
1137
1158
  organizationRole?: {
1138
1159
  additionalFields?: {
1139
- [key: string]: better_auth206.DBFieldAttribute;
1160
+ [key: string]: better_auth460.DBFieldAttribute;
1140
1161
  };
1141
1162
  };
1142
1163
  } | undefined;
@@ -1144,7 +1165,7 @@ declare const supportedBetterAuthClientPlugins: ({
1144
1165
  enabled: false;
1145
1166
  };
1146
1167
  }>;
1147
- getActions: ($fetch: _better_fetch_fetch131.BetterFetch, _$store: better_auth206.ClientStore, co: BetterAuthClientOptions | undefined) => {
1168
+ getActions: ($fetch: _better_fetch_fetch269.BetterFetch, _$store: better_auth460.ClientStore, co: BetterAuthClientOptions | undefined) => {
1148
1169
  $Infer: {
1149
1170
  ActiveOrganization: {
1150
1171
  members: {
@@ -1165,7 +1186,7 @@ declare const supportedBetterAuthClientPlugins: ({
1165
1186
  organizationId: string;
1166
1187
  email: string;
1167
1188
  role: "admin" | "member" | "owner";
1168
- status: better_auth_client11.InvitationStatus;
1189
+ status: better_auth_client35.InvitationStatus;
1169
1190
  inviterId: string;
1170
1191
  expiresAt: Date;
1171
1192
  createdAt: Date;
@@ -1191,7 +1212,7 @@ declare const supportedBetterAuthClientPlugins: ({
1191
1212
  organizationId: string;
1192
1213
  email: string;
1193
1214
  role: "admin" | "member" | "owner";
1194
- status: better_auth_client11.InvitationStatus;
1215
+ status: better_auth_client35.InvitationStatus;
1195
1216
  inviterId: string;
1196
1217
  expiresAt: Date;
1197
1218
  createdAt: Date;
@@ -1221,19 +1242,19 @@ declare const supportedBetterAuthClientPlugins: ({
1221
1242
  checkRolePermission: <R extends "admin" | "member" | "owner">(data: ({
1222
1243
  permission: {
1223
1244
  readonly organization?: ("delete" | "update")[] | undefined;
1224
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1245
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1225
1246
  readonly invitation?: ("create" | "cancel")[] | undefined;
1226
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1227
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1247
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1248
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1228
1249
  };
1229
1250
  permissions?: never | undefined;
1230
1251
  } | {
1231
1252
  permissions: {
1232
1253
  readonly organization?: ("delete" | "update")[] | undefined;
1233
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1254
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1234
1255
  readonly invitation?: ("create" | "cancel")[] | undefined;
1235
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1236
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1256
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1257
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1237
1258
  };
1238
1259
  permission?: never | undefined;
1239
1260
  }) & {
@@ -1241,13 +1262,13 @@ declare const supportedBetterAuthClientPlugins: ({
1241
1262
  }) => boolean;
1242
1263
  };
1243
1264
  };
1244
- getAtoms: ($fetch: _better_fetch_fetch131.BetterFetch) => {
1245
- $listOrg: nanostores1.PreinitializedWritableAtom<boolean> & object;
1246
- $activeOrgSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1247
- $activeMemberSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1248
- $activeMemberRoleSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1249
- activeOrganization: nanostores1.PreinitializedWritableAtom<{
1250
- data: better_auth206.Prettify<{
1265
+ getAtoms: ($fetch: _better_fetch_fetch269.BetterFetch) => {
1266
+ $listOrg: nanostores7.PreinitializedWritableAtom<boolean> & object;
1267
+ $activeOrgSignal: nanostores7.PreinitializedWritableAtom<boolean> & object;
1268
+ $activeMemberSignal: nanostores7.PreinitializedWritableAtom<boolean> & object;
1269
+ $activeMemberRoleSignal: nanostores7.PreinitializedWritableAtom<boolean> & object;
1270
+ activeOrganization: nanostores7.PreinitializedWritableAtom<{
1271
+ data: better_auth460.Prettify<{
1251
1272
  id: string;
1252
1273
  name: string;
1253
1274
  slug: string;
@@ -1273,20 +1294,20 @@ declare const supportedBetterAuthClientPlugins: ({
1273
1294
  organizationId: string;
1274
1295
  email: string;
1275
1296
  role: "admin" | "member" | "owner";
1276
- status: better_auth_client11.InvitationStatus;
1297
+ status: better_auth_client35.InvitationStatus;
1277
1298
  inviterId: string;
1278
1299
  expiresAt: Date;
1279
1300
  createdAt: Date;
1280
1301
  }[];
1281
1302
  }> | null;
1282
- error: null | _better_fetch_fetch131.BetterFetchError;
1303
+ error: null | _better_fetch_fetch269.BetterFetchError;
1283
1304
  isPending: boolean;
1284
1305
  isRefetching: boolean;
1285
1306
  refetch: (queryParams?: {
1286
- query?: better_auth206.SessionQueryParams;
1307
+ query?: better_auth460.SessionQueryParams;
1287
1308
  } | undefined) => Promise<void>;
1288
1309
  }> & object;
1289
- listOrganizations: nanostores1.PreinitializedWritableAtom<{
1310
+ listOrganizations: nanostores7.PreinitializedWritableAtom<{
1290
1311
  data: {
1291
1312
  id: string;
1292
1313
  name: string;
@@ -1295,14 +1316,14 @@ declare const supportedBetterAuthClientPlugins: ({
1295
1316
  logo?: string | null | undefined | undefined;
1296
1317
  metadata?: any;
1297
1318
  }[] | null;
1298
- error: null | _better_fetch_fetch131.BetterFetchError;
1319
+ error: null | _better_fetch_fetch269.BetterFetchError;
1299
1320
  isPending: boolean;
1300
1321
  isRefetching: boolean;
1301
1322
  refetch: (queryParams?: {
1302
- query?: better_auth206.SessionQueryParams;
1323
+ query?: better_auth460.SessionQueryParams;
1303
1324
  } | undefined) => Promise<void>;
1304
1325
  }> & object;
1305
- activeMember: nanostores1.PreinitializedWritableAtom<{
1326
+ activeMember: nanostores7.PreinitializedWritableAtom<{
1306
1327
  data: {
1307
1328
  id: string;
1308
1329
  organizationId: string;
@@ -1310,22 +1331,22 @@ declare const supportedBetterAuthClientPlugins: ({
1310
1331
  role: string;
1311
1332
  createdAt: Date;
1312
1333
  } | null;
1313
- error: null | _better_fetch_fetch131.BetterFetchError;
1334
+ error: null | _better_fetch_fetch269.BetterFetchError;
1314
1335
  isPending: boolean;
1315
1336
  isRefetching: boolean;
1316
1337
  refetch: (queryParams?: {
1317
- query?: better_auth206.SessionQueryParams;
1338
+ query?: better_auth460.SessionQueryParams;
1318
1339
  } | undefined) => Promise<void>;
1319
1340
  }> & object;
1320
- activeMemberRole: nanostores1.PreinitializedWritableAtom<{
1341
+ activeMemberRole: nanostores7.PreinitializedWritableAtom<{
1321
1342
  data: {
1322
1343
  role: string;
1323
1344
  } | null;
1324
- error: null | _better_fetch_fetch131.BetterFetchError;
1345
+ error: null | _better_fetch_fetch269.BetterFetchError;
1325
1346
  isPending: boolean;
1326
1347
  isRefetching: boolean;
1327
1348
  refetch: (queryParams?: {
1328
- query?: better_auth206.SessionQueryParams;
1349
+ query?: better_auth460.SessionQueryParams;
1329
1350
  } | undefined) => Promise<void>;
1330
1351
  }> & object;
1331
1352
  };
@@ -1353,11 +1374,11 @@ declare const supportedBetterAuthClientPlugins: ({
1353
1374
  id: "email-otp";
1354
1375
  $InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp0.EmailOTPOptions) => {
1355
1376
  id: "email-otp";
1356
- init(ctx: better_auth206.AuthContext): {
1377
+ init(ctx: better_auth460.AuthContext): {
1357
1378
  options: {
1358
1379
  emailVerification: {
1359
1380
  sendVerificationEmail(data: {
1360
- user: better_auth206.User;
1381
+ user: better_auth460.User;
1361
1382
  url: string;
1362
1383
  token: string;
1363
1384
  }, request: Request | undefined): Promise<void>;
@@ -1374,7 +1395,7 @@ declare const supportedBetterAuthClientPlugins: ({
1374
1395
  "email-verification": "email-verification";
1375
1396
  "forget-password": "forget-password";
1376
1397
  }>;
1377
- }, better_auth206.$strip>;
1398
+ }, better_auth460.$strip>;
1378
1399
  metadata: {
1379
1400
  openapi: {
1380
1401
  operationId: string;
@@ -1412,7 +1433,7 @@ declare const supportedBetterAuthClientPlugins: ({
1412
1433
  "email-verification": "email-verification";
1413
1434
  "forget-password": "forget-password";
1414
1435
  }>;
1415
- }, better_auth206.$strip>;
1436
+ }, better_auth460.$strip>;
1416
1437
  metadata: {
1417
1438
  SERVER_ONLY: true;
1418
1439
  openapi: {
@@ -1444,7 +1465,7 @@ declare const supportedBetterAuthClientPlugins: ({
1444
1465
  "email-verification": "email-verification";
1445
1466
  "forget-password": "forget-password";
1446
1467
  }>;
1447
- }, better_auth206.$strip>;
1468
+ }, better_auth460.$strip>;
1448
1469
  metadata: {
1449
1470
  SERVER_ONLY: true;
1450
1471
  openapi: {
@@ -1489,7 +1510,7 @@ declare const supportedBetterAuthClientPlugins: ({
1489
1510
  "forget-password": "forget-password";
1490
1511
  }>;
1491
1512
  otp: zod0.ZodString;
1492
- }, better_auth206.$strip>;
1513
+ }, better_auth460.$strip>;
1493
1514
  metadata: {
1494
1515
  openapi: {
1495
1516
  operationId: string;
@@ -1523,7 +1544,7 @@ declare const supportedBetterAuthClientPlugins: ({
1523
1544
  body: zod0.ZodObject<{
1524
1545
  email: zod0.ZodString;
1525
1546
  otp: zod0.ZodString;
1526
- }, better_auth206.$strip>;
1547
+ }, better_auth460.$strip>;
1527
1548
  metadata: {
1528
1549
  openapi: {
1529
1550
  description: string;
@@ -1589,7 +1610,7 @@ declare const supportedBetterAuthClientPlugins: ({
1589
1610
  body: zod0.ZodObject<{
1590
1611
  email: zod0.ZodString;
1591
1612
  otp: zod0.ZodString;
1592
- }, better_auth206.$strip>;
1613
+ }, better_auth460.$strip>;
1593
1614
  metadata: {
1594
1615
  openapi: {
1595
1616
  operationId: string;
@@ -1636,7 +1657,7 @@ declare const supportedBetterAuthClientPlugins: ({
1636
1657
  method: "POST";
1637
1658
  body: zod0.ZodObject<{
1638
1659
  email: zod0.ZodString;
1639
- }, better_auth206.$strip>;
1660
+ }, better_auth460.$strip>;
1640
1661
  metadata: {
1641
1662
  openapi: {
1642
1663
  operationId: string;
@@ -1672,7 +1693,7 @@ declare const supportedBetterAuthClientPlugins: ({
1672
1693
  email: zod0.ZodString;
1673
1694
  otp: zod0.ZodString;
1674
1695
  password: zod0.ZodString;
1675
- }, better_auth206.$strip>;
1696
+ }, better_auth460.$strip>;
1676
1697
  metadata: {
1677
1698
  openapi: {
1678
1699
  operationId: string;
@@ -1704,7 +1725,7 @@ declare const supportedBetterAuthClientPlugins: ({
1704
1725
  };
1705
1726
  hooks: {
1706
1727
  after: {
1707
- matcher(context: better_auth206.HookEndpointContext): boolean;
1728
+ matcher(context: better_auth460.HookEndpointContext): boolean;
1708
1729
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1709
1730
  }[];
1710
1731
  };
@@ -1737,7 +1758,7 @@ declare const supportedBetterAuthClientPlugins: ({
1737
1758
  }[];
1738
1759
  } | {
1739
1760
  id: "anonymous";
1740
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins5.AnonymousOptions | undefined) => {
1761
+ $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins17.AnonymousOptions | undefined) => {
1741
1762
  id: "anonymous";
1742
1763
  endpoints: {
1743
1764
  signInAnonymous: better_call0.StrictEndpoint<"/sign-in/anonymous", {
@@ -1783,7 +1804,7 @@ declare const supportedBetterAuthClientPlugins: ({
1783
1804
  };
1784
1805
  hooks: {
1785
1806
  after: {
1786
- matcher(ctx: better_auth206.HookEndpointContext): boolean;
1807
+ matcher(ctx: better_auth460.HookEndpointContext): boolean;
1787
1808
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1788
1809
  }[];
1789
1810
  };
@@ -1827,8 +1848,19 @@ declare abstract class NeonAuthAdapterCore {
1827
1848
  * See CLAUDE.md for architecture details and API mappings.
1828
1849
  */
1829
1850
  constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
1830
- abstract getBetterAuthInstance?(): AuthClient<BetterAuthClientOptions> | ReturnType<typeof createAuthClient>;
1831
- abstract getJWTToken(): Promise<string | null>;
1851
+ abstract getBetterAuthInstance(): ReturnType<typeof createAuthClient$1<{
1852
+ plugins: SupportedBetterAuthClientPlugins;
1853
+ }> | typeof createAuthClient<{
1854
+ plugins: SupportedBetterAuthClientPlugins;
1855
+ }>>;
1856
+ /**
1857
+ * Get JWT token for authenticated or anonymous access.
1858
+ * Single source of truth for token retrieval logic.
1859
+ *
1860
+ * @param allowAnonymous - When true, fetches anonymous token if no session exists
1861
+ * @returns JWT token string or null if unavailable
1862
+ */
1863
+ getJWTToken(allowAnonymous: boolean): Promise<string | null>;
1832
1864
  }
1833
1865
  //#endregion
1834
1866
  export { NeonAuthAdapterCoreAuthOptions as n, SupportedBetterAuthClientPlugins as r, NeonAuthAdapterCore as t };