@neondatabase/auth 0.1.0-beta.4 → 0.1.0-beta.6

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 (31) hide show
  1. package/dist/{adapter-core-C12KoaiU.d.mts → adapter-core-CTmuBvuA.d.mts} +92 -498
  2. package/dist/{adapter-core-BDOw-gBC.mjs → adapter-core-FGGtjVtJ.mjs} +2 -4
  3. package/dist/{better-auth-react-adapter-FnBHa2nr.mjs → better-auth-react-adapter-C-jXL6Ba.mjs} +1 -1
  4. package/dist/{better-auth-react-adapter-BXL48HIU.d.mts → better-auth-react-adapter-Dx3CfB7p.d.mts} +88 -88
  5. package/dist/better-auth-types-BSQToNou.d.mts +9 -0
  6. package/dist/index.d.mts +3 -3
  7. package/dist/index.mjs +1 -4
  8. package/dist/{neon-auth-C9XTFffv.mjs → neon-auth-CgnFwwHq.mjs} +1 -1
  9. package/dist/next/index.d.mts +3 -176
  10. package/dist/next/index.mjs +3 -9
  11. package/dist/react/adapters/index.d.mts +3 -3
  12. package/dist/react/adapters/index.mjs +1 -3
  13. package/dist/react/index.d.mts +4 -4
  14. package/dist/react/index.mjs +2 -4
  15. package/dist/react/ui/index.d.mts +1 -1
  16. package/dist/react/ui/index.mjs +1 -1
  17. package/dist/{supabase-adapter-crabDnl2.d.mts → supabase-adapter-CiWRH5H6.d.mts} +1 -2
  18. package/dist/{supabase-adapter-ggmqWgPe.mjs → supabase-adapter-yCWWsIii.mjs} +45 -123
  19. package/dist/types/index.d.mts +8 -0
  20. package/dist/types/index.mjs +3 -0
  21. package/dist/{ui-BQAaHqx4.mjs → ui-DAV9H8gz.mjs} +27 -12
  22. package/dist/vanilla/adapters/index.d.mts +3 -3
  23. package/dist/vanilla/adapters/index.mjs +1 -3
  24. package/dist/vanilla/index.d.mts +3 -3
  25. package/dist/vanilla/index.mjs +1 -3
  26. package/package.json +5 -1
  27. /package/dist/{adapters-CivF9wql.mjs → adapters-C4sibmzW.mjs} +0 -0
  28. /package/dist/{adapters-Dkx0zoMR.mjs → adapters-D7Wxk4MT.mjs} +0 -0
  29. /package/dist/{index-DuDD6cIY.d.mts → index-BFF7W17u.d.mts} +0 -0
  30. /package/dist/{index-C-svZlpj.d.mts → index-BXxhKmeA.d.mts} +0 -0
  31. /package/dist/{index-UW23fDSn.d.mts → index-sBeFMSCP.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_plugins4 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 better_auth206 from "better-auth";
7
+ import * as _better_fetch_fetch131 from "@better-fetch/fetch";
8
8
  import * as nanostores1 from "nanostores";
9
9
  import * as better_call0 from "better-call";
10
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_plugins4.JwtOptions | undefined) => {
17
18
  id: "jwt";
18
- options: better_auth_client_plugins7.JwtOptions | undefined;
19
+ options: better_auth_client_plugins4.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_plugins4.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 | undefined): 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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.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_plugins4.UserWithRole;
717
+ session: better_auth206.Session;
717
718
  };
718
719
  }>)[];
