@neondatabase/auth 0.1.0-beta.9 → 0.2.0-beta.1

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.
Files changed (45) hide show
  1. package/README.md +108 -18
  2. package/dist/{adapter-core-Bw9mn_AS.d.mts → adapter-core-CnrOXh1T.d.mts} +246 -280
  3. package/dist/{adapter-core-C_NEMs0b.mjs → adapter-core-CtmnMMJ7.mjs} +392 -67
  4. package/dist/better-auth-react-adapter-DNi5PC5D.d.mts +2170 -0
  5. package/dist/{better-auth-react-adapter-BbM3jLLv.mjs → better-auth-react-adapter-Dv-o6A6O.mjs} +10 -8
  6. package/dist/{chunk-5DLVHPZS-Bxj7snpZ-DoVNlsyk.mjs → chunk-VCZJYX65-CLnrj1o7-D6ZQkcc_.mjs} +13 -3
  7. package/dist/constants-Cupc_bln.mjs +28 -0
  8. package/dist/index.d.mts +4 -98
  9. package/dist/index.mjs +2 -1
  10. package/dist/neon-auth-BEGCfAe6.d.mts +107 -0
  11. package/dist/{neon-auth-DdlToh7_.mjs → neon-auth-Cs2cWh1B.mjs} +7 -4
  12. package/dist/next/index.d.mts +61 -170
  13. package/dist/next/index.mjs +4 -311
  14. package/dist/next/server/index.d.mts +538 -0
  15. package/dist/next/server/index.mjs +1373 -0
  16. package/dist/react/adapters/index.d.mts +4 -4
  17. package/dist/react/adapters/index.mjs +2 -1
  18. package/dist/react/index.d.mts +5 -5
  19. package/dist/react/index.mjs +4 -3
  20. package/dist/react/ui/index.d.mts +1 -1
  21. package/dist/react/ui/index.mjs +2 -2
  22. package/dist/react/ui/server.mjs +1 -1
  23. package/dist/{supabase-adapter-CAqbpOC7.mjs → supabase-adapter-BlcGPyOf.mjs} +28 -45
  24. package/dist/supabase-adapter-DUqw2fw8.d.mts +2258 -0
  25. package/dist/types/index.d.mts +2 -7
  26. package/dist/ui/.safelist.html +3 -0
  27. package/dist/ui/css.css +2 -2
  28. package/dist/ui/tailwind.css +2 -1
  29. package/dist/ui/theme-inline.css +44 -0
  30. package/dist/ui/theme.css +103 -76
  31. package/dist/{ui-aMoA-9nq.mjs → ui-COLWzDsu.mjs} +6024 -3004
  32. package/dist/vanilla/adapters/index.d.mts +3 -3
  33. package/dist/vanilla/adapters/index.mjs +2 -1
  34. package/dist/vanilla/index.d.mts +3 -3
  35. package/dist/vanilla/index.mjs +2 -1
  36. package/llms.txt +330 -0
  37. package/package.json +17 -10
  38. package/dist/better-auth-react-adapter-JoscqoDc.d.mts +0 -722
  39. package/dist/better-auth-types-CE4hLv9E.d.mts +0 -9
  40. package/dist/supabase-adapter-Clxlqg1x.d.mts +0 -127
  41. /package/dist/{adapters-D0mxG3F-.mjs → adapters-B7YKkjaL.mjs} +0 -0
  42. /package/dist/{adapters-Df6Dd3KK.mjs → adapters-CivF9wql.mjs} +0 -0
  43. /package/dist/{index-ClXLQ1fw.d.mts → index-CPnFzULh.d.mts} +0 -0
  44. /package/dist/{index-BXlAjlSt.d.mts → index-CzsGMS7C.d.mts} +0 -0
  45. /package/dist/{index-DCQ5Y2ED.d.mts → index-OEBbnNdr.d.mts} +0 -0
@@ -1,22 +1,59 @@
1
1
  import { createAuthClient } from "better-auth/react";
2
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";
3
+ import { BetterAuthClientOptions, createAuthClient as createAuthClient$1 } from "better-auth/client";
5
4
  import * as jose0 from "jose";
6
- 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";
5
+ import { Session, User } from "better-auth/types";
6
+ import * as better_auth151 from "better-auth";
7
+ import * as _better_fetch_fetch88 from "@better-fetch/fetch";
8
+ import { BetterFetchError, BetterFetchError as BetterFetchError$1 } from "@better-fetch/fetch";
9
+ import * as better_auth_plugins5 from "better-auth/plugins";
10
+ import * as nanostores0 from "nanostores";
10
11
  import * as better_call0 from "better-call";
11
- import * as better_auth_plugins_email_otp0 from "better-auth/plugins/email-otp";
12
+ import { Invitation, InvitationInput, InvitationStatus, Member, MemberInput, Organization, OrganizationInput, OrganizationRole, Team, TeamInput, TeamMember, TeamMemberInput } from "better-auth/plugins/organization";
13
+ import { JWKOptions, JWSAlgorithms, Jwk, JwtOptions } from "better-auth/plugins/jwt";
14
+ import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "better-auth/plugins/admin";
15
+ import { EmailOTPOptions } from "better-auth/plugins/email-otp";
12
16
 
17
+ //#region src/core/better-auth-types.d.ts
18
+ type BetterAuthSession = Session;
19
+ type BetterAuthUser = User;
20
+ type BetterAuthErrorResponse = BetterFetchError;
21
+ //#endregion
22
+ //#region src/types/index.d.ts
23
+ type BetterAuthInstance = ReturnType<typeof createAuthClient$1<{
24
+ plugins: SupportedBetterAuthClientPlugins;
25
+ }> | typeof createAuthClient<{
26
+ plugins: SupportedBetterAuthClientPlugins;
27
+ }>>;
28
+ //#endregion
13
29
  //#region src/core/adapter-core.d.ts
14
30
  interface NeonAuthAdapterCoreAuthOptions extends Omit<BetterAuthClientOptions, 'plugins'> {}
