better-auth 0.8.3-beta.4 → 0.8.3-beta.5

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 (53) hide show
  1. package/dist/adapters/drizzle.d.cts +1 -1
  2. package/dist/adapters/drizzle.d.ts +1 -1
  3. package/dist/adapters/kysely.d.cts +1 -1
  4. package/dist/adapters/kysely.d.ts +1 -1
  5. package/dist/adapters/memory.d.cts +1 -1
  6. package/dist/adapters/memory.d.ts +1 -1
  7. package/dist/adapters/mongodb.d.cts +1 -1
  8. package/dist/adapters/mongodb.d.ts +1 -1
  9. package/dist/adapters/prisma.d.cts +1 -1
  10. package/dist/adapters/prisma.d.ts +1 -1
  11. package/dist/api.d.cts +1 -1
  12. package/dist/api.d.ts +1 -1
  13. package/dist/client/plugins.d.cts +6 -6
  14. package/dist/client/plugins.d.ts +6 -6
  15. package/dist/client.d.cts +1 -1
  16. package/dist/client.d.ts +1 -1
  17. package/dist/cookies.d.cts +1 -1
  18. package/dist/cookies.d.ts +1 -1
  19. package/dist/db.d.cts +2 -2
  20. package/dist/db.d.ts +2 -2
  21. package/dist/{index-DbSanUJ5.d.ts → index-uHjME6mS.d.ts} +28 -37
  22. package/dist/{index-v9In9L_y.d.cts → index-xSdbpM4W.d.cts} +28 -37
  23. package/dist/index.d.cts +2 -2
  24. package/dist/index.d.ts +2 -2
  25. package/dist/next-js.d.cts +1 -1
  26. package/dist/next-js.d.ts +1 -1
  27. package/dist/node.d.cts +1 -1
  28. package/dist/node.d.ts +1 -1
  29. package/dist/oauth2.d.cts +2 -2
  30. package/dist/oauth2.d.ts +2 -2
  31. package/dist/plugins.cjs +5 -5
  32. package/dist/plugins.d.cts +9 -9
  33. package/dist/plugins.d.ts +9 -9
  34. package/dist/plugins.js +4 -4
  35. package/dist/react.d.cts +1 -1
  36. package/dist/react.d.ts +1 -1
  37. package/dist/solid-start.d.cts +1 -1
  38. package/dist/solid-start.d.ts +1 -1
  39. package/dist/solid.d.cts +1 -1
  40. package/dist/solid.d.ts +1 -1
  41. package/dist/{state-B-02czHC.d.ts → state-5tKc556n.d.ts} +1 -1
  42. package/dist/{state-D_ITqPUS.d.cts → state-BZ0Z8cQD.d.cts} +1 -1
  43. package/dist/svelte-kit.d.cts +1 -1
  44. package/dist/svelte-kit.d.ts +1 -1
  45. package/dist/svelte.d.cts +1 -1
  46. package/dist/svelte.d.ts +1 -1
  47. package/dist/types.d.cts +2 -2
  48. package/dist/types.d.ts +2 -2
  49. package/dist/vue.d.cts +1 -1
  50. package/dist/vue.d.ts +1 -1
  51. package/package.json +1 -1
  52. package/dist/{auth-rfAcL_Rw.d.cts → auth-A5nkNoqm.d.cts} +84 -84
  53. package/dist/{auth-miD4FiAv.d.ts → auth-B2oRhuJ8.d.ts} +84 -84
@@ -1,4 +1,4 @@
1
- import { B as BetterAuthOptions, W as Where } from '../auth-rfAcL_Rw.cjs';
1
+ import { B as BetterAuthOptions, W as Where } from '../auth-A5nkNoqm.cjs';
2
2
  import 'kysely';
3
3
  import 'zod';
4
4
  import 'better-call';
@@ -1,4 +1,4 @@
1
- import { B as BetterAuthOptions, W as Where } from '../auth-miD4FiAv.js';
1
+ import { B as BetterAuthOptions, W as Where } from '../auth-B2oRhuJ8.js';
2
2
  import 'kysely';
3
3
  import 'zod';
4
4
  import 'better-call';
@@ -1,5 +1,5 @@
1
1
  import { Kysely } from 'kysely';