719
720
  metadata: {
@@ -772,18 +773,18 @@ declare const supportedBetterAuthClientPlugins: ({
772
773
  } & {
773
774
  use: any[];
774
775
  }, {
775
- session: better_auth220.Session & Record<string, any>;
776
- user: better_auth220.User & Record<string, any>;
776
+ session: better_auth206.Session & Record<string, any>;
777
+ user: better_auth206.User & Record<string, any>;
777
778
  }>;
778
779
  revokeUserSession: better_call0.StrictEndpoint<"/admin/revoke-user-session", {
779
780
  method: "POST";
780
781
  body: zod0.ZodObject<{
781
782
  sessionToken: zod0.ZodString;
782
- }, better_auth220.$strip>;
783
+ }, better_auth206.$strip>;
783
784
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
784
785
  session: {
785
- user: better_auth_client_plugins7.UserWithRole;
786
- session: better_auth220.Session;
786
+ user: better_auth_client_plugins4.UserWithRole;
787
+ session: better_auth206.Session;
787
788
  };
788
789
  }>)[];
789
790
  metadata: {
@@ -819,11 +820,11 @@ declare const supportedBetterAuthClientPlugins: ({
819
820
  method: "POST";
820
821
  body: zod0.ZodObject<{
821
822
  userId: zod0.ZodCoercedString<unknown>;
822
- }, better_auth220.$strip>;
823
+ }, better_auth206.$strip>;
823
824
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
824
825
  session: {
825
- user: better_auth_client_plugins7.UserWithRole;
826
- session: better_auth220.Session;
826
+ user: better_auth_client_plugins4.UserWithRole;
827
+ session: better_auth206.Session;
827
828
  };
828
829
  }>)[];
829
830
  metadata: {
@@ -859,11 +860,11 @@ declare const supportedBetterAuthClientPlugins: ({
859
860
  method: "POST";
860
861
  body: zod0.ZodObject<{
861
862
  userId: zod0.ZodCoercedString<unknown>;
862
- }, better_auth220.$strip>;
863
+ }, better_auth206.$strip>;
863
864
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
864
865
  session: {
865
- user: better_auth_client_plugins7.UserWithRole;
866
- session: better_auth220.Session;
866
+ user: better_auth_client_plugins4.UserWithRole;
867
+ session: better_auth206.Session;
867
868
  };
868
869
  }>)[];
869
870
  metadata: {
@@ -900,11 +901,11 @@ declare const supportedBetterAuthClientPlugins: ({
900
901
  body: zod0.ZodObject<{
901
902
  newPassword: zod0.ZodString;
902
903
  userId: zod0.ZodCoercedString<unknown>;
903
- }, better_auth220.$strip>;
904
+ }, better_auth206.$strip>;
904
905
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
905
906
  session: {
906
- user: better_auth_client_plugins7.UserWithRole;
907
- session: better_auth220.Session;
907
+ user: better_auth_client_plugins4.UserWithRole;
908
+ session: better_auth206.Session;
908
909
  };
909
910
  }>)[];
