@neondatabase/auth 0.1.0-beta.5 → 0.1.0-beta.7

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 (38) hide show
  1. package/README.md +8 -8
  2. package/dist/{adapter-core-C12KoaiU.d.mts → adapter-core-Bw9mn_AS.d.mts} +95 -508
  3. package/dist/{adapter-core-BDOw-gBC.mjs → adapter-core-C_NEMs0b.mjs} +2 -4
  4. package/dist/{better-auth-react-adapter-FnBHa2nr.mjs → better-auth-react-adapter-BbM3jLLv.mjs} +1 -1
  5. package/dist/{better-auth-react-adapter-BXL48HIU.d.mts → better-auth-react-adapter-JoscqoDc.d.mts} +88 -88
  6. package/dist/better-auth-types-CE4hLv9E.d.mts +9 -0
  7. package/dist/chunk-5DLVHPZS-Bxj7snpZ-DoVNlsyk.mjs +533 -0
  8. package/dist/index.d.mts +3 -3
  9. package/dist/index.mjs +1 -4
  10. package/dist/{neon-auth-C9XTFffv.mjs → neon-auth-DdlToh7_.mjs} +1 -1
  11. package/dist/next/index.d.mts +18 -187
  12. package/dist/next/index.mjs +2 -4
  13. package/dist/react/adapters/index.d.mts +3 -3
  14. package/dist/react/adapters/index.mjs +1 -3
  15. package/dist/react/index.d.mts +4 -4
  16. package/dist/react/index.mjs +4 -94
  17. package/dist/react/ui/index.d.mts +1 -1
  18. package/dist/react/ui/index.mjs +3 -91
  19. package/dist/react/ui/server.mjs +1 -1
  20. package/dist/{supabase-adapter-ggmqWgPe.mjs → supabase-adapter-CAqbpOC7.mjs} +45 -123
  21. package/dist/{supabase-adapter-crabDnl2.d.mts → supabase-adapter-Clxlqg1x.d.mts} +1 -2
  22. package/dist/types/index.d.mts +8 -0
  23. package/dist/types/index.mjs +3 -0
  24. package/dist/ui/css.css +1 -1
  25. package/dist/ui/tailwind.css +0 -3
  26. package/dist/ui/theme.css +125 -49
  27. package/dist/ui-aMoA-9nq.mjs +9449 -0
  28. package/dist/vanilla/adapters/index.d.mts +3 -3
  29. package/dist/vanilla/adapters/index.mjs +1 -3
  30. package/dist/vanilla/index.d.mts +3 -3
  31. package/dist/vanilla/index.mjs +1 -3
  32. package/package.json +7 -3
  33. package/dist/ui-BQAaHqx4.mjs +0 -386
  34. /package/dist/{adapters-CivF9wql.mjs → adapters-D0mxG3F-.mjs} +0 -0
  35. /package/dist/{adapters-Dkx0zoMR.mjs → adapters-Df6Dd3KK.mjs} +0 -0
  36. /package/dist/{index-DuDD6cIY.d.mts → index-BXlAjlSt.d.mts} +0 -0
  37. /package/dist/{index-C-svZlpj.d.mts → index-ClXLQ1fw.d.mts} +0 -0
  38. /package/dist/{index-UW23fDSn.d.mts → index-DCQ5Y2ED.d.mts} +0 -0
@@ -1,21 +1,22 @@
1
1
  import { createAuthClient } from "better-auth/react";
2
2
  import * as better_auth_client11 from "better-auth/client";
3
3
  import { AuthClient, BetterAuthClientOptions } from "better-auth/client";
4
- import * as better_auth_client_plugins7 from "better-auth/client/plugins";
4
+ import * as better_auth_client_plugins5 from "better-auth/client/plugins";
5
5
  import * as jose0 from "jose";
6
- import * as better_auth220 from "better-auth";
7
- import * as _better_fetch_fetch138 from "@better-fetch/fetch";
6
+ import * as zod0 from "zod";
7
+ import * as better_auth206 from "better-auth";
8
+ import * as _better_fetch_fetch131 from "@better-fetch/fetch";
8
9
  import * as nanostores1 from "nanostores";
9
10
  import * as better_call0 from "better-call";
10
- import * as zod0 from "zod";
11
+ import * as better_auth_plugins_email_otp0 from "better-auth/plugins/email-otp";
11
12
 
12
13
  //#region src/core/adapter-core.d.ts
13
14
  interface NeonAuthAdapterCoreAuthOptions extends Omit<BetterAuthClientOptions, 'plugins'> {}