2
- import { B as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../auth-rfAcL_Rw.cjs';
2
+ import { B as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../auth-A5nkNoqm.cjs';
3
3
  import 'zod';
4
4
  import 'better-call';
5
5
  import '../helper-DPDj8Nix.cjs';
@@ -1,5 +1,5 @@
1
1
  import { Kysely } from 'kysely';
2
- import { B as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../auth-miD4FiAv.js';
2
+ import { B as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../auth-B2oRhuJ8.js';
3
3
  import 'zod';
4
4
  import 'better-call';
5
5
  import '../helper-DPDj8Nix.js';
@@ -1,4 +1,4 @@
1
- import { B as BetterAuthOptions, W as Where } from '../auth-rfAcL_Rw.cjs';
1
+ import { B as BetterAuthOptions, W as Where } from '../auth-A5nkNoqm.cjs';
2
2
  import 'kysely';
3
3
  import 'zod';
4
4
  import 'better-call';
@@ -1,4 +1,4 @@
1
- import { B as BetterAuthOptions, W as Where } from '../auth-miD4FiAv.js';
1
+ import { B as BetterAuthOptions, W as Where } from '../auth-B2oRhuJ8.js';
2
2
  import 'kysely';
3
3
  import 'zod';
4
4
  import 'better-call';
@@ -1,5 +1,5 @@
1
1
  import { Db } from 'mongodb';
2
- import { B as BetterAuthOptions, W as Where } from '../auth-rfAcL_Rw.cjs';
2
+ import { B as BetterAuthOptions, W as Where } from '../auth-A5nkNoqm.cjs';
3
3
  import 'kysely';
4
4
  import 'zod';
5
5
  import 'better-call';
@@ -1,5 +1,5 @@
1
1
  import { Db } from 'mongodb';
2
- import { B as BetterAuthOptions, W as Where } from '../auth-miD4FiAv.js';
2
+ import { B as BetterAuthOptions, W as Where } from '../auth-B2oRhuJ8.js';
3
3
  import 'kysely';
4
4
  import 'zod';
5
5
  import 'better-call';
@@ -1,4 +1,4 @@
1
- import { B as BetterAuthOptions, W as Where } from '../auth-rfAcL_Rw.cjs';
1
+ import { B as BetterAuthOptions, W as Where } from '../auth-A5nkNoqm.cjs';
2
2
  import 'kysely';
3
3
  import 'zod';
4
4
  import 'better-call';
@@ -1,4 +1,4 @@
1
- import { B as BetterAuthOptions, W as Where } from '../auth-miD4FiAv.js';
1
+ import { B as BetterAuthOptions, W as Where } from '../auth-B2oRhuJ8.js';
2
2
  import 'kysely';
3
3
  import 'zod';
4
4
  import 'better-call';
package/dist/api.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { z as AuthEndpoint, C as AuthMiddleware, a4 as callbackOAuth, an as changeEmail, ak as changePassword, y as createAuthEndpoint, x as createAuthMiddleware, ag as createEmailVerificationToken, am as deleteUser, ao as error, ad as forgetPassword, ae as forgetPasswordCallback, a0 as getEndpoints, a5 as getSession, a6 as getSessionFromCtx, as as linkSocialAccount, a8 as listSessions, ar as listUserAccounts, ap as ok, w as optionsMiddleware, at as originCheckMiddleware, af as resetPassword, ab as revokeOtherSessions, a9 as revokeSession, aa as revokeSessions, a1 as router, ah as sendVerificationEmail, a7 as sessionMiddleware, al as setPassword, a3 as signInEmail, a2 as signInSocial, ac as signOut, aq as signUpEmail, aj as updateUser, ai as verifyEmail } from './auth-rfAcL_Rw.cjs';
1
+ export { z as AuthEndpoint, C as AuthMiddleware, a4 as callbackOAuth, an as changeEmail, ak as changePassword, y as createAuthEndpoint, x as createAuthMiddleware, ag as createEmailVerificationToken, am as deleteUser, ao as error, ad as forgetPassword, ae as forgetPasswordCallback, a0 as getEndpoints, a5 as getSession, a6 as getSessionFromCtx, as as linkSocialAccount, a8 as listSessions, ar as listUserAccounts, ap as ok, w as optionsMiddleware, at as originCheckMiddleware, af as resetPassword, ab as revokeOtherSessions, a9 as revokeSession, aa as revokeSessions, a1 as router, ah as sendVerificationEmail, a7 as sessionMiddleware, al as setPassword, a3 as signInEmail, a2 as signInSocial, ac as signOut, aq as signUpEmail, aj as updateUser, ai as verifyEmail } from './auth-A5nkNoqm.cjs';
2
2
  import './helper-DPDj8Nix.cjs';
3
3
  export { APIError } from 'better-call';
4
4
  import 'zod';
package/dist/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { z as AuthEndpoint, C as AuthMiddleware, a4 as callbackOAuth, an as changeEmail, ak as changePassword, y as createAuthEndpoint, x as createAuthMiddleware, ag as createEmailVerificationToken, am as deleteUser, ao as error, ad as forgetPassword, ae as forgetPasswordCallback, a0 as getEndpoints, a5 as getSession, a6 as getSessionFromCtx, as as linkSocialAccount, a8 as listSessions, ar as listUserAccounts, ap as ok, w as optionsMiddleware, at as originCheckMiddleware, af as resetPassword, ab as revokeOtherSessions, a9 as revokeSession, aa as revokeSessions, a1 as router, ah as sendVerificationEmail, a7 as sessionMiddleware, al as setPassword, a3 as signInEmail, a2 as signInSocial, ac as signOut, aq as signUpEmail, aj as updateUser, ai as verifyEmail } from './auth-miD4FiAv.js';
1
+ export { z as AuthEndpoint, C as AuthMiddleware, a4 as callbackOAuth, an as changeEmail, ak as changePassword, y as createAuthEndpoint, x as createAuthMiddleware, ag as createEmailVerificationToken, am as deleteUser, ao as error, ad as forgetPassword, ae as forgetPasswordCallback, a0 as getEndpoints, a5 as getSession, a6 as getSessionFromCtx, as as linkSocialAccount, a8 as listSessions, ar as listUserAccounts, ap as ok, w as optionsMiddleware, at as originCheckMiddleware, af as resetPassword, ab as revokeOtherSessions, a9 as revokeSession, aa as revokeSessions, a1 as router, ah as sendVerificationEmail, a7 as sessionMiddleware, al as setPassword, a3 as signInEmail, a2 as signInSocial, ac as signOut, aq as signUpEmail, aj as updateUser, ai as verifyEmail } from './auth-B2oRhuJ8.js';
2
2
  import './helper-DPDj8Nix.js';
3
3
  export { APIError } from 'better-call';
4
4
  import 'zod';
@@ -2,10 +2,10 @@ import * as nanostores from 'nanostores';
2
2
  import { A as AccessControl, S as StatementsPrimitive, R as Role } from '../statement-DFWdVU7s.cjs';
3
3
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
4
  import { BetterFetchOption } from '@better-fetch/fetch';
5
- import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-v9In9L_y.cjs';
6
- export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-v9In9L_y.cjs';
5
+ import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-xSdbpM4W.cjs';
6
+ export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-xSdbpM4W.cjs';
7
7
  import { P as Prettify } from '../helper-DPDj8Nix.cjs';
8
- import { F as FieldAttribute, B as BetterAuthOptions, j as BetterAuthPlugin } from '../auth-rfAcL_Rw.cjs';
8
+ import { F as FieldAttribute, B as BetterAuthOptions, j as BetterAuthPlugin } from '../auth-A5nkNoqm.cjs';
9
9
  import { Store } from '../types.cjs';
10
10
  import 'better-call';
11
11
  import 'zod';
@@ -32,7 +32,7 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
32
32
  id: string;
33
33
  name: string;
34
34
  email: string;
35
- image?: string;
35
+ image?: string | null;
36
36
  };
37
37
  }>[];
38
38
  invitations: Invitation[];
@@ -94,7 +94,7 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
94
94
  name: string;
95
95
  slug: string;
96
96
  createdAt: Date;
97
- logo?: string | undefined;
97
+ logo?: string | null | undefined;
98
98
  metadata?: any;
99
99
  } & {
100
100
  members: (Member & {
@@ -117,7 +117,7 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
117
117
  name: string;
118
118
  slug: string;
119
119
  createdAt: Date;
120
- logo?: string | undefined;
120
+ logo?: string | null | undefined;
121
121
  metadata?: any;
122
122
  }[] | null;
123
123
  error: null | _better_fetch_fetch.BetterFetchError;
@@ -2,10 +2,10 @@ import * as nanostores from 'nanostores';
2
2
  import { A as AccessControl, S as StatementsPrimitive, R as Role } from '../statement-CTl9eDv7.js';
3
3
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
4
  import { BetterFetchOption } from '@better-fetch/fetch';
5
- import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-DbSanUJ5.js';
6
- export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-DbSanUJ5.js';
5
+ import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-uHjME6mS.js';
6
+ export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-uHjME6mS.js';
7
7
  import { P as Prettify } from '../helper-DPDj8Nix.js';
8
- import { F as FieldAttribute, B as BetterAuthOptions, j as BetterAuthPlugin } from '../auth-miD4FiAv.js';
8
+ import { F as FieldAttribute, B as BetterAuthOptions, j as BetterAuthPlugin } from '../auth-B2oRhuJ8.js';
9
9
  import { Store } from '../types.js';
10
10
  import 'better-call';
11
11
  import 'zod';
@@ -32,7 +32,7 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
32
32
  id: string;
33
33
  name: string;
34
34
  email: string;
35
- image?: string;
35
+ image?: string | null;
36
36
  };
37
37
  }>[];
38
38
  invitations: Invitation[];
@@ -94,7 +94,7 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
94
94
  name: string;
95
95
  slug: string;
96
96
  createdAt: Date;
97
- logo?: string | undefined;
97
+ logo?: string | null | undefined;
98
98
  metadata?: any;
99
99
  } & {
100
100
  members: (Member & {
@@ -117,7 +117,7 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
117
117
  name: string;
118
118
  slug: string;
119
119
  createdAt: Date;
120
- logo?: string | undefined;
120
+ logo?: string | null | undefined;
121
121
  metadata?: any;
122
122
  }[] | null;
123
123
  error: null | _better_fetch_fetch.BetterFetchError;
package/dist/client.d.cts CHANGED
@@ -6,7 +6,7 @@ import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/
6
6
  import { ClientOptions, InferClientAPI, InferActions, InferSessionFromClient, InferUserFromClient, BetterAuthClientPlugin, IsSignal } from './types.cjs';
7
7
  export { AtomListener, InferAdditionalFromClient, InferPluginsFromClient, Store } from './types.cjs';
8
8
  import { U as UnionToIntersection } from './helper-DPDj8Nix.cjs';
9
- import './auth-rfAcL_Rw.cjs';
9
+ import './auth-A5nkNoqm.cjs';
10
10
  import 'kysely';
11
11
  import 'better-call';
12
12
  import './index-cqC7BcV_.cjs';
package/dist/client.d.ts CHANGED
@@ -6,7 +6,7 @@ import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/
6
6
  import { ClientOptions, InferClientAPI, InferActions, InferSessionFromClient, InferUserFromClient, BetterAuthClientPlugin, IsSignal } from './types.js';
7
7
  export { AtomListener, InferAdditionalFromClient, InferPluginsFromClient, Store } from './types.js';
8
8
  import { U as UnionToIntersection } from './helper-DPDj8Nix.js';
9
- import './auth-miD4FiAv.js';
9
+ import './auth-B2oRhuJ8.js';
10
10
  import 'kysely';
11
11
  import 'better-call';
12
12
  import './index-DN9ozDRm.js';
@@ -1,5 +1,5 @@
1
1
  import 'better-call';
2
- export { p as BetterAuthCookies, E as EligibleCookies, n as createCookieGetter, q as deleteSessionCookie, o as getCookies, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-rfAcL_Rw.cjs';
2
+ export { p as BetterAuthCookies, E as EligibleCookies, n as createCookieGetter, q as deleteSessionCookie, o as getCookies, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-A5nkNoqm.cjs';
3
3
  import 'kysely';
4
4
  import 'zod';
5
5
  import './helper-DPDj8Nix.cjs';
package/dist/cookies.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import 'better-call';
2
- export { p as BetterAuthCookies, E as EligibleCookies, n as createCookieGetter, q as deleteSessionCookie, o as getCookies, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-miD4FiAv.js';
2
+ export { p as BetterAuthCookies, E as EligibleCookies, n as createCookieGetter, q as deleteSessionCookie, o as getCookies, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-B2oRhuJ8.js';
3
3
  import 'kysely';
4
4
  import 'zod';
5
5
  import './helper-DPDj8Nix.js';
package/dist/db.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { k as Adapter, B as BetterAuthOptions, W as Where, F as FieldAttribute, D as FieldType, K as KyselyDatabaseType } from './auth-rfAcL_Rw.cjs';
2
- export { _ as BetterAuthDbSchema, M as FieldAttributeConfig, Z as InferFieldsFromOptions, Y as InferFieldsFromPlugins, T as InferFieldsInput, V as InferFieldsInputClient, Q as InferFieldsOutput, O as InferValueType, L as InternalAdapter, X as PluginFieldAttribute, N as createFieldAttribute, J as createInternalAdapter, $ as getAuthTables } from './auth-rfAcL_Rw.cjs';
1
+ import { k as Adapter, B as BetterAuthOptions, W as Where, F as FieldAttribute, D as FieldType, K as KyselyDatabaseType } from './auth-A5nkNoqm.cjs';
2
+ export { _ as BetterAuthDbSchema, M as FieldAttributeConfig, Z as InferFieldsFromOptions, Y as InferFieldsFromPlugins, T as InferFieldsInput, V as InferFieldsInputClient, Q as InferFieldsOutput, O as InferValueType, L as InternalAdapter, X as PluginFieldAttribute, N as createFieldAttribute, J as createInternalAdapter, $ as getAuthTables } from './auth-A5nkNoqm.cjs';
3
3
  import { z } from 'zod';
4
4
  import 'kysely';
5
5
  import 'better-call';
package/dist/db.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { k as Adapter, B as BetterAuthOptions, W as Where, F as FieldAttribute, D as FieldType, K as KyselyDatabaseType } from './auth-miD4FiAv.js';
2
- export { _ as BetterAuthDbSchema, M as FieldAttributeConfig, Z as InferFieldsFromOptions, Y as InferFieldsFromPlugins, T as InferFieldsInput, V as InferFieldsInputClient, Q as InferFieldsOutput, O as InferValueType, L as InternalAdapter, X as PluginFieldAttribute, N as createFieldAttribute, J as createInternalAdapter, $ as getAuthTables } from './auth-miD4FiAv.js';
1
+ import { k as Adapter, B as BetterAuthOptions, W as Where, F as FieldAttribute, D as FieldType, K as KyselyDatabaseType } from './auth-B2oRhuJ8.js';
2
+ export { _ as BetterAuthDbSchema, M as FieldAttributeConfig, Z as InferFieldsFromOptions, Y as InferFieldsFromPlugins, T as InferFieldsInput, V as InferFieldsInputClient, Q as InferFieldsOutput, O as InferValueType, L as InternalAdapter, X as PluginFieldAttribute, N as createFieldAttribute, J as createInternalAdapter, $ as getAuthTables } from './auth-B2oRhuJ8.js';
3
3
  import { z } from 'zod';
4
4
  import 'kysely';
5
5
  import 'better-call';
@@ -1,4 +1,4 @@
1
- import { U as User, S as Session, H as HookEndpointContext, h as AuthContext, P as PluginSchema } from './auth-miD4FiAv.js';
1
+ import { U as User, S as Session, H as HookEndpointContext, h as AuthContext, P as PluginSchema } from './auth-B2oRhuJ8.js';
2
2
  import * as better_call from 'better-call';
3
3
  import { z, ZodObject, ZodOptional, ZodArray, ZodLiteral } from 'zod';
4
4
  import { P as Prettify } from './helper-DPDj8Nix.js';
@@ -15,8 +15,8 @@ declare const organizationSchema: z.ZodObject<{
15
15
  id: z.ZodString;
16
16
  name: z.ZodString;
17
17
  slug: z.ZodString;
18
- logo: z.ZodOptional<z.ZodString>;
19
- metadata: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodEffects<z.ZodString, any, string>]>>;
18
+ logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodEffects<z.ZodString, any, string>]>>>;
20
20
  createdAt: z.ZodDate;
21
21
  }, "strip", z.ZodTypeAny, {
22
22
  id: string;
@@ -24,14 +24,14 @@ declare const organizationSchema: z.ZodObject<{
24
24
  createdAt: Date;
25
25
  slug: string;
26
26
  metadata?: any;
27
- logo?: string | undefined;
27
+ logo?: string | null | undefined;
28
28
  }, {
29
29
  id: string;
30
30
  name: string;
31
31
  createdAt: Date;
32
32
  slug: string;
33
- metadata?: string | Record<string, string> | undefined;
34
- logo?: string | undefined;
33
+ metadata?: string | Record<string, string> | null | undefined;
34
+ logo?: string | null | undefined;
35
35
  }>;
36
36
  declare const memberSchema: z.ZodObject<{
37
37
  id: z.ZodString;
@@ -524,7 +524,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
524
524
  name: string;
525
525
  createdAt: Date;
526
526
  slug: string;
527
- logo?: string | undefined;
527
+ logo?: string | null | undefined;
528
528
  } | null>;
529
529
  path: "/organization/create";
530
530
  options: {
@@ -671,7 +671,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
671
671
  createdAt: Date;
672
672
  slug: string;
673
673
  metadata?: any;
674
- logo?: string | undefined;
674
+ logo?: string | null | undefined;
675
675
  } | null>;
676
676
  path: "/organization/update";
677
677
  options: {
@@ -881,7 +881,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
881
881
  createdAt: Date;
882
882
  slug: string;
883
883
  metadata?: any;
884
- logo?: string | undefined;
884
+ logo?: string | null | undefined;
885
885
  } | null>;
886
886
  path: "/organization/set-active";
887
887
  options: {
@@ -1068,7 +1068,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
1068
1068
  createdAt: Date;
1069
1069
  slug: string;
1070
1070
  metadata?: any;
1071
- logo?: string | undefined;
1071
+ logo?: string | null | undefined;
1072
1072
  } | null>;
1073
1073
  path: "/organization/get-full-organization";
1074
1074
  options: {
@@ -1226,7 +1226,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
1226
1226
  createdAt: Date;
1227
1227
  slug: string;
1228
1228
  metadata?: any;
1229
- logo?: string | undefined;
1229
+ logo?: string | null | undefined;
1230
1230
  }[]>;
1231
1231
  path: "/organization/list";
1232
1232
  options: {
@@ -2678,7 +2678,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
2678
2678
  id: string;
2679
2679
  name: string;
2680
2680
  email: string;
2681
- image: string | undefined;
2681
+ image?: string | null;
2682
2682
  };
2683
2683
  }>[];
2684
2684
  invitations: Invitation[];
@@ -4989,6 +4989,13 @@ declare const phoneNumber: (options?: {
4989
4989
  * by default any string is accepted
4990
4990
  */
4991
4991
  phoneNumberValidator?: (phoneNumber: string) => boolean;
4992
+ /**
4993
+ * Callback when phone number is verified
4994
+ */
4995
+ callbackOnVerification?: (data: {
4996
+ phoneNumber: string;
4997
+ user: UserWithPhoneNumber | null;
4998
+ }, request?: Request) => void | Promise<void>;
4992
4999
  /**
4993
5000
  * Sign up user after phone number verification
4994
5001
  *
@@ -5086,15 +5093,7 @@ declare const phoneNumber: (options?: {
5086
5093
  }>]>(...ctx: C): Promise<C extends [{
5087
5094
  asResponse: true;
5088
5095
  }] ? Response : {
5089
- user: {
5090
- id: string;
5091
- email: string;
5092
- emailVerified: boolean;
5093
- name: string;
5094
- createdAt: Date;
5095
- updatedAt: Date;
5096
- image?: string | null | undefined;
5097
- };
5096
+ user: UserWithPhoneNumber;
5098
5097
  session: {
5099
5098
  id: string;
5100
5099
  userId: string;
@@ -5103,17 +5102,9 @@ declare const phoneNumber: (options?: {
5103
5102
  userAgent?: string | null | undefined;
5104
5103
  };
5105
5104
  } | {
5106
- user: {
5107
- id: string;
5108
- email: string;
5109
- emailVerified: boolean;
5110
- name: string;
5111
- createdAt: Date;
5112
- updatedAt: Date;
5113
- image?: string | null | undefined;
5114
- };
5105
+ user: UserWithPhoneNumber;
5115
5106
  session: null;
5116
- }>;
5107
+ } | null>;
5117
5108
  path: "/phone-number/verify";
5118
5109
  options: {
5119
5110
  method: "POST";
@@ -5436,15 +5427,15 @@ declare const admin: (options?: AdminOptions) => {
5436
5427
  */
5437
5428
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5438
5429
  }, "strip", z.ZodTypeAny, {
5430
+ password: string;
5439
5431
  email: string;
5440
5432
  name: string;
5441
- password: string;
5442
5433
  role: string;
5443
5434
  data?: Record<string, any> | undefined;
5444
5435
  }, {
5436
+ password: string;
5445
5437
  email: string;
5446
5438
  name: string;
5447
- password: string;
5448
5439
  role: string;
5449
5440
  data?: Record<string, any> | undefined;
5450
5441
  }>;
@@ -5478,15 +5469,15 @@ declare const admin: (options?: AdminOptions) => {
5478
5469
  */
5479
5470
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5480
5471
  }, "strip", z.ZodTypeAny, {
5472
+ password: string;
5481
5473
  email: string;
5482
5474
  name: string;
5483
- password: string;
5484
5475
  role: string;
5485
5476
  data?: Record<string, any> | undefined;
5486
5477
  }, {
5478
+ password: string;
5487
5479
  email: string;
5488
5480
  name: string;
5489
- password: string;
5490
5481
  role: string;
5491
5482
  data?: Record<string, any> | undefined;
5492
5483
  }>;
@@ -6741,13 +6732,13 @@ declare const emailOTP: (options: EmailOTPOptions) => {
6741
6732
  };
6742
6733
  accounts: {
6743
6734
  id: string;
6744
- userId: string;
6745
6735
  providerId: string;
6746
6736
  accountId: string;
6747
- expiresAt?: Date | null | undefined;
6737
+ userId: string;
6748
6738
  accessToken?: string | null | undefined;
6749
6739
  refreshToken?: string | null | undefined;
6750
6740
  idToken?: string | null | undefined;
6741
+ expiresAt?: Date | null | undefined;
6751
6742
  password?: string | null | undefined;
6752
6743
  }[];
6753
6744
  };
@@ -1,4 +1,4 @@
1
- import { U as User, S as Session, H as HookEndpointContext, h as AuthContext, P as PluginSchema } from './auth-rfAcL_Rw.cjs';
1
+ import { U as User, S as Session, H as HookEndpointContext, h as AuthContext, P as PluginSchema } from './auth-A5nkNoqm.cjs';
2
2
  import * as better_call from 'better-call';
3
3
  import { z, ZodObject, ZodOptional, ZodArray, ZodLiteral } from 'zod';
4
4
  import { P as Prettify } from './helper-DPDj8Nix.cjs';
@@ -15,8 +15,8 @@ declare const organizationSchema: z.ZodObject<{
15
15
  id: z.ZodString;
16
16
  name: z.ZodString;
17
17
  slug: z.ZodString;
18
- logo: z.ZodOptional<z.ZodString>;
19
- metadata: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodEffects<z.ZodString, any, string>]>>;
18
+ logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodEffects<z.ZodString, any, string>]>>>;
20
20
  createdAt: z.ZodDate;
21
21
  }, "strip", z.ZodTypeAny, {
22
22
  id: string;
@@ -24,14 +24,14 @@ declare const organizationSchema: z.ZodObject<{
24
24
  createdAt: Date;
25
25
  slug: string;
26
26
  metadata?: any;
27
- logo?: string | undefined;
27
+ logo?: string | null | undefined;
28
28
  }, {
29
29
  id: string;
30
30
  name: string;
31
31
  createdAt: Date;
32
32
  slug: string;
33
- metadata?: string | Record<string, string> | undefined;
34
- logo?: string | undefined;
33
+ metadata?: string | Record<string, string> | null | undefined;
34
+ logo?: string | null | undefined;
35
35
  }>;
36
36
  declare const memberSchema: z.ZodObject<{
37
37
  id: z.ZodString;
@@ -524,7 +524,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
524
524
  name: string;
525
525
  createdAt: Date;
526
526
  slug: string;
527
- logo?: string | undefined;
527
+ logo?: string | null | undefined;
528
528
  } | null>;
529
529
  path: "/organization/create";
530
530
  options: {
@@ -671,7 +671,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
671
671
  createdAt: Date;
672
672
  slug: string;
673
673
  metadata?: any;
674
- logo?: string | undefined;
674
+ logo?: string | null | undefined;
675
675
  } | null>;
676
676
  path: "/organization/update";
677
677
  options: {
@@ -881,7 +881,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
881
881
  createdAt: Date;
882
882
  slug: string;
883
883
  metadata?: any;
884
- logo?: string | undefined;
884
+ logo?: string | null | undefined;
885
885
  } | null>;
886
886
  path: "/organization/set-active";
887
887
  options: {
@@ -1068,7 +1068,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
1068
1068
  createdAt: Date;
1069
1069
  slug: string;
1070
1070
  metadata?: any;
1071
- logo?: string | undefined;
1071
+ logo?: string | null | undefined;
1072
1072
  } | null>;
1073
1073
  path: "/organization/get-full-organization";
1074
1074
  options: {
@@ -1226,7 +1226,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
1226
1226
  createdAt: Date;
1227
1227
  slug: string;
1228
1228
  metadata?: any;
1229
- logo?: string | undefined;
1229
+ logo?: string | null | undefined;
1230
1230
  }[]>;
1231
1231
  path: "/organization/list";
1232
1232
  options: {
@@ -2678,7 +2678,7 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
2678
2678
  id: string;
2679
2679
  name: string;
2680
2680
  email: string;
2681
- image: string | undefined;
2681
+ image?: string | null;
2682
2682
  };
2683
2683
  }>[];
2684
2684
  invitations: Invitation[];
@@ -4989,6 +4989,13 @@ declare const phoneNumber: (options?: {
4989
4989
  * by default any string is accepted
4990
4990
  */
4991
4991
  phoneNumberValidator?: (phoneNumber: string) => boolean;
4992
+ /**
4993
+ * Callback when phone number is verified
4994
+ */
4995
+ callbackOnVerification?: (data: {
4996
+ phoneNumber: string;
4997
+ user: UserWithPhoneNumber | null;
4998
+ }, request?: Request) => void | Promise<void>;
4992
4999
  /**
4993
5000
  * Sign up user after phone number verification
4994
5001
  *
@@ -5086,15 +5093,7 @@ declare const phoneNumber: (options?: {
5086
5093
  }>]>(...ctx: C): Promise<C extends [{
5087
5094
  asResponse: true;
5088
5095
  }] ? Response : {
5089
- user: {
5090
- id: string;
5091
- email: string;
5092
- emailVerified: boolean;
5093
- name: string;
5094
- createdAt: Date;
5095
- updatedAt: Date;
5096
- image?: string | null | undefined;
5097
- };
5096
+ user: UserWithPhoneNumber;
5098
5097
  session: {
5099
5098
  id: string;
5100
5099
  userId: string;
@@ -5103,17 +5102,9 @@ declare const phoneNumber: (options?: {
5103
5102
  userAgent?: string | null | undefined;
5104
5103
  };
5105
5104
  } | {
5106
- user: {
5107
- id: string;
5108
- email: string;
5109
- emailVerified: boolean;
5110
- name: string;
5111
- createdAt: Date;
5112
- updatedAt: Date;
5113
- image?: string | null | undefined;
5114
- };
5105
+ user: UserWithPhoneNumber;
5115
5106
  session: null;
5116
- }>;
5107
+ } | null>;
5117
5108
  path: "/phone-number/verify";
5118
5109
  options: {
5119
5110
  method: "POST";
@@ -5436,15 +5427,15 @@ declare const admin: (options?: AdminOptions) => {
5436
5427
  */
5437
5428
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5438
5429
  }, "strip", z.ZodTypeAny, {
5430
+ password: string;
5439
5431
  email: string;
5440
5432
  name: string;
5441
- password: string;
5442
5433
  role: string;
5443
5434
  data?: Record<string, any> | undefined;
5444
5435
  }, {
5436
+ password: string;
5445
5437
  email: string;
5446
5438
  name: string;
5447
- password: string;
5448
5439
  role: string;
5449
5440
  data?: Record<string, any> | undefined;
5450
5441
  }>;
@@ -5478,15 +5469,15 @@ declare const admin: (options?: AdminOptions) => {
5478
5469
  */
5479
5470
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5480
5471
  }, "strip", z.ZodTypeAny, {
5472
+ password: string;
5481
5473
  email: string;
5482
5474
  name: string;
5483
- password: string;
5484
5475
  role: string;
5485
5476
  data?: Record<string, any> | undefined;
5486
5477
  }, {
5478
+ password: string;
5487
5479
  email: string;
5488
5480
  name: string;
5489
- password: string;
5490
5481
  role: string;
5491
5482
  data?: Record<string, any> | undefined;
5492
5483
  }>;
@@ -6741,13 +6732,13 @@ declare const emailOTP: (options: EmailOTPOptions) => {
6741
6732
  };
6742
6733
  accounts: {
6743
6734
  id: string;
6744
- userId: string;
6745
6735
  providerId: string;
6746
6736
  accountId: string;
6747
- expiresAt?: Date | null | undefined;
6737
+ userId: string;
6748
6738
  accessToken?: string | null | undefined;
6749
6739
  refreshToken?: string | null | undefined;
6750
6740
  idToken?: string | null | undefined;
6741
+ expiresAt?: Date | null | undefined;
6751
6742
  password?: string | null | undefined;
6752
6743
  }[];
6753
6744
  };
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- export { k as Adapter, l as AdapterInstance, d as AdditionalSessionFieldsInput, e as AdditionalSessionFieldsOutput, a as AdditionalUserFieldsInput, c as AdditionalUserFieldsOutput, A as Auth, h as AuthContext, p as BetterAuthCookies, B as BetterAuthOptions, j as BetterAuthPlugin, E as EligibleCookies, G as GenericEndpointContext, H as HookEndpointContext, g as InferPluginTypes, f as InferSession, I as InferUser, P as PluginSchema, R as RateLimit, m as SecondaryStorage, S as Session, U as User, W as Where, b as betterAuth, n as createCookieGetter, u as createLogger, q as deleteSessionCookie, o as getCookies, i as init, v as logger, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-rfAcL_Rw.cjs';
1
+ export { k as Adapter, l as AdapterInstance, d as AdditionalSessionFieldsInput, e as AdditionalSessionFieldsOutput, a as AdditionalUserFieldsInput, c as AdditionalUserFieldsOutput, A as Auth, h as AuthContext, p as BetterAuthCookies, B as BetterAuthOptions, j as BetterAuthPlugin, E as EligibleCookies, G as GenericEndpointContext, H as HookEndpointContext, g as InferPluginTypes, f as InferSession, I as InferUser, P as PluginSchema, R as RateLimit, m as SecondaryStorage, S as Session, U as User, W as Where, b as betterAuth, n as createCookieGetter, u as createLogger, q as deleteSessionCookie, o as getCookies, i as init, v as logger, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-A5nkNoqm.cjs';
2
2
  export { D as DeepPartial, H as HasRequiredKeys, L as LiteralString, a as LiteralUnion, P as Prettify, R as RequiredKeysOf, S as StripEmptyObjects, U as UnionToIntersection, W as WithoutEmpty } from './helper-DPDj8Nix.cjs';
3
3
  export { AtomListener, BetterAuthClientPlugin, ClientOptions, InferActions, InferAdditionalFromClient, InferClientAPI, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, IsSignal, Store } from './types.cjs';
4
4
  export { H as HIDE_METADATA } from './hide-metadata-DEHJp1rk.cjs';
5
- export { g as generateState, p as parseState } from './state-D_ITqPUS.cjs';
5
+ export { g as generateState, p as parseState } from './state-BZ0Z8cQD.cjs';
6
6
  import 'kysely';
7
7
  import 'zod';
8
8
  import 'better-call';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { k as Adapter, l as AdapterInstance, d as AdditionalSessionFieldsInput, e as AdditionalSessionFieldsOutput, a as AdditionalUserFieldsInput, c as AdditionalUserFieldsOutput, A as Auth, h as AuthContext, p as BetterAuthCookies, B as BetterAuthOptions, j as BetterAuthPlugin, E as EligibleCookies, G as GenericEndpointContext, H as HookEndpointContext, g as InferPluginTypes, f as InferSession, I as InferUser, P as PluginSchema, R as RateLimit, m as SecondaryStorage, S as Session, U as User, W as Where, b as betterAuth, n as createCookieGetter, u as createLogger, q as deleteSessionCookie, o as getCookies, i as init, v as logger, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-miD4FiAv.js';
1
+ export { k as Adapter, l as AdapterInstance, d as AdditionalSessionFieldsInput, e as AdditionalSessionFieldsOutput, a as AdditionalUserFieldsInput, c as AdditionalUserFieldsOutput, A as Auth, h as AuthContext, p as BetterAuthCookies, B as BetterAuthOptions, j as BetterAuthPlugin, E as EligibleCookies, G as GenericEndpointContext, H as HookEndpointContext, g as InferPluginTypes, f as InferSession, I as InferUser, P as PluginSchema, R as RateLimit, m as SecondaryStorage, S as Session, U as User, W as Where, b as betterAuth, n as createCookieGetter, u as createLogger, q as deleteSessionCookie, o as getCookies, i as init, v as logger, r as parseCookies, t as parseSetCookieHeader, s as setSessionCookie } from './auth-B2oRhuJ8.js';
2
2
  export { D as DeepPartial, H as HasRequiredKeys, L as LiteralString, a as LiteralUnion, P as Prettify, R as RequiredKeysOf, S as StripEmptyObjects, U as UnionToIntersection, W as WithoutEmpty } from './helper-DPDj8Nix.js';
3
3
  export { AtomListener, BetterAuthClientPlugin, ClientOptions, InferActions, InferAdditionalFromClient, InferClientAPI, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, IsSignal, Store } from './types.js';
4
4
  export { H as HIDE_METADATA } from './hide-metadata-DEHJp1rk.js';
5
- export { g as generateState, p as parseState } from './state-B-02czHC.js';
5
+ export { g as generateState, p as parseState } from './state-5tKc556n.js';
6
6
  import 'kysely';
7
7
  import 'zod';
8
8
  import 'better-call';