15
31
  declare const supportedBetterAuthClientPlugins: ({
32
+ id: "anonymous-token";
33
+ pathMethods: {
34
+ "/token/anonymous": "GET";
35
+ };
36
+ getActions: ($fetch: _better_fetch_fetch88.BetterFetch) => {
37
+ getAnonymousToken: (fetchOptions?: any) => Promise<{
38
+ data: {
39
+ token: string;
40
+ expires_at: number;
41
+ };
42
+ error: null;
43
+ } | {
44
+ data: null;
45
+ error: {
46
+ message?: string | undefined;
47
+ status: number;
48
+ statusText: string;
49
+ };
50
+ }>;
51
+ };
52
+ } | {
16
53
  id: "better-auth-client";
17
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins5.JwtOptions | undefined) => {
54
+ $InferServerPlugin: ReturnType<(options?: better_auth_plugins5.JwtOptions | undefined) => {
18
55
  id: "jwt";
19
- options: better_auth_client_plugins5.JwtOptions | undefined;
56
+ options: better_auth_plugins5.JwtOptions | undefined;
20
57
  endpoints: {
21
58
  getJwks: better_call0.StrictEndpoint<string, {
22
59
  method: "GET";
@@ -158,14 +195,14 @@ declare const supportedBetterAuthClientPlugins: ({
158
195
  $Infer: {
159
196
  body: {
160
197
  payload: jose0.JWTPayload;
161
- overrideOptions?: better_auth_client_plugins5.JwtOptions | undefined;
198
+ overrideOptions?: better_auth_plugins5.JwtOptions | undefined;
162
199
  };
163
200
  };
164
201
  };
165
- body: zod0.ZodObject<{
166
- payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
167
- overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
168
- }, better_auth206.$strip>;
202
+ body: better_auth151.ZodObject<{
203
+ payload: better_auth151.ZodRecord<better_auth151.ZodString, better_auth151.ZodAny>;
204
+ overrideOptions: better_auth151.ZodOptional<better_auth151.ZodRecord<better_auth151.ZodString, better_auth151.ZodAny>>;
205
+ }, better_auth151.$strip>;
169
206
  } & {
170
207
  use: any[];
171
208
  }, {
@@ -189,10 +226,10 @@ declare const supportedBetterAuthClientPlugins: ({
189
226
  };
190
227
  };
191
228
  };
192
- body: zod0.ZodObject<{
193
- token: zod0.ZodString;
194
- issuer: zod0.ZodOptional<zod0.ZodString>;
195
- }, better_auth206.$strip>;
229
+ body: better_auth151.ZodObject<{
230
+ token: better_auth151.ZodString;
231
+ issuer: better_auth151.ZodOptional<better_auth151.ZodString>;
232
+ }, better_auth151.$strip>;
196
233
  } & {
197
234
  use: any[];
198
235
  }, {
@@ -201,7 +238,7 @@ declare const supportedBetterAuthClientPlugins: ({
201
238
  };
202
239
  hooks: {
203
240
  after: {
204
- matcher(context: better_auth206.HookEndpointContext): boolean;
241
+ matcher(context: better_auth151.HookEndpointContext): boolean;
205
242
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
206
243
  }[];
207
244
  };
@@ -231,7 +268,7 @@ declare const supportedBetterAuthClientPlugins: ({
231
268
  pathMethods: {
232
269
  [x: string]: "GET";
233
270
  };
234
- getActions: ($fetch: _better_fetch_fetch131.BetterFetch) => {
271
+ getActions: ($fetch: _better_fetch_fetch88.BetterFetch) => {
235
272
  jwks: (fetchOptions?: any) => Promise<{
236
273
  data: null;
237
274
  error: {
@@ -286,7 +323,7 @@ declare const supportedBetterAuthClientPlugins: ({
286
323
  token: string;
287
324
  ipAddress?: string | null | undefined;
288
325
  userAgent?: string | null | undefined;
289
- } & Record<string, unknown>, ctx: better_auth206.GenericEndpointContext | null): Promise<void>;
326
+ } & Record<string, unknown>, ctx: better_auth151.GenericEndpointContext | null): Promise<void>;
290
327
  };
291
328
  };
292
329
  };
@@ -294,22 +331,22 @@ declare const supportedBetterAuthClientPlugins: ({
294
331
  };
295
332
  hooks: {
296
333
  after: {
297
- matcher(context: better_auth206.HookEndpointContext): boolean;
298
- handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_client_plugins5.SessionWithImpersonatedBy[] | undefined>;
334
+ matcher(context: better_auth151.HookEndpointContext): boolean;
335
+ handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_plugins5.SessionWithImpersonatedBy[] | undefined>;
299
336
  }[];
300
337
  };
301
338
  endpoints: {
302
339
  setRole: better_call0.StrictEndpoint<"/admin/set-role", {
303
340
  method: "POST";
304
- body: zod0.ZodObject<{
305
- userId: zod0.ZodCoercedString<unknown>;
306
- role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
307
- }, better_auth206.$strip>;
341
+ body: better_auth151.ZodObject<{
342
+ userId: better_auth151.ZodCoercedString<unknown>;
343
+ role: better_auth151.ZodUnion<readonly [better_auth151.ZodString, better_auth151.ZodArray<better_auth151.ZodString>]>;
344
+ }, better_auth151.$strip>;
308
345
  requireHeaders: true;
309
346
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
310
347
  session: {
311
- user: better_auth_client_plugins5.UserWithRole;
312
- session: better_auth206.Session;
348
+ user: better_auth_plugins5.UserWithRole;
349
+ session: better_auth151.Session;
313
350
  };
314
351
  }>)[];
315
352
  metadata: {
@@ -345,17 +382,17 @@ declare const supportedBetterAuthClientPlugins: ({
345
382
  } & {
346
383
  use: any[];
347
384
  }, {
348
- user: better_auth_client_plugins5.UserWithRole;
385
+ user: better_auth_plugins5.UserWithRole;
349
386
  }>;
350
387
  getUser: better_call0.StrictEndpoint<"/admin/get-user", {
351
388
  method: "GET";
352
- query: zod0.ZodObject<{
353
- id: zod0.ZodString;
354
- }, better_auth206.$strip>;
389
+ query: better_auth151.ZodObject<{
390
+ id: better_auth151.ZodString;
391
+ }, better_auth151.$strip>;
355
392
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
356
393
  session: {
357
- user: better_auth_client_plugins5.UserWithRole;
358
- session: better_auth206.Session;
394
+ user: better_auth_plugins5.UserWithRole;
395
+ session: better_auth151.Session;
359
396
  };
360
397
  }>)[];
361
398
  metadata: {
@@ -395,13 +432,13 @@ declare const supportedBetterAuthClientPlugins: ({
395
432
  }>;
396
433
  createUser: better_call0.StrictEndpoint<"/admin/create-user", {
397
434
  method: "POST";
398
- body: zod0.ZodObject<{
399
- email: zod0.ZodString;
400
- password: zod0.ZodString;
401
- name: zod0.ZodString;
402
- role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
403
- data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
404
- }, better_auth206.$strip>;
435
+ body: better_auth151.ZodObject<{
436
+ email: better_auth151.ZodString;
437
+ password: better_auth151.ZodString;
438
+ name: better_auth151.ZodString;
439
+ role: better_auth151.ZodOptional<better_auth151.ZodUnion<readonly [better_auth151.ZodString, better_auth151.ZodArray<better_auth151.ZodString>]>>;
440
+ data: better_auth151.ZodOptional<better_auth151.ZodRecord<better_auth151.ZodString, better_auth151.ZodAny>>;
441
+ }, better_auth151.$strip>;
405
442
  metadata: {
406
443
  openapi: {
407
444
  operationId: string;
@@ -438,18 +475,18 @@ declare const supportedBetterAuthClientPlugins: ({
438
475
  } & {
439
476
  use: any[];
440
477
  }, {
441
- user: better_auth_client_plugins5.UserWithRole;
478
+ user: better_auth_plugins5.UserWithRole;
442
479
  }>;
443
480
  adminUpdateUser: better_call0.StrictEndpoint<"/admin/update-user", {
444
481
  method: "POST";
445
- body: zod0.ZodObject<{
446
- userId: zod0.ZodCoercedString<unknown>;
447
- data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
448
- }, better_auth206.$strip>;
482
+ body: better_auth151.ZodObject<{
483
+ userId: better_auth151.ZodCoercedString<unknown>;
484
+ data: better_auth151.ZodRecord<better_auth151.ZodAny, better_auth151.ZodAny>;
485
+ }, better_auth151.$strip>;
449
486
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
450
487
  session: {
451
- user: better_auth_client_plugins5.UserWithRole;
452
- session: better_auth206.Session;
488
+ user: better_auth_plugins5.UserWithRole;
489
+ session: better_auth151.Session;
453
490
  };
454
491
  }>)[];
455
492
  metadata: {
@@ -478,36 +515,36 @@ declare const supportedBetterAuthClientPlugins: ({
478
515
  };
479
516
  } & {
480
517
  use: any[];
481
- }, better_auth_client_plugins5.UserWithRole>;
518
+ }, better_auth_plugins5.UserWithRole>;
482
519
  listUsers: better_call0.StrictEndpoint<"/admin/list-users", {
483
520
  method: "GET";
484
521
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
485
522
  session: {
486
- user: better_auth_client_plugins5.UserWithRole;
487
- session: better_auth206.Session;
523
+ user: better_auth_plugins5.UserWithRole;
524
+ session: better_auth151.Session;
488
525
  };
489
526
  }>)[];
490
- query: zod0.ZodObject<{
491
- searchValue: zod0.ZodOptional<zod0.ZodString>;
492
- searchField: zod0.ZodOptional<zod0.ZodEnum<{
527
+ query: better_auth151.ZodObject<{
528
+ searchValue: better_auth151.ZodOptional<better_auth151.ZodString>;
529
+ searchField: better_auth151.ZodOptional<better_auth151.ZodEnum<{
493
530
  name: "name";
494
531
  email: "email";
495
532
  }>>;
496
- searchOperator: zod0.ZodOptional<zod0.ZodEnum<{
533
+ searchOperator: better_auth151.ZodOptional<better_auth151.ZodEnum<{
497
534
  contains: "contains";
498
535
  starts_with: "starts_with";
499
536
  ends_with: "ends_with";
500
537
  }>>;
501
- limit: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodString, zod0.ZodNumber]>>;
502
- offset: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodString, zod0.ZodNumber]>>;
503
- sortBy: zod0.ZodOptional<zod0.ZodString>;
504
- sortDirection: zod0.ZodOptional<zod0.ZodEnum<{
538
+ limit: better_auth151.ZodOptional<better_auth151.ZodUnion<[better_auth151.ZodString, better_auth151.ZodNumber]>>;
539
+ offset: better_auth151.ZodOptional<better_auth151.ZodUnion<[better_auth151.ZodString, better_auth151.ZodNumber]>>;
540
+ sortBy: better_auth151.ZodOptional<better_auth151.ZodString>;
541
+ sortDirection: better_auth151.ZodOptional<better_auth151.ZodEnum<{
505
542
  asc: "asc";
506
543
  desc: "desc";
507
544
  }>>;
508
- filterField: zod0.ZodOptional<zod0.ZodString>;
509
- filterValue: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodUnion<[zod0.ZodString, zod0.ZodNumber]>, zod0.ZodBoolean]>>;
510
- filterOperator: zod0.ZodOptional<zod0.ZodEnum<{
545
+ filterField: better_auth151.ZodOptional<better_auth151.ZodString>;
546
+ filterValue: better_auth151.ZodOptional<better_auth151.ZodUnion<[better_auth151.ZodUnion<[better_auth151.ZodString, better_auth151.ZodNumber]>, better_auth151.ZodBoolean]>>;
547
+ filterOperator: better_auth151.ZodOptional<better_auth151.ZodEnum<{
511
548
  eq: "eq";
512
549
  ne: "ne";
513
550
  lt: "lt";
@@ -516,7 +553,7 @@ declare const supportedBetterAuthClientPlugins: ({
516
553
  gte: "gte";
517
554
  contains: "contains";
518
555
  }>>;
519
- }, better_auth206.$strip>;
556
+ }, better_auth151.$strip>;
520
557
  metadata: {
521
558
  openapi: {
522
559
  operationId: string;
@@ -557,7 +594,7 @@ declare const supportedBetterAuthClientPlugins: ({
557
594
  } & {
558
595
  use: any[];
559
596
  }, {
560
- users: better_auth_client_plugins5.UserWithRole[];
597
+ users: better_auth_plugins5.UserWithRole[];
561
598
  total: number;
562
599
  limit: number | undefined;
563
600
  offset: number | undefined;
@@ -569,13 +606,13 @@ declare const supportedBetterAuthClientPlugins: ({
569
606
  method: "POST";
570
607
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
571
608
  session: {
572
- user: better_auth_client_plugins5.UserWithRole;
573
- session: better_auth206.Session;
609
+ user: better_auth_plugins5.UserWithRole;
610
+ session: better_auth151.Session;
574
611
  };
575
612
  }>)[];
576
- body: zod0.ZodObject<{
577
- userId: zod0.ZodCoercedString<unknown>;
578
- }, better_auth206.$strip>;
613
+ body: better_auth151.ZodObject<{
614
+ userId: better_auth151.ZodCoercedString<unknown>;
615
+ }, better_auth151.$strip>;
579
616
  metadata: {
580
617
  openapi: {
581
618
  operationId: string;
@@ -606,17 +643,17 @@ declare const supportedBetterAuthClientPlugins: ({
606
643
  } & {
607
644
  use: any[];
608
645
  }, {
609
- sessions: better_auth_client_plugins5.SessionWithImpersonatedBy[];
646
+ sessions: better_auth_plugins5.SessionWithImpersonatedBy[];
610
647
  }>;
611
648
  unbanUser: better_call0.StrictEndpoint<"/admin/unban-user", {
612
649
  method: "POST";
613
- body: zod0.ZodObject<{
614
- userId: zod0.ZodCoercedString<unknown>;
615
- }, better_auth206.$strip>;
650
+ body: better_auth151.ZodObject<{
651
+ userId: better_auth151.ZodCoercedString<unknown>;
652
+ }, better_auth151.$strip>;
616
653
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
617
654
  session: {
618
- user: better_auth_client_plugins5.UserWithRole;
619
- session: better_auth206.Session;
655
+ user: better_auth_plugins5.UserWithRole;
656
+ session: better_auth151.Session;
620
657
  };
621
658
  }>)[];
622
659
  metadata: {
@@ -658,15 +695,15 @@ declare const supportedBetterAuthClientPlugins: ({
658
695
  }>;
659
696
  banUser: better_call0.StrictEndpoint<"/admin/ban-user", {
660
697
  method: "POST";
661
- body: zod0.ZodObject<{
662
- userId: zod0.ZodCoercedString<unknown>;
663
- banReason: zod0.ZodOptional<zod0.ZodString>;
664
- banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
665
- }, better_auth206.$strip>;
698
+ body: better_auth151.ZodObject<{
699
+ userId: better_auth151.ZodCoercedString<unknown>;
700
+ banReason: better_auth151.ZodOptional<better_auth151.ZodString>;
701
+ banExpiresIn: better_auth151.ZodOptional<better_auth151.ZodNumber>;
702
+ }, better_auth151.$strip>;
666
703
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
667
704
  session: {
668
- user: better_auth_client_plugins5.UserWithRole;
669
- session: better_auth206.Session;
705
+ user: better_auth_plugins5.UserWithRole;
706
+ session: better_auth151.Session;
670
707
  };
671
708
  }>)[];
672
709
  metadata: {
@@ -708,13 +745,13 @@ declare const supportedBetterAuthClientPlugins: ({
708
745
  }>;
709
746
  impersonateUser: better_call0.StrictEndpoint<"/admin/impersonate-user", {
710
747
  method: "POST";
711
- body: zod0.ZodObject<{
712
- userId: zod0.ZodCoercedString<unknown>;
713
- }, better_auth206.$strip>;
748
+ body: better_auth151.ZodObject<{
749
+ userId: better_auth151.ZodCoercedString<unknown>;
750
+ }, better_auth151.$strip>;
714
751
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
715
752
  session: {
716
- user: better_auth_client_plugins5.UserWithRole;
717
- session: better_auth206.Session;
753
+ user: better_auth_plugins5.UserWithRole;
754
+ session: better_auth151.Session;
718
755
  };
719
756
  }>)[];
720
757
  metadata: {
@@ -757,7 +794,7 @@ declare const supportedBetterAuthClientPlugins: ({
757
794
  ipAddress?: string | null | undefined;
758
795
  userAgent?: string | null | undefined;
759
796
  };
760
- user: better_auth_client_plugins5.UserWithRole;
797
+ user: better_auth_plugins5.UserWithRole;
761
798
  }>;
762
799
  stopImpersonating: better_call0.StrictEndpoint<"/admin/stop-impersonating", {
763
800
  method: "POST";
@@ -765,18 +802,18 @@ declare const supportedBetterAuthClientPlugins: ({
765
802
  } & {
766
803
  use: any[];
767
804
  }, {
768
- session: better_auth206.Session & Record<string, any>;
769
- user: better_auth206.User & Record<string, any>;
805
+ session: better_auth151.Session & Record<string, any>;
806
+ user: better_auth151.User & Record<string, any>;
770
807
  }>;
771
808
  revokeUserSession: better_call0.StrictEndpoint<"/admin/revoke-user-session", {
772
809
  method: "POST";
773
- body: zod0.ZodObject<{
774
- sessionToken: zod0.ZodString;
775
- }, better_auth206.$strip>;
810
+ body: better_auth151.ZodObject<{
811
+ sessionToken: better_auth151.ZodString;
812
+ }, better_auth151.$strip>;
776
813
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
777
814
  session: {
778
- user: better_auth_client_plugins5.UserWithRole;
779
- session: better_auth206.Session;
815
+ user: better_auth_plugins5.UserWithRole;
816
+ session: better_auth151.Session;
780
817
  };
781
818
  }>)[];
782
819
  metadata: {
@@ -810,13 +847,13 @@ declare const supportedBetterAuthClientPlugins: ({
810
847
  }>;
811
848
  revokeUserSessions: better_call0.StrictEndpoint<"/admin/revoke-user-sessions", {
812
849
  method: "POST";
813
- body: zod0.ZodObject<{
814
- userId: zod0.ZodCoercedString<unknown>;
815
- }, better_auth206.$strip>;
850
+ body: better_auth151.ZodObject<{
851
+ userId: better_auth151.ZodCoercedString<unknown>;
852
+ }, better_auth151.$strip>;
816
853
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
817
854
  session: {
818
- user: better_auth_client_plugins5.UserWithRole;
819
- session: better_auth206.Session;
855
+ user: better_auth_plugins5.UserWithRole;
856
+ session: better_auth151.Session;
820
857
  };
821
858
  }>)[];
822
859
  metadata: {
@@ -850,13 +887,13 @@ declare const supportedBetterAuthClientPlugins: ({
850
887
  }>;
851
888
  removeUser: better_call0.StrictEndpoint<"/admin/remove-user", {
852
889
  method: "POST";
853
- body: zod0.ZodObject<{
854
- userId: zod0.ZodCoercedString<unknown>;
855
- }, better_auth206.$strip>;
890
+ body: better_auth151.ZodObject<{
891
+ userId: better_auth151.ZodCoercedString<unknown>;
892
+ }, better_auth151.$strip>;
856
893
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
857
894
  session: {
858
- user: better_auth_client_plugins5.UserWithRole;
859
- session: better_auth206.Session;
895
+ user: better_auth_plugins5.UserWithRole;
896
+ session: better_auth151.Session;
860
897
  };
861
898
  }>)[];
862
899
  metadata: {
@@ -890,14 +927,14 @@ declare const supportedBetterAuthClientPlugins: ({
890
927
  }>;
891
928
  setUserPassword: better_call0.StrictEndpoint<"/admin/set-user-password", {
892
929
  method: "POST";
893
- body: zod0.ZodObject<{
894
- newPassword: zod0.ZodString;
895
- userId: zod0.ZodCoercedString<unknown>;
896
- }, better_auth206.$strip>;
930
+ body: better_auth151.ZodObject<{
931
+ newPassword: better_auth151.ZodString;
932
+ userId: better_auth151.ZodCoercedString<unknown>;
933
+ }, better_auth151.$strip>;
897
934
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
898
935
  session: {
899
- user: better_auth_client_plugins5.UserWithRole;
900
- session: better_auth206.Session;
936
+ user: better_auth_plugins5.UserWithRole;
937
+ session: better_auth151.Session;
901
938
  };
902
939
  }>)[];
903
940
  metadata: {
@@ -931,16 +968,16 @@ declare const supportedBetterAuthClientPlugins: ({
931
968
  }>;
932
969
  userHasPermission: better_call0.StrictEndpoint<"/admin/has-permission", {
933
970
  method: "POST";
934
- body: zod0.ZodIntersection<zod0.ZodObject<{
935
- userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
936
- role: zod0.ZodOptional<zod0.ZodString>;
937
- }, better_auth206.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
938
- permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
939
- permissions: zod0.ZodUndefined;
940
- }, better_auth206.$strip>, zod0.ZodObject<{
941
- permission: zod0.ZodUndefined;
942
- permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
943
- }, better_auth206.$strip>]>>;
971
+ body: better_auth151.ZodIntersection<better_auth151.ZodObject<{
972
+ userId: better_auth151.ZodOptional<better_auth151.ZodCoercedString<unknown>>;
973
+ role: better_auth151.ZodOptional<better_auth151.ZodString>;
974
+ }, better_auth151.$strip>, better_auth151.ZodUnion<readonly [better_auth151.ZodObject<{
975
+ permission: better_auth151.ZodRecord<better_auth151.ZodString, better_auth151.ZodArray<better_auth151.ZodString>>;
976
+ permissions: better_auth151.ZodUndefined;
977
+ }, better_auth151.$strip>, better_auth151.ZodObject<{
978
+ permission: better_auth151.ZodUndefined;
979
+ permissions: better_auth151.ZodRecord<better_auth151.ZodString, better_auth151.ZodArray<better_auth151.ZodString>>;
980
+ }, better_auth151.$strip>]>>;
944
981
  metadata: {
945
982
  openapi: {
946
983
  description: string;
@@ -990,14 +1027,14 @@ declare const supportedBetterAuthClientPlugins: ({
990
1027
  $Infer: {
991
1028
  body: ({
992
1029
  permission: {
993
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
994
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1030
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1031
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
995
1032
  };
996
1033
  permissions?: never | undefined;
997
1034
  } | {
998
1035
  permissions: {
999
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1000
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1036
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1037
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1001
1038
  };
1002
1039
  permission?: never | undefined;
1003
1040
  }) & {
@@ -1076,14 +1113,14 @@ declare const supportedBetterAuthClientPlugins: ({
1076
1113
  admin: {
1077
1114
  checkRolePermission: <R extends "user" | "admin">(data: ({
1078
1115
  permission: {
1079
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1080
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1116
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1117
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1081
1118
  };
1082
1119
  permissions?: never | undefined;
1083
1120
  } | {
1084
1121
  permissions: {
1085
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1086
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1122
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1123
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1087
1124
  };
1088
1125
  permission?: never | undefined;
1089
1126
  }) & {
@@ -1116,27 +1153,27 @@ declare const supportedBetterAuthClientPlugins: ({
1116
1153
  schema: {
1117
1154
  organization?: {
1118
1155
  additionalFields?: {
1119
- [key: string]: better_auth206.DBFieldAttribute;
1156
+ [key: string]: better_auth151.DBFieldAttribute;
1120
1157
  };
1121
1158
  };
1122
1159
  member?: {
1123
1160
  additionalFields?: {
1124
- [key: string]: better_auth206.DBFieldAttribute;
1161
+ [key: string]: better_auth151.DBFieldAttribute;
1125
1162
  };
1126
1163
  };
1127
1164
  invitation?: {
1128
1165
  additionalFields?: {
1129
- [key: string]: better_auth206.DBFieldAttribute;
1166
+ [key: string]: better_auth151.DBFieldAttribute;
1130
1167
  };
1131
1168
  };
1132
1169
  team?: {
1133
1170
  additionalFields?: {
1134
- [key: string]: better_auth206.DBFieldAttribute;
1171
+ [key: string]: better_auth151.DBFieldAttribute;
1135
1172
  };
1136
1173
  };
1137
1174
  organizationRole?: {
1138
1175
  additionalFields?: {
1139
- [key: string]: better_auth206.DBFieldAttribute;
1176
+ [key: string]: better_auth151.DBFieldAttribute;
1140
1177
  };
1141
1178
  };
1142
1179
  } | undefined;
@@ -1144,7 +1181,7 @@ declare const supportedBetterAuthClientPlugins: ({
1144
1181
  enabled: false;
1145
1182
  };
1146
1183
  }>;
1147
- getActions: ($fetch: _better_fetch_fetch131.BetterFetch, _$store: better_auth206.ClientStore, co: BetterAuthClientOptions | undefined) => {
1184
+ getActions: ($fetch: _better_fetch_fetch88.BetterFetch, _$store: better_auth151.ClientStore, co: BetterAuthClientOptions | undefined) => {
1148
1185
  $Infer: {
1149
1186
  ActiveOrganization: {
1150
1187
  members: {
@@ -1221,19 +1258,19 @@ declare const supportedBetterAuthClientPlugins: ({
1221
1258
  checkRolePermission: <R extends "admin" | "member" | "owner">(data: ({
1222
1259
  permission: {
1223
1260
  readonly organization?: ("delete" | "update")[] | undefined;
1224
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1225
- readonly invitation?: ("create" | "cancel")[] | undefined;
1226
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1227
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1261
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1262
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1263
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1264
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1228
1265
  };
1229
1266
  permissions?: never | undefined;
1230
1267
  } | {
1231
1268
  permissions: {
1232
1269
  readonly organization?: ("delete" | "update")[] | undefined;
1233
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1234
- readonly invitation?: ("create" | "cancel")[] | undefined;
1235
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1236
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1270
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1271
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1272
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1273
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1237
1274
  };
1238
1275
  permission?: never | undefined;
1239
1276
  }) & {
@@ -1241,13 +1278,13 @@ declare const supportedBetterAuthClientPlugins: ({
1241
1278
  }) => boolean;
1242
1279
  };
1243
1280
  };
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<{
1281
+ getAtoms: ($fetch: _better_fetch_fetch88.BetterFetch) => {
1282
+ $listOrg: nanostores0.PreinitializedWritableAtom<boolean> & object;
1283
+ $activeOrgSignal: nanostores0.PreinitializedWritableAtom<boolean> & object;
1284
+ $activeMemberSignal: nanostores0.PreinitializedWritableAtom<boolean> & object;
1285
+ $activeMemberRoleSignal: nanostores0.PreinitializedWritableAtom<boolean> & object;
1286
+ activeOrganization: nanostores0.PreinitializedWritableAtom<{
1287
+ data: better_auth151.Prettify<{
1251
1288
  id: string;
1252
1289
  name: string;
1253
1290
  slug: string;
@@ -1279,14 +1316,14 @@ declare const supportedBetterAuthClientPlugins: ({
1279
1316
  createdAt: Date;
1280
1317
  }[];
1281
1318
  }> | null;
1282
- error: null | _better_fetch_fetch131.BetterFetchError;
1319
+ error: null | _better_fetch_fetch88.BetterFetchError;
1283
1320
  isPending: boolean;
1284
1321
  isRefetching: boolean;
1285
1322
  refetch: (queryParams?: {
1286
- query?: better_auth206.SessionQueryParams;
1323
+ query?: better_auth151.SessionQueryParams;
1287
1324
  } | undefined) => Promise<void>;
1288
1325
  }> & object;
1289
- listOrganizations: nanostores1.PreinitializedWritableAtom<{
1326
+ listOrganizations: nanostores0.PreinitializedWritableAtom<{
1290
1327
  data: {
1291
1328
  id: string;
1292
1329
  name: string;
@@ -1295,14 +1332,14 @@ declare const supportedBetterAuthClientPlugins: ({
1295
1332
  logo?: string | null | undefined | undefined;
1296
1333
  metadata?: any;
1297
1334
  }[] | null;
1298
- error: null | _better_fetch_fetch131.BetterFetchError;
1335
+ error: null | _better_fetch_fetch88.BetterFetchError;
1299
1336
  isPending: boolean;
1300
1337
  isRefetching: boolean;
1301
1338
  refetch: (queryParams?: {
1302
- query?: better_auth206.SessionQueryParams;
1339
+ query?: better_auth151.SessionQueryParams;
1303
1340
  } | undefined) => Promise<void>;
1304
1341
  }> & object;
1305
- activeMember: nanostores1.PreinitializedWritableAtom<{
1342
+ activeMember: nanostores0.PreinitializedWritableAtom<{
1306
1343
  data: {
1307
1344
  id: string;
1308
1345
  organizationId: string;
@@ -1310,22 +1347,22 @@ declare const supportedBetterAuthClientPlugins: ({
1310
1347
  role: string;
1311
1348
  createdAt: Date;
1312
1349
  } | null;
1313
- error: null | _better_fetch_fetch131.BetterFetchError;
1350
+ error: null | _better_fetch_fetch88.BetterFetchError;
1314
1351
  isPending: boolean;
1315
1352
  isRefetching: boolean;
1316
1353
  refetch: (queryParams?: {
1317
- query?: better_auth206.SessionQueryParams;
1354
+ query?: better_auth151.SessionQueryParams;
1318
1355
  } | undefined) => Promise<void>;
1319
1356
  }> & object;
1320
- activeMemberRole: nanostores1.PreinitializedWritableAtom<{
1357
+ activeMemberRole: nanostores0.PreinitializedWritableAtom<{
1321
1358
  data: {
1322
1359
  role: string;
1323
1360
  } | null;
1324
- error: null | _better_fetch_fetch131.BetterFetchError;
1361
+ error: null | _better_fetch_fetch88.BetterFetchError;
1325
1362
  isPending: boolean;
1326
1363
  isRefetching: boolean;
1327
1364
  refetch: (queryParams?: {
1328
- query?: better_auth206.SessionQueryParams;
1365
+ query?: better_auth151.SessionQueryParams;
1329
1366
  } | undefined) => Promise<void>;
1330
1367
  }> & object;
1331
1368
  };
@@ -1351,13 +1388,13 @@ declare const supportedBetterAuthClientPlugins: ({
1351
1388
  })[];
1352
1389
  } | {
1353
1390
  id: "email-otp";
1354
- $InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp0.EmailOTPOptions) => {
1391
+ $InferServerPlugin: ReturnType<(options: better_auth_plugins5.EmailOTPOptions) => {
1355
1392
  id: "email-otp";
1356
- init(ctx: better_auth206.AuthContext): {
1393
+ init(ctx: better_auth151.AuthContext): {
1357
1394
  options: {
1358
1395
  emailVerification: {
1359
1396
  sendVerificationEmail(data: {
1360
- user: better_auth206.User;
1397
+ user: better_auth151.User;
1361
1398
  url: string;
1362
1399
  token: string;
1363
1400
  }, request: Request | undefined): Promise<void>;
@@ -1367,14 +1404,14 @@ declare const supportedBetterAuthClientPlugins: ({
1367
1404
  endpoints: {
1368
1405
  sendVerificationOTP: better_call0.StrictEndpoint<"/email-otp/send-verification-otp", {
1369
1406
  method: "POST";
1370
- body: zod0.ZodObject<{
1371
- email: zod0.ZodString;
1372
- type: zod0.ZodEnum<{
1407
+ body: better_auth151.ZodObject<{
1408
+ email: better_auth151.ZodString;
1409
+ type: better_auth151.ZodEnum<{
1373
1410
  "sign-in": "sign-in";
1374
1411
  "email-verification": "email-verification";
1375
1412
  "forget-password": "forget-password";
1376
1413
  }>;
1377
- }, better_auth206.$strip>;
1414
+ }, better_auth151.$strip>;
1378
1415
  metadata: {
1379
1416
  openapi: {
1380
1417
  operationId: string;
@@ -1405,14 +1442,14 @@ declare const supportedBetterAuthClientPlugins: ({
1405
1442
  }>;
1406
1443
  createVerificationOTP: better_call0.StrictEndpoint<"/email-otp/create-verification-otp", {
1407
1444
  method: "POST";
1408
- body: zod0.ZodObject<{
1409
- email: zod0.ZodString;
1410
- type: zod0.ZodEnum<{
1445
+ body: better_auth151.ZodObject<{
1446
+ email: better_auth151.ZodString;
1447
+ type: better_auth151.ZodEnum<{
1411
1448
  "sign-in": "sign-in";
1412
1449
  "email-verification": "email-verification";
1413
1450
  "forget-password": "forget-password";
1414
1451
  }>;
1415
- }, better_auth206.$strip>;
1452
+ }, better_auth151.$strip>;
1416
1453
  metadata: {
1417
1454
  SERVER_ONLY: true;
1418
1455
  openapi: {
@@ -1437,14 +1474,14 @@ declare const supportedBetterAuthClientPlugins: ({
1437
1474
  }, string>;
1438
1475
  getVerificationOTP: better_call0.StrictEndpoint<"/email-otp/get-verification-otp", {
1439
1476
  method: "GET";
1440
- query: zod0.ZodObject<{
1441
- email: zod0.ZodString;
1442
- type: zod0.ZodEnum<{
1477
+ query: better_auth151.ZodObject<{
1478
+ email: better_auth151.ZodString;
1479
+ type: better_auth151.ZodEnum<{
1443
1480
  "sign-in": "sign-in";
1444
1481
  "email-verification": "email-verification";
1445
1482
  "forget-password": "forget-password";
1446
1483
  }>;
1447
- }, better_auth206.$strip>;
1484
+ }, better_auth151.$strip>;
1448
1485
  metadata: {
1449
1486
  SERVER_ONLY: true;
1450
1487
  openapi: {
@@ -1481,15 +1518,15 @@ declare const supportedBetterAuthClientPlugins: ({
1481
1518
  }>;
1482
1519
  checkVerificationOTP: better_call0.StrictEndpoint<"/email-otp/check-verification-otp", {
1483
1520
  method: "POST";
1484
- body: zod0.ZodObject<{
1485
- email: zod0.ZodString;
1486
- type: zod0.ZodEnum<{
1521
+ body: better_auth151.ZodObject<{
1522
+ email: better_auth151.ZodString;
1523
+ type: better_auth151.ZodEnum<{
1487
1524
  "sign-in": "sign-in";
1488
1525
  "email-verification": "email-verification";
1489
1526
  "forget-password": "forget-password";
1490
1527
  }>;
1491
- otp: zod0.ZodString;
1492
- }, better_auth206.$strip>;
1528
+ otp: better_auth151.ZodString;
1529
+ }, better_auth151.$strip>;
1493
1530
  metadata: {
1494
1531
  openapi: {
1495
1532
  operationId: string;
@@ -1520,10 +1557,10 @@ declare const supportedBetterAuthClientPlugins: ({
1520
1557
  }>;
1521
1558
  verifyEmailOTP: better_call0.StrictEndpoint<"/email-otp/verify-email", {
1522
1559
  method: "POST";
1523
- body: zod0.ZodObject<{
1524
- email: zod0.ZodString;
1525
- otp: zod0.ZodString;
1526
- }, better_auth206.$strip>;
1560
+ body: better_auth151.ZodObject<{
1561
+ email: better_auth151.ZodString;
1562
+ otp: better_auth151.ZodString;
1563
+ }, better_auth151.$strip>;
1527
1564
  metadata: {
1528
1565
  openapi: {
1529
1566
  description: string;
@@ -1586,10 +1623,10 @@ declare const supportedBetterAuthClientPlugins: ({
1586
1623
  }>;
1587
1624
  signInEmailOTP: better_call0.StrictEndpoint<"/sign-in/email-otp", {
1588
1625
  method: "POST";
1589
- body: zod0.ZodObject<{
1590
- email: zod0.ZodString;
1591
- otp: zod0.ZodString;
1592
- }, better_auth206.$strip>;
1626
+ body: better_auth151.ZodObject<{
1627
+ email: better_auth151.ZodString;
1628
+ otp: better_auth151.ZodString;
1629
+ }, better_auth151.$strip>;
1593
1630
  metadata: {
1594
1631
  openapi: {
1595
1632
  operationId: string;
@@ -1634,9 +1671,9 @@ declare const supportedBetterAuthClientPlugins: ({
1634
1671
  }>;
1635
1672
  forgetPasswordEmailOTP: better_call0.StrictEndpoint<"/forget-password/email-otp", {
1636
1673
  method: "POST";
1637
- body: zod0.ZodObject<{
1638
- email: zod0.ZodString;
1639
- }, better_auth206.$strip>;
1674
+ body: better_auth151.ZodObject<{
1675
+ email: better_auth151.ZodString;
1676
+ }, better_auth151.$strip>;
1640
1677
  metadata: {
1641
1678
  openapi: {
1642
1679
  operationId: string;
@@ -1668,11 +1705,11 @@ declare const supportedBetterAuthClientPlugins: ({
1668
1705
  }>;
1669
1706
  resetPasswordEmailOTP: better_call0.StrictEndpoint<"/email-otp/reset-password", {
1670
1707
  method: "POST";
1671
- body: zod0.ZodObject<{
1672
- email: zod0.ZodString;
1673
- otp: zod0.ZodString;
1674
- password: zod0.ZodString;
1675
- }, better_auth206.$strip>;
1708
+ body: better_auth151.ZodObject<{
1709
+ email: better_auth151.ZodString;
1710
+ otp: better_auth151.ZodString;
1711
+ password: better_auth151.ZodString;
1712
+ }, better_auth151.$strip>;
1676
1713
  metadata: {
1677
1714
  openapi: {
1678
1715
  operationId: string;
@@ -1704,7 +1741,7 @@ declare const supportedBetterAuthClientPlugins: ({
1704
1741
  };
1705
1742
  hooks: {
1706
1743
  after: {
1707
- matcher(context: better_auth206.HookEndpointContext): boolean;
1744
+ matcher(context: better_auth151.HookEndpointContext): boolean;
1708
1745
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1709
1746
  }[];
1710
1747
  };
@@ -1735,84 +1772,6 @@ declare const supportedBetterAuthClientPlugins: ({
1735
1772
  matcher: (path: string) => path is "/email-otp/verify-email" | "/sign-in/email-otp";
1736
1773
  signal: "$sessionSignal";
1737
1774
  }[];
1738
- } | {
1739
- id: "anonymous";
1740
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins5.AnonymousOptions | undefined) => {
1741
- id: "anonymous";
1742
- endpoints: {
1743
- signInAnonymous: better_call0.StrictEndpoint<"/sign-in/anonymous", {
1744
- method: "POST";
1745
- metadata: {
1746
- openapi: {
1747
- description: string;
1748
- responses: {
1749
- 200: {
1750
- description: string;
1751
- content: {
1752
- "application/json": {
1753
- schema: {
1754
- type: "object";
1755
- properties: {
1756
- user: {
1757
- $ref: string;
1758
- };
1759
- session: {
1760
- $ref: string;
1761
- };
1762
- };
1763
- };
1764
- };
1765
- };
1766
- };
1767
- };
1768
- };
1769
- };
1770
- } & {
1771
- use: any[];
1772
- }, {
1773
- token: string;
1774
- user: {
1775
- id: string;
1776
- email: string;
1777
- emailVerified: boolean;
1778
- name: string;
1779
- createdAt: Date;
1780
- updatedAt: Date;
1781
- };
1782
- } | null>;
1783
- };
1784
- hooks: {
1785
- after: {
1786
- matcher(ctx: better_auth206.HookEndpointContext): boolean;
1787
- handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1788
- }[];
1789
- };
1790
- schema: {
1791
- user: {
1792
- fields: {
1793
- isAnonymous: {
1794
- type: "boolean";
1795
- required: false;
1796
- input: false;
1797
- defaultValue: false;
1798
- };
1799
- };
1800
- };
1801
- };
1802
- $ERROR_CODES: {
1803
- readonly INVALID_EMAIL_FORMAT: "Email was not generated in a valid format";
1804
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
1805
- readonly COULD_NOT_CREATE_SESSION: "Could not create session";
1806
- readonly ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: "Anonymous users cannot sign in again anonymously";
1807
- };
1808
- }>;
1809
- pathMethods: {
1810
- "/sign-in/anonymous": "POST";
1811
- };
1812
- atomListeners: {
1813
- matcher: (path: string) => path is "/sign-in/anonymous";
1814
- signal: "$sessionSignal";
1815
- }[];
1816
1775
  })[];
1817
1776
  type SupportedBetterAuthClientPlugins = typeof supportedBetterAuthClientPlugins;
1818
1777
  declare abstract class NeonAuthAdapterCore {
@@ -1827,8 +1786,15 @@ declare abstract class NeonAuthAdapterCore {
1827
1786
  * See CLAUDE.md for architecture details and API mappings.
1828
1787
  */
1829
1788
  constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
1830
- abstract getBetterAuthInstance?(): AuthClient<BetterAuthClientOptions> | ReturnType<typeof createAuthClient>;
1831
- abstract getJWTToken(): Promise<string | null>;
1789
+ abstract getBetterAuthInstance(): BetterAuthInstance;
1790
+ /**
1791
+ * Get JWT token for authenticated or anonymous access.
1792
+ * Single source of truth for token retrieval logic.
1793
+ *
1794
+ * @param allowAnonymous - When true, fetches anonymous token if no session exists
1795
+ * @returns JWT token string or null if unavailable
1796
+ */
1797
+ getJWTToken(allowAnonymous: boolean): Promise<string | null>;
1832
1798
  }
1833
1799
  //#endregion
1834
- export { NeonAuthAdapterCoreAuthOptions as n, SupportedBetterAuthClientPlugins as r, NeonAuthAdapterCore as t };
1800
+ export { TeamInput as C, BetterAuthErrorResponse as D, UserWithRole as E, BetterAuthSession as O, 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, BetterAuthUser 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, Organization as v, TeamMember as w, SessionWithImpersonatedBy as x, OrganizationInput as y };