14
15
  declare const supportedBetterAuthClientPlugins: ({
15
16
  id: "better-auth-client";
16
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins7.JwtOptions | undefined) => {
17
+ $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins5.JwtOptions | undefined) => {
17
18
  id: "jwt";
18
- options: better_auth_client_plugins7.JwtOptions | undefined;
19
+ options: better_auth_client_plugins5.JwtOptions | undefined;
19
20
  endpoints: {
20
21
  getJwks: better_call0.StrictEndpoint<string, {
21
22
  method: "GET";
@@ -157,14 +158,14 @@ declare const supportedBetterAuthClientPlugins: ({
157
158
  $Infer: {
158
159
  body: {
159
160
  payload: jose0.JWTPayload;
160
- overrideOptions?: better_auth_client_plugins7.JwtOptions | undefined;
161
+ overrideOptions?: better_auth_client_plugins5.JwtOptions | undefined;
161
162
  };
162
163
  };
163
164
  };
164
165
  body: zod0.ZodObject<{
165
166
  payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
166
167
  overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
167
- }, better_auth220.$strip>;
168
+ }, better_auth206.$strip>;
168
169
  } & {
169
170
  use: any[];
170
171
  }, {
@@ -191,7 +192,7 @@ declare const supportedBetterAuthClientPlugins: ({
191
192
  body: zod0.ZodObject<{
192
193
  token: zod0.ZodString;
193
194
  issuer: zod0.ZodOptional<zod0.ZodString>;
194
- }, better_auth220.$strip>;
195
+ }, better_auth206.$strip>;
195
196
  } & {
196
197
  use: any[];
197
198
  }, {
@@ -200,7 +201,7 @@ declare const supportedBetterAuthClientPlugins: ({
200
201
  };
201
202
  hooks: {
202
203
  after: {
203
- matcher(context: better_auth220.HookEndpointContext): boolean;
204
+ matcher(context: better_auth206.HookEndpointContext): boolean;
204
205
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
205
206
  }[];
206
207
  };
@@ -230,7 +231,7 @@ declare const supportedBetterAuthClientPlugins: ({
230
231
  pathMethods: {
231
232
  [x: string]: "GET";
232
233
  };
233
- getActions: ($fetch: _better_fetch_fetch138.BetterFetch) => {
234
+ getActions: ($fetch: _better_fetch_fetch131.BetterFetch) => {
234
235
  jwks: (fetchOptions?: any) => Promise<{
235
236
  data: null;
236
237
  error: {
@@ -285,7 +286,7 @@ declare const supportedBetterAuthClientPlugins: ({
285
286
  token: string;
286
287
  ipAddress?: string | null | undefined;
287
288
  userAgent?: string | null | undefined;
288
- } & Record<string, unknown>, ctx: better_auth220.GenericEndpointContext | undefined): Promise<void>;
289
+ } & Record<string, unknown>, ctx: better_auth206.GenericEndpointContext | null): Promise<void>;
289
290
  };
290
291
  };
291
292
  };
@@ -293,8 +294,8 @@ declare const supportedBetterAuthClientPlugins: ({
293
294
  };
294
295
  hooks: {
295
296
  after: {
296
- matcher(context: better_auth220.HookEndpointContext): boolean;
297
- handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_client_plugins7.SessionWithImpersonatedBy[] | undefined>;
297
+ matcher(context: better_auth206.HookEndpointContext): boolean;
298
+ handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_client_plugins5.SessionWithImpersonatedBy[] | undefined>;
298
299
  }[];
299
300
  };
300
301
  endpoints: {
@@ -303,12 +304,12 @@ declare const supportedBetterAuthClientPlugins: ({
303
304
  body: zod0.ZodObject<{
304
305
  userId: zod0.ZodCoercedString<unknown>;
305
306
  role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
306
- }, better_auth220.$strip>;
307
+ }, better_auth206.$strip>;
307
308
  requireHeaders: true;
308
309
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
309
310
  session: {
310
- user: better_auth_client_plugins7.UserWithRole;
311
- session: better_auth220.Session;
311
+ user: better_auth_client_plugins5.UserWithRole;
312
+ session: better_auth206.Session;
312
313
  };
313
314
  }>)[];
314
315
  metadata: {
@@ -344,17 +345,17 @@ declare const supportedBetterAuthClientPlugins: ({
344
345
  } & {
345
346
  use: any[];
346
347
  }, {
347
- user: better_auth_client_plugins7.UserWithRole;
348
+ user: better_auth_client_plugins5.UserWithRole;
348
349
  }>;
349
350
  getUser: better_call0.StrictEndpoint<"/admin/get-user", {
350
351
  method: "GET";
351
352
  query: zod0.ZodObject<{
352
353
  id: zod0.ZodString;
353
- }, better_auth220.$strip>;
354
+ }, better_auth206.$strip>;
354
355
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
355
356
  session: {
356
- user: better_auth_client_plugins7.UserWithRole;
357
- session: better_auth220.Session;
357
+ user: better_auth_client_plugins5.UserWithRole;
358
+ session: better_auth206.Session;
358
359
  };
359
360
  }>)[];
360
361
  metadata: {
@@ -400,7 +401,7 @@ declare const supportedBetterAuthClientPlugins: ({
400
401
  name: zod0.ZodString;
401
402
  role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
402
403
  data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
403
- }, better_auth220.$strip>;
404
+ }, better_auth206.$strip>;
404
405
  metadata: {
405
406
  openapi: {
406
407
  operationId: string;
@@ -437,18 +438,18 @@ declare const supportedBetterAuthClientPlugins: ({
437
438
  } & {
438
439
  use: any[];
439
440
  }, {
440
- user: better_auth_client_plugins7.UserWithRole;
441
+ user: better_auth_client_plugins5.UserWithRole;
441
442
  }>;
442
443
  adminUpdateUser: better_call0.StrictEndpoint<"/admin/update-user", {
443
444
  method: "POST";
444
445
  body: zod0.ZodObject<{
445
446
  userId: zod0.ZodCoercedString<unknown>;
446
447
  data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
447
- }, better_auth220.$strip>;
448
+ }, better_auth206.$strip>;
448
449
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
449
450
  session: {
450
- user: better_auth_client_plugins7.UserWithRole;
451
- session: better_auth220.Session;
451
+ user: better_auth_client_plugins5.UserWithRole;
452
+ session: better_auth206.Session;
452
453
  };
453
454
  }>)[];
454
455
  metadata: {
@@ -477,13 +478,13 @@ declare const supportedBetterAuthClientPlugins: ({
477
478
  };
478
479
  } & {
479
480
  use: any[];
480
- }, better_auth_client_plugins7.UserWithRole>;
481
+ }, better_auth_client_plugins5.UserWithRole>;
481
482
  listUsers: better_call0.StrictEndpoint<"/admin/list-users", {
482
483
  method: "GET";
483
484
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
484
485
  session: {
485
- user: better_auth_client_plugins7.UserWithRole;
486
- session: better_auth220.Session;
486
+ user: better_auth_client_plugins5.UserWithRole;
487
+ session: better_auth206.Session;
487
488
  };
488
489
  }>)[];
489
490
  query: zod0.ZodObject<{
@@ -515,7 +516,7 @@ declare const supportedBetterAuthClientPlugins: ({
515
516
  gte: "gte";
516
517
  contains: "contains";
517
518
  }>>;
518
- }, better_auth220.$strip>;
519
+ }, better_auth206.$strip>;
519
520
  metadata: {
520
521
  openapi: {
521
522
  operationId: string;
@@ -556,7 +557,7 @@ declare const supportedBetterAuthClientPlugins: ({
556
557
  } & {
557
558
  use: any[];
558
559
  }, {
559
- users: better_auth_client_plugins7.UserWithRole[];
560
+ users: better_auth_client_plugins5.UserWithRole[];
560
561
  total: number;
561
562
  limit: number | undefined;
562
563
  offset: number | undefined;
@@ -568,13 +569,13 @@ declare const supportedBetterAuthClientPlugins: ({
568
569
  method: "POST";
569
570
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
570
571
  session: {
571
- user: better_auth_client_plugins7.UserWithRole;
572
- session: better_auth220.Session;
572
+ user: better_auth_client_plugins5.UserWithRole;
573
+ session: better_auth206.Session;
573
574
  };
574
575
  }>)[];
575
576
  body: zod0.ZodObject<{
576
577
  userId: zod0.ZodCoercedString<unknown>;
577
- }, better_auth220.$strip>;
578
+ }, better_auth206.$strip>;
578
579
  metadata: {
579
580
  openapi: {
580
581
  operationId: string;
@@ -605,17 +606,17 @@ declare const supportedBetterAuthClientPlugins: ({
605
606
  } & {
606
607
  use: any[];
607
608
  }, {
608
- sessions: better_auth_client_plugins7.SessionWithImpersonatedBy[];
609
+ sessions: better_auth_client_plugins5.SessionWithImpersonatedBy[];
609
610
  }>;
610
611
  unbanUser: better_call0.StrictEndpoint<"/admin/unban-user", {
611
612
  method: "POST";
612
613
  body: zod0.ZodObject<{
613
614
  userId: zod0.ZodCoercedString<unknown>;
614
- }, better_auth220.$strip>;
615
+ }, better_auth206.$strip>;
615
616
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
616
617
  session: {
617
- user: better_auth_client_plugins7.UserWithRole;
618
- session: better_auth220.Session;
618
+ user: better_auth_client_plugins5.UserWithRole;
619
+ session: better_auth206.Session;
619
620
  };
620
621
  }>)[];
621
622
  metadata: {
@@ -661,11 +662,11 @@ declare const supportedBetterAuthClientPlugins: ({
661
662
  userId: zod0.ZodCoercedString<unknown>;
662
663
  banReason: zod0.ZodOptional<zod0.ZodString>;
663
664
  banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
664
- }, better_auth220.$strip>;
665
+ }, better_auth206.$strip>;
665
666
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
666
667
  session: {
667
- user: better_auth_client_plugins7.UserWithRole;
668
- session: better_auth220.Session;
668
+ user: better_auth_client_plugins5.UserWithRole;
669
+ session: better_auth206.Session;
669
670
  };
670
671
  }>)[];
671
672
  metadata: {
@@ -709,11 +710,11 @@ declare const supportedBetterAuthClientPlugins: ({
709
710
  method: "POST";
710
711
  body: zod0.ZodObject<{
711
712
  userId: zod0.ZodCoercedString<unknown>;
712
- }, better_auth220.$strip>;
713
+ }, better_auth206.$strip>;
713
714
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
714
715
  session: {
715
- user: better_auth_client_plugins7.UserWithRole;
716
- session: better_auth220.Session;
716
+ user: better_auth_client_plugins5.UserWithRole;
717
+ session: better_auth206.Session;
717
718
  };
718
719
  }>)[];
719
720
  metadata: {
@@ -756,15 +757,7 @@ declare const supportedBetterAuthClientPlugins: ({
756
757
  ipAddress?: string | null | undefined;
757
758
  userAgent?: string | null | undefined;
758
759
  };
759
- user: {
760
- id: string;
761
- createdAt: Date;
762
- updatedAt: Date;
763
- email: string;
764
- emailVerified: boolean;
765
- name: string;
766
- image?: string | null | undefined;
767
- };
760
+ user: better_auth_client_plugins5.UserWithRole;
768
761
  }>;
769
762
  stopImpersonating: better_call0.StrictEndpoint<"/admin/stop-impersonating", {
770
763
  method: "POST";
@@ -772,18 +765,18 @@ declare const supportedBetterAuthClientPlugins: ({
772
765
  } & {
773
766
  use: any[];
774
767
  }, {
775
- session: better_auth220.Session & Record<string, any>;
776
- user: better_auth220.User & Record<string, any>;
768
+ session: better_auth206.Session & Record<string, any>;
769
+ user: better_auth206.User & Record<string, any>;
777
770
  }>;
778
771
  revokeUserSession: better_call0.StrictEndpoint<"/admin/revoke-user-session", {
779
772
  method: "POST";
780
773
  body: zod0.ZodObject<{
781
774
  sessionToken: zod0.ZodString;
782
- }, better_auth220.$strip>;
775
+ }, better_auth206.$strip>;
783
776
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
784
777
  session: {
785
- user: better_auth_client_plugins7.UserWithRole;
786
- session: better_auth220.Session;
778
+ user: better_auth_client_plugins5.UserWithRole;
779
+ session: better_auth206.Session;
787
780
  };
788
781
  }>)[];
789
782
  metadata: {
@@ -819,11 +812,11 @@ declare const supportedBetterAuthClientPlugins: ({
819
812
  method: "POST";
820
813
  body: zod0.ZodObject<{
821
814
  userId: zod0.ZodCoercedString<unknown>;
822
- }, better_auth220.$strip>;
815
+ }, better_auth206.$strip>;
823
816
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
824
817
  session: {
825
- user: better_auth_client_plugins7.UserWithRole;
826
- session: better_auth220.Session;
818
+ user: better_auth_client_plugins5.UserWithRole;
819
+ session: better_auth206.Session;
827
820
  };
828
821
  }>)[];
829
822
  metadata: {
@@ -859,11 +852,11 @@ declare const supportedBetterAuthClientPlugins: ({
859
852
  method: "POST";
860
853
  body: zod0.ZodObject<{
861
854
  userId: zod0.ZodCoercedString<unknown>;
862
- }, better_auth220.$strip>;
855
+ }, better_auth206.$strip>;
863
856
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
864
857
  session: {
865
- user: better_auth_client_plugins7.UserWithRole;
866
- session: better_auth220.Session;
858
+ user: better_auth_client_plugins5.UserWithRole;
859
+ session: better_auth206.Session;
867
860
  };
868
861
  }>)[];
869
862
  metadata: {
@@ -900,11 +893,11 @@ declare const supportedBetterAuthClientPlugins: ({
900
893
  body: zod0.ZodObject<{
901
894
  newPassword: zod0.ZodString;
902
895
  userId: zod0.ZodCoercedString<unknown>;
903
- }, better_auth220.$strip>;
896
+ }, better_auth206.$strip>;
904
897
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
905
898
  session: {
906
- user: better_auth_client_plugins7.UserWithRole;
907
- session: better_auth220.Session;
899
+ user: better_auth_client_plugins5.UserWithRole;
900
+ session: better_auth206.Session;
908
901
  };
909
902
  }>)[];
910
903
  metadata: {
@@ -941,13 +934,13 @@ declare const supportedBetterAuthClientPlugins: ({
941
934
  body: zod0.ZodIntersection<zod0.ZodObject<{
942
935
  userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
943
936
  role: zod0.ZodOptional<zod0.ZodString>;
944
- }, better_auth220.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
937
+ }, better_auth206.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
945
938
  permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
946
939
  permissions: zod0.ZodUndefined;
947
- }, better_auth220.$strip>, zod0.ZodObject<{
940
+ }, better_auth206.$strip>, zod0.ZodObject<{
948
941
  permission: zod0.ZodUndefined;
949
942
  permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
950
- }, better_auth220.$strip>]>>;
943
+ }, better_auth206.$strip>]>>;
951
944
  metadata: {
952
945
  openapi: {
953
946
  description: string;
@@ -1040,6 +1033,7 @@ declare const supportedBetterAuthClientPlugins: ({
1040
1033
  readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
1041
1034
  readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
1042
1035
  readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
1036
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
1043
1037
  };
1044
1038
  schema: {
1045
1039
  user: {
@@ -1122,27 +1116,27 @@ declare const supportedBetterAuthClientPlugins: ({
1122
1116
  schema: {
1123
1117
  organization?: {
1124
1118
  additionalFields?: {
1125
- [key: string]: better_auth220.DBFieldAttribute;
1119
+ [key: string]: better_auth206.DBFieldAttribute;
1126
1120
  };
1127
1121
  };
1128
1122
  member?: {
1129
1123
  additionalFields?: {
1130
- [key: string]: better_auth220.DBFieldAttribute;
1124
+ [key: string]: better_auth206.DBFieldAttribute;
1131
1125
  };
1132
1126
  };
1133
1127
  invitation?: {
1134
1128
  additionalFields?: {
1135
- [key: string]: better_auth220.DBFieldAttribute;
1129
+ [key: string]: better_auth206.DBFieldAttribute;
1136
1130
  };
1137
1131
  };
1138
1132
  team?: {
1139
1133
  additionalFields?: {
1140
- [key: string]: better_auth220.DBFieldAttribute;
1134
+ [key: string]: better_auth206.DBFieldAttribute;
1141
1135
  };
1142
1136
  };
1143
1137
  organizationRole?: {
1144
1138
  additionalFields?: {
1145
- [key: string]: better_auth220.DBFieldAttribute;
1139
+ [key: string]: better_auth206.DBFieldAttribute;
1146
1140
  };
1147
1141
  };
1148
1142
  } | undefined;
@@ -1150,7 +1144,7 @@ declare const supportedBetterAuthClientPlugins: ({
1150
1144
  enabled: false;
1151
1145
  };
1152
1146
  }>;
1153
- getActions: ($fetch: _better_fetch_fetch138.BetterFetch, _$store: better_auth220.ClientStore, co: BetterAuthClientOptions | undefined) => {
1147
+ getActions: ($fetch: _better_fetch_fetch131.BetterFetch, _$store: better_auth206.ClientStore, co: BetterAuthClientOptions | undefined) => {
1154
1148
  $Infer: {
1155
1149
  ActiveOrganization: {
1156
1150
  members: {
@@ -1247,13 +1241,13 @@ declare const supportedBetterAuthClientPlugins: ({
1247
1241
  }) => boolean;
1248
1242
  };
1249
1243
  };
1250
- getAtoms: ($fetch: _better_fetch_fetch138.BetterFetch) => {
1244
+ getAtoms: ($fetch: _better_fetch_fetch131.BetterFetch) => {
1251
1245
  $listOrg: nanostores1.PreinitializedWritableAtom<boolean> & object;
1252
1246
  $activeOrgSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1253
1247
  $activeMemberSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1254
1248
  $activeMemberRoleSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1255
1249
  activeOrganization: nanostores1.PreinitializedWritableAtom<{
1256
- data: better_auth220.Prettify<{
1250
+ data: better_auth206.Prettify<{
1257
1251
  id: string;
1258
1252
  name: string;
1259
1253
  slug: string;
@@ -1285,11 +1279,11 @@ declare const supportedBetterAuthClientPlugins: ({
1285
1279
  createdAt: Date;
1286
1280
  }[];
1287
1281
  }> | null;
1288
- error: null | _better_fetch_fetch138.BetterFetchError;
1282
+ error: null | _better_fetch_fetch131.BetterFetchError;
1289
1283
  isPending: boolean;
1290
1284
  isRefetching: boolean;
1291
1285
  refetch: (queryParams?: {
1292
- query?: better_auth220.SessionQueryParams;
1286
+ query?: better_auth206.SessionQueryParams;
1293
1287
  } | undefined) => Promise<void>;
1294
1288
  }> & object;
1295
1289
  listOrganizations: nanostores1.PreinitializedWritableAtom<{
@@ -1301,11 +1295,11 @@ declare const supportedBetterAuthClientPlugins: ({
1301
1295
  logo?: string | null | undefined | undefined;
1302
1296
  metadata?: any;
1303
1297
  }[] | null;
1304
- error: null | _better_fetch_fetch138.BetterFetchError;
1298
+ error: null | _better_fetch_fetch131.BetterFetchError;
1305
1299
  isPending: boolean;
1306
1300
  isRefetching: boolean;
1307
1301
  refetch: (queryParams?: {
1308
- query?: better_auth220.SessionQueryParams;
1302
+ query?: better_auth206.SessionQueryParams;
1309
1303
  } | undefined) => Promise<void>;
1310
1304
  }> & object;
1311
1305
  activeMember: nanostores1.PreinitializedWritableAtom<{
@@ -1316,22 +1310,22 @@ declare const supportedBetterAuthClientPlugins: ({
1316
1310
  role: string;
1317
1311
  createdAt: Date;
1318
1312
  } | null;
1319
- error: null | _better_fetch_fetch138.BetterFetchError;
1313
+ error: null | _better_fetch_fetch131.BetterFetchError;
1320
1314
  isPending: boolean;
1321
1315
  isRefetching: boolean;
1322
1316
  refetch: (queryParams?: {
1323
- query?: better_auth220.SessionQueryParams;
1317
+ query?: better_auth206.SessionQueryParams;
1324
1318
  } | undefined) => Promise<void>;
1325
1319
  }> & object;
1326
1320
  activeMemberRole: nanostores1.PreinitializedWritableAtom<{
1327
1321
  data: {
1328
1322
  role: string;
1329
1323
  } | null;
1330
- error: null | _better_fetch_fetch138.BetterFetchError;
1324
+ error: null | _better_fetch_fetch131.BetterFetchError;
1331
1325
  isPending: boolean;
1332
1326
  isRefetching: boolean;
1333
1327
  refetch: (queryParams?: {
1334
- query?: better_auth220.SessionQueryParams;
1328
+ query?: better_auth206.SessionQueryParams;
1335
1329
  } | undefined) => Promise<void>;
1336
1330
  }> & object;
1337
1331
  };
@@ -1357,13 +1351,13 @@ declare const supportedBetterAuthClientPlugins: ({
1357
1351
  })[];
1358
1352
  } | {
1359
1353
  id: "email-otp";
1360
- $InferServerPlugin: {
1354
+ $InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp0.EmailOTPOptions) => {
1361
1355
  id: "email-otp";
1362
- init(ctx: better_auth220.AuthContext): {
1356
+ init(ctx: better_auth206.AuthContext): {
1363
1357
  options: {
1364
1358
  emailVerification: {
1365
1359
  sendVerificationEmail(data: {
1366
- user: better_auth220.User;
1360
+ user: better_auth206.User;
1367
1361
  url: string;
1368
1362
  token: string;
1369
1363
  }, request: Request | undefined): Promise<void>;
@@ -1380,7 +1374,7 @@ declare const supportedBetterAuthClientPlugins: ({
1380
1374
  "email-verification": "email-verification";
1381
1375
  "forget-password": "forget-password";
1382
1376
  }>;
1383
- }, better_auth220.$strip>;
1377
+ }, better_auth206.$strip>;
1384
1378
  metadata: {
1385
1379
  openapi: {
1386
1380
  operationId: string;
@@ -1418,7 +1412,7 @@ declare const supportedBetterAuthClientPlugins: ({
1418
1412
  "email-verification": "email-verification";
1419
1413
  "forget-password": "forget-password";
1420
1414
  }>;
1421
- }, better_auth220.$strip>;
1415
+ }, better_auth206.$strip>;
1422
1416
  metadata: {
1423
1417
  SERVER_ONLY: true;
1424
1418
  openapi: {
@@ -1450,7 +1444,7 @@ declare const supportedBetterAuthClientPlugins: ({
1450
1444
  "email-verification": "email-verification";
1451
1445
  "forget-password": "forget-password";
1452
1446
  }>;
1453
- }, better_auth220.$strip>;
1447
+ }, better_auth206.$strip>;
1454
1448
  metadata: {
1455
1449
  SERVER_ONLY: true;
1456
1450
  openapi: {
@@ -1495,7 +1489,7 @@ declare const supportedBetterAuthClientPlugins: ({
1495
1489
  "forget-password": "forget-password";
1496
1490
  }>;
1497
1491
  otp: zod0.ZodString;
1498
- }, better_auth220.$strip>;
1492
+ }, better_auth206.$strip>;
1499
1493
  metadata: {
1500
1494
  openapi: {
1501
1495
  operationId: string;
@@ -1529,7 +1523,7 @@ declare const supportedBetterAuthClientPlugins: ({
1529
1523
  body: zod0.ZodObject<{
1530
1524
  email: zod0.ZodString;
1531
1525
  otp: zod0.ZodString;
1532
- }, better_auth220.$strip>;
1526
+ }, better_auth206.$strip>;
1533
1527
  metadata: {
1534
1528
  openapi: {
1535
1529
  description: string;
@@ -1595,7 +1589,7 @@ declare const supportedBetterAuthClientPlugins: ({
1595
1589
  body: zod0.ZodObject<{
1596
1590
  email: zod0.ZodString;
1597
1591
  otp: zod0.ZodString;
1598
- }, better_auth220.$strip>;
1592
+ }, better_auth206.$strip>;
1599
1593
  metadata: {
1600
1594
  openapi: {
1601
1595
  operationId: string;
@@ -1642,7 +1636,7 @@ declare const supportedBetterAuthClientPlugins: ({
1642
1636
  method: "POST";
1643
1637
  body: zod0.ZodObject<{
1644
1638
  email: zod0.ZodString;
1645
- }, better_auth220.$strip>;
1639
+ }, better_auth206.$strip>;
1646
1640
  metadata: {
1647
1641
  openapi: {
1648
1642
  operationId: string;
@@ -1678,7 +1672,7 @@ declare const supportedBetterAuthClientPlugins: ({
1678
1672
  email: zod0.ZodString;
1679
1673
  otp: zod0.ZodString;
1680
1674
  password: zod0.ZodString;
1681
- }, better_auth220.$strip>;
1675
+ }, better_auth206.$strip>;
1682
1676
  metadata: {
1683
1677
  openapi: {
1684
1678
  operationId: string;
@@ -1710,7 +1704,7 @@ declare const supportedBetterAuthClientPlugins: ({
1710
1704
  };
1711
1705
  hooks: {
1712
1706
  after: {
1713
- matcher(context: better_auth220.HookEndpointContext): boolean;
1707
+ matcher(context: better_auth206.HookEndpointContext): boolean;
1714
1708
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1715
1709
  }[];
1716
1710
  };
@@ -1736,14 +1730,14 @@ declare const supportedBetterAuthClientPlugins: ({
1736
1730
  window: number;
1737
1731
  max: number;
1738
1732
  })[];
1739
- };
1733
+ }>;
1740
1734
  atomListeners: {
1741
1735
  matcher: (path: string) => path is "/email-otp/verify-email" | "/sign-in/email-otp";
1742
1736
  signal: "$sessionSignal";
1743
1737
  }[];
1744
1738
  } | {
1745
1739
  id: "anonymous";
1746
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins7.AnonymousOptions | undefined) => {
1740
+ $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins5.AnonymousOptions | undefined) => {
1747
1741
  id: "anonymous";
1748
1742
  endpoints: {
1749
1743
  signInAnonymous: better_call0.StrictEndpoint<"/sign-in/anonymous", {
@@ -1789,7 +1783,7 @@ declare const supportedBetterAuthClientPlugins: ({
1789
1783
  };
1790
1784
  hooks: {
1791
1785
  after: {
1792
- matcher(ctx: better_auth220.HookEndpointContext): boolean;
1786
+ matcher(ctx: better_auth206.HookEndpointContext): boolean;
1793
1787
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1794
1788
  }[];
1795
1789
  };
@@ -1819,413 +1813,6 @@ declare const supportedBetterAuthClientPlugins: ({
1819
1813
  matcher: (path: string) => path is "/sign-in/anonymous";
1820
1814
  signal: "$sessionSignal";
1821
1815
  }[];
1822
- } | {
1823
- id: "phoneNumber";
1824
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins7.PhoneNumberOptions | undefined) => {
1825
- id: "phone-number";
1826
- hooks: {
1827
- before: {
1828
- matcher: (ctx: better_auth220.HookEndpointContext) => boolean;
1829
- handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<never>;
1830
- }[];
1831
- };
1832
- endpoints: {
1833
- signInPhoneNumber: better_call0.StrictEndpoint<"/sign-in/phone-number", {
1834
- method: "POST";
1835
- body: zod0.ZodObject<{
1836
- phoneNumber: zod0.ZodString;
1837
- password: zod0.ZodString;
1838
- rememberMe: zod0.ZodOptional<zod0.ZodBoolean>;
1839
- }, better_auth220.$strip>;
1840
- metadata: {
1841
- openapi: {
1842
- summary: string;
1843
- description: string;
1844
- responses: {
1845
- 200: {
1846
- description: string;
1847
- content: {
1848
- "application/json": {
1849
- schema: {
1850
- type: "object";
1851
- properties: {
1852
- user: {
1853
- $ref: string;
1854
- };
1855
- session: {
1856
- $ref: string;
1857
- };
1858
- };
1859
- };
1860
- };
1861
- };
1862
- };
1863
- 400: {
1864
- description: string;
1865
- };
1866
- };
1867
- };
1868
- };
1869
- } & {
1870
- use: any[];
1871
- }, {
1872
- token: string;
1873
- user: better_auth_client_plugins7.UserWithPhoneNumber;
1874
- }>;
1875
- sendPhoneNumberOTP: better_call0.StrictEndpoint<"/phone-number/send-otp", {
1876
- method: "POST";
1877
- body: zod0.ZodObject<{
1878
- phoneNumber: zod0.ZodString;
1879
- }, better_auth220.$strip>;
1880
- metadata: {
1881
- openapi: {
1882
- summary: string;
1883
- description: string;
1884
- responses: {
1885
- 200: {
1886
- description: string;
1887
- content: {
1888
- "application/json": {
1889
- schema: {
1890
- type: "object";
1891
- properties: {
1892
- message: {
1893
- type: string;
1894
- };
1895
- };
1896
- };
1897
- };
1898
- };
1899
- };
1900
- };
1901
- };
1902
- };
1903
- } & {
1904
- use: any[];
1905
- }, {
1906
- message: string;
1907
- }>;
1908
- verifyPhoneNumber: better_call0.StrictEndpoint<"/phone-number/verify", {
1909
- method: "POST";
1910
- body: zod0.ZodObject<{
1911
- phoneNumber: zod0.ZodString;
1912
- code: zod0.ZodString;
1913
- disableSession: zod0.ZodOptional<zod0.ZodBoolean>;
1914
- updatePhoneNumber: zod0.ZodOptional<zod0.ZodBoolean>;
1915
- }, better_auth220.$strip>;
1916
- metadata: {
1917
- openapi: {
1918
- summary: string;
1919
- description: string;
1920
- responses: {
1921
- "200": {
1922
- description: string;
1923
- content: {
1924
- "application/json": {
1925
- schema: {
1926
- type: "object";
1927
- properties: {
1928
- status: {
1929
- type: string;
1930
- description: string;
1931
- enum: boolean[];
1932
- };
1933
- token: {
1934
- type: string;
1935
- nullable: boolean;
1936
- description: string;
1937
- };
1938
- user: {
1939
- type: string;
1940
- nullable: boolean;
1941
- properties: {
1942
- id: {
1943
- type: string;
1944
- description: string;
1945
- };
1946
- email: {
1947
- type: string;
1948
- format: string;
1949
- nullable: boolean;
1950
- description: string;
1951
- };
1952
- emailVerified: {
1953
- type: string;
1954
- nullable: boolean;
1955
- description: string;
1956
- };
1957
- name: {
1958
- type: string;
1959
- nullable: boolean;
1960
- description: string;
1961
- };
1962
- image: {
1963
- type: string;
1964
- format: string;
1965
- nullable: boolean;
1966
- description: string;
1967
- };
1968
- phoneNumber: {
1969
- type: string;
1970
- description: string;
1971
- };
1972
- phoneNumberVerified: {
1973
- type: string;
1974
- description: string;
1975
- };
1976
- createdAt: {
1977
- type: string;
1978
- format: string;
1979
- description: string;
1980
- };
1981
- updatedAt: {
1982
- type: string;
1983
- format: string;
1984
- description: string;
1985
- };
1986
- };
1987
- required: string[];
1988
- description: string;
1989
- };
1990
- };
1991
- required: string[];
1992
- };
1993
- };
1994
- };
1995
- };
1996
- 400: {
1997
- description: string;
1998
- };
1999
- };
2000
- };
2001
- };
2002
- } & {
2003
- use: any[];
2004
- }, {
2005
- status: boolean;
2006
- token: string;
2007
- user: better_auth_client_plugins7.UserWithPhoneNumber;
2008
- } | {
2009
- status: boolean;
2010
- token: null;
2011
- user: better_auth_client_plugins7.UserWithPhoneNumber;
2012
- }>;
2013
- requestPasswordResetPhoneNumber: better_call0.StrictEndpoint<"/phone-number/request-password-reset", {
2014
- method: "POST";
2015
- body: zod0.ZodObject<{
2016
- phoneNumber: zod0.ZodString;
2017
- }, better_auth220.$strip>;
2018
- metadata: {
2019
- openapi: {
2020
- description: string;
2021
- responses: {
2022
- "200": {
2023
- description: string;
2024
- content: {
2025
- "application/json": {
2026
- schema: {
2027
- type: "object";
2028
- properties: {
2029
- status: {
2030
- type: string;
2031
- description: string;
2032
- enum: boolean[];
2033
- };
2034
- };
2035
- required: string[];
2036
- };
2037
- };
2038
- };
2039
- };
2040
- };
2041
- };
2042
- };
2043
- } & {
2044
- use: any[];
2045
- }, {
2046
- status: boolean;
2047
- }>;
2048
- resetPasswordPhoneNumber: better_call0.StrictEndpoint<"/phone-number/reset-password", {
2049
- method: "POST";
2050
- body: zod0.ZodObject<{
2051
- otp: zod0.ZodString;
2052
- phoneNumber: zod0.ZodString;
2053
- newPassword: zod0.ZodString;
2054
- }, better_auth220.$strip>;
2055
- metadata: {
2056
- openapi: {
2057
- description: string;
2058
- responses: {
2059
- "200": {
2060
- description: string;
2061
- content: {
2062
- "application/json": {
2063
- schema: {
2064
- type: "object";
2065
- properties: {
2066
- status: {
2067
- type: string;
2068
- description: string;
2069
- enum: boolean[];
2070
- };
2071
- };
2072
- required: string[];
2073
- };
2074
- };
2075
- };
2076
- };
2077
- };
2078
- };
2079
- };
2080
- } & {
2081
- use: any[];
2082
- }, {
2083
- status: boolean;
2084
- }>;
2085
- };
2086
- schema: {
2087
- user: {
2088
- fields: {
2089
- phoneNumber: {
2090
- type: "string";
2091
- required: false;
2092
- unique: true;
2093
- sortable: true;
2094
- returned: true;
2095
- };
2096
- phoneNumberVerified: {
2097
- type: "boolean";
2098
- required: false;
2099
- returned: true;
2100
- input: false;
2101
- };
2102
- };
2103
- };
2104
- };
2105
- rateLimit: {
2106
- pathMatcher(path: string): boolean;
2107
- window: number;
2108
- max: number;
2109
- }[];
2110
- $ERROR_CODES: {
2111
- readonly INVALID_PHONE_NUMBER: "Invalid phone number";
2112
- readonly PHONE_NUMBER_EXIST: "Phone number already exists";
2113
- readonly PHONE_NUMBER_NOT_EXIST: "phone number isn't registered";
2114
- readonly INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password";
2115
- readonly UNEXPECTED_ERROR: "Unexpected error";
2116
- readonly OTP_NOT_FOUND: "OTP not found";
2117
- readonly OTP_EXPIRED: "OTP expired";
2118
- readonly INVALID_OTP: "Invalid OTP";
2119
- readonly PHONE_NUMBER_NOT_VERIFIED: "Phone number not verified";
2120
- readonly PHONE_NUMBER_CANNOT_BE_UPDATED: "Phone number cannot be updated";
2121
- readonly SEND_OTP_NOT_IMPLEMENTED: "sendOTP not implemented";
2122
- readonly TOO_MANY_ATTEMPTS: "Too many attempts";
2123
- };
2124
- }>;
2125
- atomListeners: {
2126
- matcher(path: string): path is "/phone-number/verify" | "/sign-in/phone-number" | "/phone-number/update";
2127
- signal: "$sessionSignal";
2128
- }[];
2129
- } | {
2130
- id: "magic-link";
2131
- $InferServerPlugin: {
2132
- id: "magic-link";
2133
- endpoints: {
2134
- signInMagicLink: better_call0.StrictEndpoint<"/sign-in/magic-link", {
2135
- method: "POST";
2136
- requireHeaders: true;
2137
- body: zod0.ZodObject<{
2138
- email: zod0.ZodEmail;
2139
- name: zod0.ZodOptional<zod0.ZodString>;
2140
- callbackURL: zod0.ZodOptional<zod0.ZodString>;
2141
- newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
2142
- errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
2143
- }, better_auth220.$strip>;
2144
- metadata: {
2145
- openapi: {
2146
- operationId: string;
2147
- description: string;
2148
- responses: {
2149
- 200: {
2150
- description: string;
2151
- content: {
2152
- "application/json": {
2153
- schema: {
2154
- type: "object";
2155
- properties: {
2156
- status: {
2157
- type: string;
2158
- };
2159
- };
2160
- };
2161
- };
2162
- };
2163
- };
2164
- };
2165
- };
2166
- };
2167
- } & {
2168
- use: any[];
2169
- }, {
2170
- status: boolean;
2171
- }>;
2172
- magicLinkVerify: better_call0.StrictEndpoint<"/magic-link/verify", {
2173
- method: "GET";
2174
- query: zod0.ZodObject<{
2175
- token: zod0.ZodString;
2176
- callbackURL: zod0.ZodOptional<zod0.ZodString>;
2177
- errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
2178
- newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
2179
- }, better_auth220.$strip>;
2180
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
2181
- requireHeaders: true;
2182
- metadata: {
2183
- openapi: {
2184
- operationId: string;
2185
- description: string;
2186
- responses: {
2187
- 200: {
2188
- description: string;
2189
- content: {
2190
- "application/json": {
2191
- schema: {
2192
- type: "object";
2193
- properties: {
2194
- session: {
2195
- $ref: string;
2196
- };
2197
- user: {
2198
- $ref: string;
2199
- };
2200
- };
2201
- };
2202
- };
2203
- };
2204
- };
2205
- };
2206
- };
2207
- };
2208
- } & {
2209
- use: any[];
2210
- }, {
2211
- token: string;
2212
- user: {
2213
- id: string;
2214
- email: string;
2215
- emailVerified: boolean;
2216
- name: string;
2217
- image: string | null | undefined;
2218
- createdAt: Date;
2219
- updatedAt: Date;
2220
- };
2221
- }>;
2222
- };
2223
- rateLimit: {
2224
- pathMatcher(path: string): boolean;
2225
- window: number;
2226
- max: number;
2227
- }[];
2228
- };
2229
1816
  })[];
2230
1817
  type SupportedBetterAuthClientPlugins = typeof supportedBetterAuthClientPlugins;
2231
1818
  declare abstract class NeonAuthAdapterCore {