910
911
  metadata: {
@@ -941,13 +942,13 @@ declare const supportedBetterAuthClientPlugins: ({
941
942
  body: zod0.ZodIntersection<zod0.ZodObject<{
942
943
  userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
943
944
  role: zod0.ZodOptional<zod0.ZodString>;
944
- }, better_auth220.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
945
+ }, better_auth206.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
945
946
  permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
946
947
  permissions: zod0.ZodUndefined;
947
- }, better_auth220.$strip>, zod0.ZodObject<{
948
+ }, better_auth206.$strip>, zod0.ZodObject<{
948
949
  permission: zod0.ZodUndefined;
949
950
  permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
950
- }, better_auth220.$strip>]>>;
951
+ }, better_auth206.$strip>]>>;
951
952
  metadata: {
952
953
  openapi: {
953
954
  description: string;
@@ -1122,27 +1123,27 @@ declare const supportedBetterAuthClientPlugins: ({
1122
1123
  schema: {
1123
1124
  organization?: {
1124
1125
  additionalFields?: {
1125
- [key: string]: better_auth220.DBFieldAttribute;
1126
+ [key: string]: better_auth206.DBFieldAttribute;
1126
1127
  };
1127
1128
  };
1128
1129
  member?: {
1129
1130
  additionalFields?: {
1130
- [key: string]: better_auth220.DBFieldAttribute;
1131
+ [key: string]: better_auth206.DBFieldAttribute;
1131
1132
  };
1132
1133
  };
1133
1134
  invitation?: {
1134
1135
  additionalFields?: {
1135
- [key: string]: better_auth220.DBFieldAttribute;
1136
+ [key: string]: better_auth206.DBFieldAttribute;
1136
1137
  };
1137
1138
  };
1138
1139
  team?: {
1139
1140
  additionalFields?: {
1140
- [key: string]: better_auth220.DBFieldAttribute;
1141
+ [key: string]: better_auth206.DBFieldAttribute;
1141
1142
  };
1142
1143
  };
1143
1144
  organizationRole?: {
1144
1145
  additionalFields?: {
1145
- [key: string]: better_auth220.DBFieldAttribute;
1146
+ [key: string]: better_auth206.DBFieldAttribute;
1146
1147
  };
1147
1148
  };
1148
1149
  } | undefined;
@@ -1150,7 +1151,7 @@ declare const supportedBetterAuthClientPlugins: ({
1150
1151
  enabled: false;
1151
1152
  };
1152
1153
  }>;
1153
- getActions: ($fetch: _better_fetch_fetch138.BetterFetch, _$store: better_auth220.ClientStore, co: BetterAuthClientOptions | undefined) => {
1154
+ getActions: ($fetch: _better_fetch_fetch131.BetterFetch, _$store: better_auth206.ClientStore, co: BetterAuthClientOptions | undefined) => {
1154
1155
  $Infer: {
1155
1156
  ActiveOrganization: {
1156
1157
  members: {
@@ -1247,13 +1248,13 @@ declare const supportedBetterAuthClientPlugins: ({
1247
1248
  }) => boolean;
1248
1249
  };
1249
1250
  };
1250
- getAtoms: ($fetch: _better_fetch_fetch138.BetterFetch) => {
1251
+ getAtoms: ($fetch: _better_fetch_fetch131.BetterFetch) => {
1251
1252
  $listOrg: nanostores1.PreinitializedWritableAtom<boolean> & object;
1252
1253
  $activeOrgSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1253
1254
  $activeMemberSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1254
1255
  $activeMemberRoleSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
1255
1256
  activeOrganization: nanostores1.PreinitializedWritableAtom<{
1256
- data: better_auth220.Prettify<{
1257
+ data: better_auth206.Prettify<{
1257
1258
  id: string;
1258
1259
  name: string;
1259
1260
  slug: string;
@@ -1285,11 +1286,11 @@ declare const supportedBetterAuthClientPlugins: ({
1285
1286
  createdAt: Date;
1286
1287
  }[];
1287
1288
  }> | null;
1288
- error: null | _better_fetch_fetch138.BetterFetchError;
1289
+ error: null | _better_fetch_fetch131.BetterFetchError;
1289
1290
  isPending: boolean;
1290
1291
  isRefetching: boolean;
1291
1292
  refetch: (queryParams?: {
1292
- query?: better_auth220.SessionQueryParams;
1293
+ query?: better_auth206.SessionQueryParams;
1293
1294
  } | undefined) => Promise<void>;
1294
1295
  }> & object;
1295
1296
  listOrganizations: nanostores1.PreinitializedWritableAtom<{
@@ -1301,11 +1302,11 @@ declare const supportedBetterAuthClientPlugins: ({
1301
1302
  logo?: string | null | undefined | undefined;
1302
1303
  metadata?: any;
1303
1304
  }[] | null;
1304
- error: null | _better_fetch_fetch138.BetterFetchError;
1305
+ error: null | _better_fetch_fetch131.BetterFetchError;
1305
1306
  isPending: boolean;
1306
1307
  isRefetching: boolean;
1307
1308
  refetch: (queryParams?: {
1308
- query?: better_auth220.SessionQueryParams;
1309
+ query?: better_auth206.SessionQueryParams;
1309
1310
  } | undefined) => Promise<void>;
1310
1311
  }> & object;
1311
1312
  activeMember: nanostores1.PreinitializedWritableAtom<{
@@ -1316,22 +1317,22 @@ declare const supportedBetterAuthClientPlugins: ({
1316
1317
  role: string;
1317
1318
  createdAt: Date;
1318
1319
  } | null;
1319
- error: null | _better_fetch_fetch138.BetterFetchError;
1320
+ error: null | _better_fetch_fetch131.BetterFetchError;
1320
1321
  isPending: boolean;
1321
1322
  isRefetching: boolean;
1322
1323
  refetch: (queryParams?: {
1323
- query?: better_auth220.SessionQueryParams;
1324
+ query?: better_auth206.SessionQueryParams;
1324
1325
  } | undefined) => Promise<void>;
1325
1326
  }> & object;
1326
1327
  activeMemberRole: nanostores1.PreinitializedWritableAtom<{
1327
1328
  data: {
1328
1329
  role: string;
1329
1330
  } | null;
1330
- error: null | _better_fetch_fetch138.BetterFetchError;
1331
+ error: null | _better_fetch_fetch131.BetterFetchError;
1331
1332
  isPending: boolean;
1332
1333
  isRefetching: boolean;
1333
1334
  refetch: (queryParams?: {
1334
- query?: better_auth220.SessionQueryParams;
1335
+ query?: better_auth206.SessionQueryParams;
1335
1336
  } | undefined) => Promise<void>;
1336
1337
  }> & object;
1337
1338
  };
@@ -1357,13 +1358,13 @@ declare const supportedBetterAuthClientPlugins: ({
1357
1358
  })[];
1358
1359
  } | {
1359
1360
  id: "email-otp";
1360
- $InferServerPlugin: {
1361
+ $InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp0.EmailOTPOptions) => {
1361
1362
  id: "email-otp";
1362
- init(ctx: better_auth220.AuthContext): {
1363
+ init(ctx: better_auth206.AuthContext): {
1363
1364
  options: {
1364
1365
  emailVerification: {
1365
1366
  sendVerificationEmail(data: {
1366
- user: better_auth220.User;
1367
+ user: better_auth206.User;
1367
1368
  url: string;
1368
1369
  token: string;
1369
1370
  }, request: Request | undefined): Promise<void>;
@@ -1380,7 +1381,7 @@ declare const supportedBetterAuthClientPlugins: ({
1380
1381
  "email-verification": "email-verification";
1381
1382
  "forget-password": "forget-password";
1382
1383
  }>;
1383
- }, better_auth220.$strip>;
1384
+ }, better_auth206.$strip>;
1384
1385
  metadata: {
1385
1386
  openapi: {
1386
1387
  operationId: string;
@@ -1418,7 +1419,7 @@ declare const supportedBetterAuthClientPlugins: ({
1418
1419
  "email-verification": "email-verification";
1419
1420
  "forget-password": "forget-password";
1420
1421
  }>;
1421
- }, better_auth220.$strip>;
1422
+ }, better_auth206.$strip>;
1422
1423
  metadata: {
1423
1424
  SERVER_ONLY: true;
1424
1425
  openapi: {
@@ -1450,7 +1451,7 @@ declare const supportedBetterAuthClientPlugins: ({
1450
1451
  "email-verification": "email-verification";
1451
1452
  "forget-password": "forget-password";
1452
1453
  }>;
1453
- }, better_auth220.$strip>;
1454
+ }, better_auth206.$strip>;
1454
1455
  metadata: {
1455
1456
  SERVER_ONLY: true;
1456
1457
  openapi: {
@@ -1495,7 +1496,7 @@ declare const supportedBetterAuthClientPlugins: ({
1495
1496
  "forget-password": "forget-password";
1496
1497
  }>;
1497
1498
  otp: zod0.ZodString;
1498
- }, better_auth220.$strip>;
1499
+ }, better_auth206.$strip>;
1499
1500
  metadata: {
1500
1501
  openapi: {
1501
1502
  operationId: string;
@@ -1529,7 +1530,7 @@ declare const supportedBetterAuthClientPlugins: ({
1529
1530
  body: zod0.ZodObject<{
1530
1531
  email: zod0.ZodString;
1531
1532
  otp: zod0.ZodString;
1532
- }, better_auth220.$strip>;
1533
+ }, better_auth206.$strip>;
1533
1534
  metadata: {
1534
1535
  openapi: {
1535
1536
  description: string;
@@ -1595,7 +1596,7 @@ declare const supportedBetterAuthClientPlugins: ({
1595
1596
  body: zod0.ZodObject<{
1596
1597
  email: zod0.ZodString;
1597
1598
  otp: zod0.ZodString;
1598
- }, better_auth220.$strip>;
1599
+ }, better_auth206.$strip>;
1599
1600
  metadata: {
1600
1601
  openapi: {
1601
1602
  operationId: string;
@@ -1642,7 +1643,7 @@ declare const supportedBetterAuthClientPlugins: ({
1642
1643
  method: "POST";
1643
1644
  body: zod0.ZodObject<{
1644
1645
  email: zod0.ZodString;
1645
- }, better_auth220.$strip>;
1646
+ }, better_auth206.$strip>;
1646
1647
  metadata: {
1647
1648
  openapi: {
1648
1649
  operationId: string;
@@ -1678,7 +1679,7 @@ declare const supportedBetterAuthClientPlugins: ({
1678
1679
  email: zod0.ZodString;
1679
1680
  otp: zod0.ZodString;
1680
1681
  password: zod0.ZodString;
1681
- }, better_auth220.$strip>;
1682
+ }, better_auth206.$strip>;
1682
1683
  metadata: {
1683
1684
  openapi: {
1684
1685
  operationId: string;
@@ -1710,7 +1711,7 @@ declare const supportedBetterAuthClientPlugins: ({
1710
1711
  };
1711
1712
  hooks: {
1712
1713
  after: {
1713
- matcher(context: better_auth220.HookEndpointContext): boolean;
1714
+ matcher(context: better_auth206.HookEndpointContext): boolean;
1714
1715
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1715
1716
  }[];
1716
1717
  };
@@ -1736,14 +1737,14 @@ declare const supportedBetterAuthClientPlugins: ({
1736
1737
  window: number;
1737
1738
  max: number;
1738
1739
  })[];
1739
- };
1740
+ }>;
1740
1741
  atomListeners: {
1741
1742
  matcher: (path: string) => path is "/email-otp/verify-email" | "/sign-in/email-otp";
1742
1743
  signal: "$sessionSignal";
1743
1744
  }[];
1744
1745
  } | {
1745
1746
  id: "anonymous";
1746
- $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins7.AnonymousOptions | undefined) => {
1747
+ $InferServerPlugin: ReturnType<(options?: better_auth_client_plugins4.AnonymousOptions | undefined) => {
1747
1748
  id: "anonymous";
1748
1749
  endpoints: {
1749
1750
  signInAnonymous: better_call0.StrictEndpoint<"/sign-in/anonymous", {
@@ -1789,7 +1790,7 @@ declare const supportedBetterAuthClientPlugins: ({
1789
1790
  };
1790
1791
  hooks: {
1791
1792
  after: {
1792
- matcher(ctx: better_auth220.HookEndpointContext): boolean;
1793
+ matcher(ctx: better_auth206.HookEndpointContext): boolean;
1793
1794
  handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
1794
1795
  }[];
1795
1796
  };
@@ -1819,413 +1820,6 @@ declare const supportedBetterAuthClientPlugins: ({
1819
1820
  matcher: (path: string) => path is "/sign-in/anonymous";
1820
1821
  signal: "$sessionSignal";
1821
1822
  }[];
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
1823
  })[];
2230
1824
  type SupportedBetterAuthClientPlugins = typeof supportedBetterAuthClientPlugins;
2231
1825
  declare abstract class NeonAuthAdapterCore {