better-auth 1.3.8-beta.7 → 1.3.8-beta.9

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 (261) hide show
  1. package/dist/adapters/drizzle-adapter/index.d.cts +2 -2
  2. package/dist/adapters/drizzle-adapter/index.d.mts +2 -2
  3. package/dist/adapters/drizzle-adapter/index.d.ts +2 -2
  4. package/dist/adapters/index.d.cts +3 -3
  5. package/dist/adapters/index.d.mts +3 -3
  6. package/dist/adapters/index.d.ts +3 -3
  7. package/dist/adapters/kysely-adapter/index.d.cts +2 -2
  8. package/dist/adapters/kysely-adapter/index.d.mts +2 -2
  9. package/dist/adapters/kysely-adapter/index.d.ts +2 -2
  10. package/dist/adapters/memory-adapter/index.d.cts +2 -2
  11. package/dist/adapters/memory-adapter/index.d.mts +2 -2
  12. package/dist/adapters/memory-adapter/index.d.ts +2 -2
  13. package/dist/adapters/mongodb-adapter/index.d.cts +2 -2
  14. package/dist/adapters/mongodb-adapter/index.d.mts +2 -2
  15. package/dist/adapters/mongodb-adapter/index.d.ts +2 -2
  16. package/dist/adapters/prisma-adapter/index.d.cts +2 -2
  17. package/dist/adapters/prisma-adapter/index.d.mts +2 -2
  18. package/dist/adapters/prisma-adapter/index.d.ts +2 -2
  19. package/dist/adapters/test.d.cts +2 -2
  20. package/dist/adapters/test.d.mts +2 -2
  21. package/dist/adapters/test.d.ts +2 -2
  22. package/dist/api/index.cjs +1 -1
  23. package/dist/api/index.d.cts +2 -2
  24. package/dist/api/index.d.mts +2 -2
  25. package/dist/api/index.d.ts +2 -2
  26. package/dist/api/index.mjs +2 -2
  27. package/dist/client/index.cjs +2 -2
  28. package/dist/client/index.d.cts +4 -4
  29. package/dist/client/index.d.mts +4 -4
  30. package/dist/client/index.d.ts +4 -4
  31. package/dist/client/index.mjs +2 -2
  32. package/dist/client/plugins/index.cjs +31 -3
  33. package/dist/client/plugins/index.d.cts +39 -9
  34. package/dist/client/plugins/index.d.mts +39 -9
  35. package/dist/client/plugins/index.d.ts +39 -9
  36. package/dist/client/plugins/index.mjs +33 -5
  37. package/dist/client/react/index.cjs +1 -1
  38. package/dist/client/react/index.d.cts +9 -9
  39. package/dist/client/react/index.d.mts +9 -9
  40. package/dist/client/react/index.d.ts +9 -9
  41. package/dist/client/react/index.mjs +1 -1
  42. package/dist/client/solid/index.cjs +1 -1
  43. package/dist/client/solid/index.d.cts +3 -3
  44. package/dist/client/solid/index.d.mts +3 -3
  45. package/dist/client/solid/index.d.ts +3 -3
  46. package/dist/client/solid/index.mjs +1 -1
  47. package/dist/client/svelte/index.cjs +1 -1
  48. package/dist/client/svelte/index.d.cts +3 -3
  49. package/dist/client/svelte/index.d.mts +3 -3
  50. package/dist/client/svelte/index.d.ts +3 -3
  51. package/dist/client/svelte/index.mjs +1 -1
  52. package/dist/client/vue/index.cjs +1 -1
  53. package/dist/client/vue/index.d.cts +12 -12
  54. package/dist/client/vue/index.d.mts +12 -12
  55. package/dist/client/vue/index.d.ts +12 -12
  56. package/dist/client/vue/index.mjs +1 -1
  57. package/dist/cookies/index.d.cts +2 -2
  58. package/dist/cookies/index.d.mts +2 -2
  59. package/dist/cookies/index.d.ts +2 -2
  60. package/dist/db/index.d.cts +3 -3
  61. package/dist/db/index.d.mts +3 -3
  62. package/dist/db/index.d.ts +3 -3
  63. package/dist/index.cjs +10 -9
  64. package/dist/index.d.cts +6 -5
  65. package/dist/index.d.mts +6 -5
  66. package/dist/index.d.ts +6 -5
  67. package/dist/index.mjs +9 -9
  68. package/dist/integrations/next-js.cjs +2 -2
  69. package/dist/integrations/next-js.d.cts +2 -2
  70. package/dist/integrations/next-js.d.mts +2 -2
  71. package/dist/integrations/next-js.d.ts +2 -2
  72. package/dist/integrations/next-js.mjs +2 -2
  73. package/dist/integrations/node.d.cts +2 -2
  74. package/dist/integrations/node.d.mts +2 -2
  75. package/dist/integrations/node.d.ts +2 -2
  76. package/dist/integrations/react-start.cjs +2 -2
  77. package/dist/integrations/react-start.d.cts +2 -2
  78. package/dist/integrations/react-start.d.mts +2 -2
  79. package/dist/integrations/react-start.d.ts +2 -2
  80. package/dist/integrations/react-start.mjs +2 -2
  81. package/dist/integrations/svelte-kit.cjs +1 -1
  82. package/dist/integrations/svelte-kit.d.cts +2 -2
  83. package/dist/integrations/svelte-kit.d.mts +2 -2
  84. package/dist/integrations/svelte-kit.d.ts +2 -2
  85. package/dist/integrations/svelte-kit.mjs +1 -1
  86. package/dist/oauth2/index.cjs +1 -1
  87. package/dist/oauth2/index.d.cts +4 -4
  88. package/dist/oauth2/index.d.mts +4 -4
  89. package/dist/oauth2/index.d.ts +4 -4
  90. package/dist/oauth2/index.mjs +1 -1
  91. package/dist/plugins/admin/index.cjs +2 -2
  92. package/dist/plugins/admin/index.d.cts +4 -4
  93. package/dist/plugins/admin/index.d.mts +4 -4
  94. package/dist/plugins/admin/index.d.ts +4 -4
  95. package/dist/plugins/admin/index.mjs +2 -2
  96. package/dist/plugins/anonymous/index.cjs +1 -1
  97. package/dist/plugins/anonymous/index.d.cts +2 -2
  98. package/dist/plugins/anonymous/index.d.mts +2 -2
  99. package/dist/plugins/anonymous/index.d.ts +2 -2
  100. package/dist/plugins/anonymous/index.mjs +1 -1
  101. package/dist/plugins/bearer/index.cjs +1 -1
  102. package/dist/plugins/bearer/index.d.cts +2 -2
  103. package/dist/plugins/bearer/index.d.mts +2 -2
  104. package/dist/plugins/bearer/index.d.ts +2 -2
  105. package/dist/plugins/bearer/index.mjs +1 -1
  106. package/dist/plugins/captcha/index.d.cts +2 -2
  107. package/dist/plugins/captcha/index.d.mts +2 -2
  108. package/dist/plugins/captcha/index.d.ts +2 -2
  109. package/dist/plugins/custom-session/index.cjs +1 -1
  110. package/dist/plugins/custom-session/index.d.cts +2 -2
  111. package/dist/plugins/custom-session/index.d.mts +2 -2
  112. package/dist/plugins/custom-session/index.d.ts +2 -2
  113. package/dist/plugins/custom-session/index.mjs +1 -1
  114. package/dist/plugins/device-authorization/index.d.cts +2 -2
  115. package/dist/plugins/device-authorization/index.d.mts +2 -2
  116. package/dist/plugins/device-authorization/index.d.ts +2 -2
  117. package/dist/plugins/email-otp/index.cjs +1 -1
  118. package/dist/plugins/email-otp/index.d.cts +2 -2
  119. package/dist/plugins/email-otp/index.d.mts +2 -2
  120. package/dist/plugins/email-otp/index.d.ts +2 -2
  121. package/dist/plugins/email-otp/index.mjs +1 -1
  122. package/dist/plugins/generic-oauth/index.cjs +1 -1
  123. package/dist/plugins/generic-oauth/index.d.cts +2 -2
  124. package/dist/plugins/generic-oauth/index.d.mts +2 -2
  125. package/dist/plugins/generic-oauth/index.d.ts +2 -2
  126. package/dist/plugins/generic-oauth/index.mjs +1 -1
  127. package/dist/plugins/haveibeenpwned/index.cjs +1 -1
  128. package/dist/plugins/haveibeenpwned/index.d.cts +2 -2
  129. package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
  130. package/dist/plugins/haveibeenpwned/index.d.ts +2 -2
  131. package/dist/plugins/haveibeenpwned/index.mjs +1 -1
  132. package/dist/plugins/index.cjs +7 -7
  133. package/dist/plugins/index.d.cts +5 -5
  134. package/dist/plugins/index.d.mts +5 -5
  135. package/dist/plugins/index.d.ts +5 -5
  136. package/dist/plugins/index.mjs +8 -8
  137. package/dist/plugins/jwt/index.cjs +1 -1
  138. package/dist/plugins/jwt/index.d.cts +2 -2
  139. package/dist/plugins/jwt/index.d.mts +2 -2
  140. package/dist/plugins/jwt/index.d.ts +2 -2
  141. package/dist/plugins/jwt/index.mjs +1 -1
  142. package/dist/plugins/magic-link/index.cjs +1 -1
  143. package/dist/plugins/magic-link/index.mjs +1 -1
  144. package/dist/plugins/multi-session/index.cjs +1 -1
  145. package/dist/plugins/multi-session/index.d.cts +2 -2
  146. package/dist/plugins/multi-session/index.d.mts +2 -2
  147. package/dist/plugins/multi-session/index.d.ts +2 -2
  148. package/dist/plugins/multi-session/index.mjs +1 -1
  149. package/dist/plugins/oauth-proxy/index.cjs +1 -1
  150. package/dist/plugins/oauth-proxy/index.d.cts +2 -2
  151. package/dist/plugins/oauth-proxy/index.d.mts +2 -2
  152. package/dist/plugins/oauth-proxy/index.d.ts +2 -2
  153. package/dist/plugins/oauth-proxy/index.mjs +1 -1
  154. package/dist/plugins/oidc-provider/index.cjs +2 -2
  155. package/dist/plugins/oidc-provider/index.d.cts +6 -6
  156. package/dist/plugins/oidc-provider/index.d.mts +6 -6
  157. package/dist/plugins/oidc-provider/index.d.ts +6 -6
  158. package/dist/plugins/oidc-provider/index.mjs +2 -2
  159. package/dist/plugins/one-tap/index.cjs +1 -1
  160. package/dist/plugins/one-tap/index.mjs +1 -1
  161. package/dist/plugins/one-time-token/index.cjs +3 -3
  162. package/dist/plugins/one-time-token/index.d.cts +2 -2
  163. package/dist/plugins/one-time-token/index.d.mts +2 -2
  164. package/dist/plugins/one-time-token/index.d.ts +2 -2
  165. package/dist/plugins/one-time-token/index.mjs +3 -3
  166. package/dist/plugins/open-api/index.cjs +1 -1
  167. package/dist/plugins/open-api/index.d.cts +2 -2
  168. package/dist/plugins/open-api/index.d.mts +2 -2
  169. package/dist/plugins/open-api/index.d.ts +2 -2
  170. package/dist/plugins/open-api/index.mjs +1 -1
  171. package/dist/plugins/organization/access/index.cjs +9 -4
  172. package/dist/plugins/organization/access/index.d.cts +56 -25
  173. package/dist/plugins/organization/access/index.d.mts +56 -25
  174. package/dist/plugins/organization/access/index.d.ts +56 -25
  175. package/dist/plugins/organization/access/index.mjs +9 -4
  176. package/dist/plugins/organization/index.cjs +4 -4
  177. package/dist/plugins/organization/index.d.cts +12104 -2664
  178. package/dist/plugins/organization/index.d.mts +12104 -2664
  179. package/dist/plugins/organization/index.d.ts +12104 -2664
  180. package/dist/plugins/organization/index.mjs +4 -4
  181. package/dist/plugins/passkey/index.cjs +1 -1
  182. package/dist/plugins/passkey/index.d.cts +2 -2
  183. package/dist/plugins/passkey/index.d.mts +2 -2
  184. package/dist/plugins/passkey/index.d.ts +2 -2
  185. package/dist/plugins/passkey/index.mjs +1 -1
  186. package/dist/plugins/phone-number/index.cjs +1 -1
  187. package/dist/plugins/phone-number/index.d.cts +2 -2
  188. package/dist/plugins/phone-number/index.d.mts +2 -2
  189. package/dist/plugins/phone-number/index.d.ts +2 -2
  190. package/dist/plugins/phone-number/index.mjs +1 -1
  191. package/dist/plugins/siwe/index.cjs +1 -1
  192. package/dist/plugins/siwe/index.d.cts +2 -2
  193. package/dist/plugins/siwe/index.d.mts +2 -2
  194. package/dist/plugins/siwe/index.d.ts +2 -2
  195. package/dist/plugins/siwe/index.mjs +1 -1
  196. package/dist/plugins/sso/index.cjs +1 -1
  197. package/dist/plugins/sso/index.d.cts +4 -4
  198. package/dist/plugins/sso/index.d.mts +4 -4
  199. package/dist/plugins/sso/index.d.ts +4 -4
  200. package/dist/plugins/sso/index.mjs +1 -1
  201. package/dist/plugins/two-factor/index.cjs +1 -1
  202. package/dist/plugins/two-factor/index.d.cts +2 -2
  203. package/dist/plugins/two-factor/index.d.mts +2 -2
  204. package/dist/plugins/two-factor/index.d.ts +2 -2
  205. package/dist/plugins/two-factor/index.mjs +1 -1
  206. package/dist/plugins/username/index.cjs +1 -1
  207. package/dist/plugins/username/index.d.cts +2 -2
  208. package/dist/plugins/username/index.d.mts +2 -2
  209. package/dist/plugins/username/index.d.ts +2 -2
  210. package/dist/plugins/username/index.mjs +1 -1
  211. package/dist/shared/{better-auth.BXZFHeKS.d.cts → better-auth.3m3MTRoL.d.cts} +1 -1
  212. package/dist/shared/{better-auth.BVRe9oUF.d.cts → better-auth.B2sdtpa-.d.cts} +2 -13
  213. package/dist/shared/{better-auth.srwANuMX.cjs → better-auth.B4ss9kvz.cjs} +1798 -247
  214. package/dist/shared/{better-auth.B4s085TW.cjs → better-auth.BEsywhdZ.cjs} +1 -7
  215. package/dist/shared/{better-auth.DygnLQW5.mjs → better-auth.BI4JniQN.mjs} +1 -7
  216. package/dist/shared/{better-auth.BZ1rl9jb.cjs → better-auth.BKTHmemy.cjs} +1 -1
  217. package/dist/shared/{better-auth.B5XPvU4V.d.mts → better-auth.BKoHQyy0.d.mts} +1 -1
  218. package/dist/shared/{better-auth.BYiXvdJQ.cjs → better-auth.BUvUa_Fh.cjs} +9 -1
  219. package/dist/shared/{better-auth.CApDACtr.mjs → better-auth.B_KS59W1.mjs} +1798 -247
  220. package/dist/shared/{better-auth.BpZ2qzWn.d.mts → better-auth.BeqVmFDy.d.mts} +1 -1
  221. package/dist/shared/{better-auth.Ctgkdy7x.d.mts → better-auth.Bh5GST-4.d.mts} +1 -1
  222. package/dist/shared/better-auth.BusfdPsj.cjs +87 -0
  223. package/dist/shared/{better-auth.efEqxJ3k.d.mts → better-auth.CBUKWpSt.d.mts} +2 -13
  224. package/dist/shared/{better-auth.DX9TcqCt.mjs → better-auth.CBdfkPoe.mjs} +1 -1
  225. package/dist/shared/{better-auth.BDe8YvTr.cjs → better-auth.CZpfmhXT.cjs} +1 -1
  226. package/dist/shared/{better-auth.BF-28VnX.d.mts → better-auth.Cl6lMoDP.d.mts} +1 -1
  227. package/dist/shared/{better-auth.BhdSraHG.cjs → better-auth.CnfAXqRG.cjs} +1 -1
  228. package/dist/shared/{better-auth.lTCLLcGt.d.ts → better-auth.CrW7XRZx.d.ts} +1 -1
  229. package/dist/shared/{better-auth.CnJoIxG_.d.ts → better-auth.CySkohPi.d.ts} +2 -13
  230. package/dist/shared/{better-auth._2xnM2S3.mjs → better-auth.D7PawI_-.mjs} +1 -12
  231. package/dist/shared/{better-auth.BLYxY3m3.d.ts → better-auth.DLXmZJi-.d.ts} +1 -1
  232. package/dist/shared/better-auth.DOFt_82p.mjs +70 -0
  233. package/dist/shared/{better-auth.Ca_NjiGd.d.cts → better-auth.DUztHusY.d.cts} +1 -1
  234. package/dist/shared/{better-auth.CxKBteqV.cjs → better-auth.Di5iHMA7.cjs} +1 -1
  235. package/dist/shared/{better-auth.BgjEx6dy.d.cts → better-auth.DqvNU_YJ.d.cts} +1 -1
  236. package/dist/shared/{better-auth.CG9DHk60.mjs → better-auth.DskHRUA7.mjs} +9 -1
  237. package/dist/shared/{better-auth.DNf2m_JT.d.ts → better-auth.Du6fl8yS.d.ts} +1 -1
  238. package/dist/shared/{better-auth.g2ow3cc2.cjs → better-auth.NTJWm3qM.cjs} +0 -12
  239. package/dist/shared/{better-auth.DqbGTNEt.mjs → better-auth.PPeYAZw9.mjs} +1 -1
  240. package/dist/shared/{better-auth.BcTT5K5S.mjs → better-auth.ifuaFFT6.mjs} +1 -1
  241. package/dist/shared/{better-auth.vI-5STVo.mjs → better-auth.ni8tK7Wv.mjs} +2 -2
  242. package/dist/shared/{better-auth.K0z8EJFS.mjs → better-auth.sJR84kSG.mjs} +1 -1
  243. package/dist/shared/{better-auth.D7tWjP25.d.cts → better-auth.ucmRbPom.d.cts} +1 -1
  244. package/dist/shared/{better-auth.BCH1iVsI.d.ts → better-auth.v9lHrfe7.d.ts} +1 -1
  245. package/dist/shared/{better-auth.Cm_V_J8I.cjs → better-auth.yYFlLPlP.cjs} +2 -2
  246. package/dist/social-providers/index.cjs +1 -2
  247. package/dist/social-providers/index.d.cts +1 -1
  248. package/dist/social-providers/index.d.mts +1 -1
  249. package/dist/social-providers/index.d.ts +1 -1
  250. package/dist/social-providers/index.mjs +1 -1
  251. package/dist/test-utils/index.cjs +5 -5
  252. package/dist/test-utils/index.d.cts +3 -3
  253. package/dist/test-utils/index.d.mts +3 -3
  254. package/dist/test-utils/index.d.ts +3 -3
  255. package/dist/test-utils/index.mjs +5 -5
  256. package/dist/types/index.d.cts +3 -3
  257. package/dist/types/index.d.mts +3 -3
  258. package/dist/types/index.d.ts +3 -3
  259. package/package.json +1 -1
  260. package/dist/shared/better-auth.D7N9YNr5.cjs +0 -25
  261. package/dist/shared/better-auth.Dt0CvI2z.mjs +0 -23
@@ -1,12 +1,12 @@
1
- import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember } from '../../plugins/organization/index.cjs';
1
+ import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember, OrganizationRole } from '../../plugins/organization/index.cjs';
2
2
  import { AccessControl, Role, Statements } from '../../plugins/access/index.cjs';
3
- import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.BXZFHeKS.cjs';
3
+ import * as nanostores from 'nanostores';
4
+ import { atom } from 'nanostores';
5
+ import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.3m3MTRoL.cjs';
4
6
  import { a as Prettify } from '../../shared/better-auth.DTtXpZYr.cjs';
5
- import { S as SessionQueryParams, e as Store } from '../../shared/better-auth.BgjEx6dy.cjs';
7
+ import { e as Store, C as ClientOptions, S as SessionQueryParams } from '../../shared/better-auth.DqvNU_YJ.cjs';
6
8
  import * as _better_fetch_fetch from '@better-fetch/fetch';
7
9
  import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
8
- import * as nanostores from 'nanostores';
9
- import { atom } from 'nanostores';
10
10
  import { username } from '../../plugins/username/index.cjs';
11
11
  import { Session } from 'inspector';
12
12
  import { Passkey, passkey } from '../../plugins/passkey/index.cjs';
@@ -21,7 +21,7 @@ import { multiSession } from '../../plugins/multi-session/index.cjs';
21
21
  import { emailOTP } from '../../plugins/email-otp/index.cjs';
22
22
  import { sso } from '../../plugins/sso/index.cjs';
23
23
  import { oidcProvider } from '../../plugins/oidc-provider/index.cjs';
24
- import { a as apiKey } from '../../shared/better-auth.D7tWjP25.cjs';
24
+ import { a as apiKey } from '../../shared/better-auth.ucmRbPom.cjs';
25
25
  import { oneTimeToken } from '../../plugins/one-time-token/index.cjs';
26
26
  import { siwe } from '../../plugins/siwe/index.cjs';
27
27
  export { deviceAuthorizationClient } from '../../plugins/device-authorization/index.cjs';
@@ -31,7 +31,7 @@ import 'zod/v4';
31
31
  import 'better-call';
32
32
  import '../../plugins/organization/access/index.cjs';
33
33
  import 'kysely';
34
- import '../../shared/better-auth.BVRe9oUF.cjs';
34
+ import '../../shared/better-auth.B2sdtpa-.cjs';
35
35
  import 'jose';
36
36
  import 'zod/v4/core';
37
37
  import 'zod';
@@ -68,6 +68,14 @@ interface OrganizationClientOptions {
68
68
  [key: string]: FieldAttribute;
69
69
  };
70
70
  };
71
+ organizationRole?: {
72
+ additionalFields?: {
73
+ [key: string]: FieldAttribute;
74
+ };
75
+ };
76
+ };
77
+ dynamicAccessControl?: {
78
+ enabled: boolean;
71
79
  };
72
80
  }
73
81
  declare const organizationClient: <CO extends OrganizationClientOptions>(options?: CO) => {
@@ -78,6 +86,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
78
86
  readonly member: readonly ["create", "update", "delete"];
79
87
  readonly invitation: readonly ["create", "cancel"];
80
88
  readonly team: readonly ["create", "update", "delete"];
89
+ readonly ac: readonly ["create", "read", "update", "delete"];
81
90
  }>;
82
91
  roles: CO["roles"] extends Record<string, Role> ? CO["roles"] : {
83
92
  admin: Role;
@@ -90,8 +99,13 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
90
99
  } ? true : false;
91
100
  };
92
101
  schema: CO["schema"];
102
+ dynamicAccessControl: {
103
+ enabled: CO["dynamicAccessControl"] extends {
104
+ enabled: true;
105
+ } ? true : false;
106
+ };
93
107
  }>>;
94
- getActions: ($fetch: _better_fetch_fetch.BetterFetch) => {
108
+ getActions: ($fetch: _better_fetch_fetch.BetterFetch, _$store: Store, co: ClientOptions | undefined) => {
95
109
  $Infer: {
96
110
  ActiveOrganization: CO["teams"] extends {
97
111
  enabled: true;
@@ -134,16 +148,19 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
134
148
  readonly member: readonly ["create", "update", "delete"];
135
149
  readonly invitation: readonly ["create", "cancel"];
136
150
  readonly team: readonly ["create", "update", "delete"];
151
+ readonly ac: readonly ["create", "read", "update", "delete"];
137
152
  })]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
138
153
  readonly organization: readonly ["update", "delete"];
139
154
  readonly member: readonly ["create", "update", "delete"];
140
155
  readonly invitation: readonly ["create", "cancel"];
141
156
  readonly team: readonly ["create", "update", "delete"];
157
+ readonly ac: readonly ["create", "read", "update", "delete"];
142
158
  })[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
143
159
  readonly organization: readonly ["update", "delete"];
144
160
  readonly member: readonly ["create", "update", "delete"];
145
161
  readonly invitation: readonly ["create", "cancel"];
146
162
  readonly team: readonly ["create", "update", "delete"];
163
+ readonly ac: readonly ["create", "read", "update", "delete"];
147
164
  })[key][number] : never)[] | undefined; };
148
165
  permissions?: never;
149
166
  } | {
@@ -152,21 +169,24 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
152
169
  readonly member: readonly ["create", "update", "delete"];
153
170
  readonly invitation: readonly ["create", "cancel"];
154
171
  readonly team: readonly ["create", "update", "delete"];
172
+ readonly ac: readonly ["create", "read", "update", "delete"];
155
173
  })]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
156
174
  readonly organization: readonly ["update", "delete"];
157
175
  readonly member: readonly ["create", "update", "delete"];
158
176
  readonly invitation: readonly ["create", "cancel"];
159
177
  readonly team: readonly ["create", "update", "delete"];
178
+ readonly ac: readonly ["create", "read", "update", "delete"];
160
179
  })[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
161
180
  readonly organization: readonly ["update", "delete"];
162
181
  readonly member: readonly ["create", "update", "delete"];
163
182
  readonly invitation: readonly ["create", "cancel"];
164
183
  readonly team: readonly ["create", "update", "delete"];
184
+ readonly ac: readonly ["create", "read", "update", "delete"];
165
185
  })[key][number] : never)[] | undefined; };
166
186
  permission?: never;
167
187
  }) & {
168
188
  role: R;
169
- }) => boolean;
189
+ }) => Promise<boolean>;
170
190
  };
171
191
  };
172
192
  getAtoms: ($fetch: _better_fetch_fetch.BetterFetch) => {
@@ -281,6 +301,11 @@ declare const inferOrgAdditionalFields: <O extends {
281
301
  modelName?: string;
282
302
  fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
283
303
  };
304
+ organizationRole?: {
305
+ modelName?: string;
306
+ fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
307
+ additionalFields?: { [key in string]: FieldAttribute; };
308
+ };
284
309
  } ? O : ((O extends {
285
310
  options: any;
286
311
  } ? O : {
@@ -330,6 +355,11 @@ declare const inferOrgAdditionalFields: <O extends {
330
355
  modelName?: string;
331
356
  fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
332
357
  };
358
+ organizationRole?: {
359
+ modelName?: string;
360
+ fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
361
+ additionalFields?: { [key in string]: FieldAttribute; };
362
+ };
333
363
  } | undefined ? S_1 : undefined : undefined : undefined : S;
334
364
 
335
365
  declare const usernameClient: () => {
@@ -1,12 +1,12 @@
1
- import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember } from '../../plugins/organization/index.mjs';
1
+ import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember, OrganizationRole } from '../../plugins/organization/index.mjs';
2
2
  import { AccessControl, Role, Statements } from '../../plugins/access/index.mjs';
3
- import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.BpZ2qzWn.mjs';
3
+ import * as nanostores from 'nanostores';
4
+ import { atom } from 'nanostores';
5
+ import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.BeqVmFDy.mjs';
4
6
  import { a as Prettify } from '../../shared/better-auth.DTtXpZYr.mjs';
5
- import { S as SessionQueryParams, e as Store } from '../../shared/better-auth.Ctgkdy7x.mjs';
7
+ import { e as Store, C as ClientOptions, S as SessionQueryParams } from '../../shared/better-auth.Bh5GST-4.mjs';
6
8
  import * as _better_fetch_fetch from '@better-fetch/fetch';
7
9
  import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
8
- import * as nanostores from 'nanostores';
9
- import { atom } from 'nanostores';
10
10
  import { username } from '../../plugins/username/index.mjs';
11
11
  import { Session } from 'inspector';
12
12
  import { Passkey, passkey } from '../../plugins/passkey/index.mjs';
@@ -21,7 +21,7 @@ import { multiSession } from '../../plugins/multi-session/index.mjs';
21
21
  import { emailOTP } from '../../plugins/email-otp/index.mjs';
22
22
  import { sso } from '../../plugins/sso/index.mjs';
23
23
  import { oidcProvider } from '../../plugins/oidc-provider/index.mjs';
24
- import { a as apiKey } from '../../shared/better-auth.B5XPvU4V.mjs';
24
+ import { a as apiKey } from '../../shared/better-auth.BKoHQyy0.mjs';
25
25
  import { oneTimeToken } from '../../plugins/one-time-token/index.mjs';
26
26
  import { siwe } from '../../plugins/siwe/index.mjs';
27
27
  export { deviceAuthorizationClient } from '../../plugins/device-authorization/index.mjs';
@@ -31,7 +31,7 @@ import 'zod/v4';
31
31
  import 'better-call';
32
32
  import '../../plugins/organization/access/index.mjs';
33
33
  import 'kysely';
34
- import '../../shared/better-auth.efEqxJ3k.mjs';
34
+ import '../../shared/better-auth.CBUKWpSt.mjs';
35
35
  import 'jose';
36
36
  import 'zod/v4/core';
37
37
  import 'zod';
@@ -68,6 +68,14 @@ interface OrganizationClientOptions {
68
68
  [key: string]: FieldAttribute;
69
69
  };
70
70
  };
71
+ organizationRole?: {
72
+ additionalFields?: {
73
+ [key: string]: FieldAttribute;
74
+ };
75
+ };
76
+ };
77
+ dynamicAccessControl?: {
78
+ enabled: boolean;
71
79
  };
72
80
  }
73
81
  declare const organizationClient: <CO extends OrganizationClientOptions>(options?: CO) => {
@@ -78,6 +86,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
78
86
  readonly member: readonly ["create", "update", "delete"];
79
87
  readonly invitation: readonly ["create", "cancel"];
80
88
  readonly team: readonly ["create", "update", "delete"];
89
+ readonly ac: readonly ["create", "read", "update", "delete"];
81
90
  }>;
82
91
  roles: CO["roles"] extends Record<string, Role> ? CO["roles"] : {
83
92
  admin: Role;
@@ -90,8 +99,13 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
90
99
  } ? true : false;
91
100
  };
92
101
  schema: CO["schema"];
102
+ dynamicAccessControl: {
103
+ enabled: CO["dynamicAccessControl"] extends {
104
+ enabled: true;
105
+ } ? true : false;
106
+ };
93
107
  }>>;
94
- getActions: ($fetch: _better_fetch_fetch.BetterFetch) => {
108
+ getActions: ($fetch: _better_fetch_fetch.BetterFetch, _$store: Store, co: ClientOptions | undefined) => {
95
109
  $Infer: {
96
110
  ActiveOrganization: CO["teams"] extends {
97
111
  enabled: true;
@@ -134,16 +148,19 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
134
148
  readonly member: readonly ["create", "update", "delete"];
135
149
  readonly invitation: readonly ["create", "cancel"];
136
150
  readonly team: readonly ["create", "update", "delete"];
151
+ readonly ac: readonly ["create", "read", "update", "delete"];
137
152
  })]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
138
153
  readonly organization: readonly ["update", "delete"];
139
154
  readonly member: readonly ["create", "update", "delete"];
140
155
  readonly invitation: readonly ["create", "cancel"];
141
156
  readonly team: readonly ["create", "update", "delete"];
157
+ readonly ac: readonly ["create", "read", "update", "delete"];
142
158
  })[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
143
159
  readonly organization: readonly ["update", "delete"];
144
160
  readonly member: readonly ["create", "update", "delete"];
145
161
  readonly invitation: readonly ["create", "cancel"];
146
162
  readonly team: readonly ["create", "update", "delete"];
163
+ readonly ac: readonly ["create", "read", "update", "delete"];
147
164
  })[key][number] : never)[] | undefined; };
148
165
  permissions?: never;
149
166
  } | {
@@ -152,21 +169,24 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
152
169
  readonly member: readonly ["create", "update", "delete"];
153
170
  readonly invitation: readonly ["create", "cancel"];
154
171
  readonly team: readonly ["create", "update", "delete"];
172
+ readonly ac: readonly ["create", "read", "update", "delete"];
155
173
  })]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
156
174
  readonly organization: readonly ["update", "delete"];
157
175
  readonly member: readonly ["create", "update", "delete"];
158
176
  readonly invitation: readonly ["create", "cancel"];
159
177
  readonly team: readonly ["create", "update", "delete"];
178
+ readonly ac: readonly ["create", "read", "update", "delete"];
160
179
  })[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
161
180
  readonly organization: readonly ["update", "delete"];
162
181
  readonly member: readonly ["create", "update", "delete"];
163
182
  readonly invitation: readonly ["create", "cancel"];
164
183
  readonly team: readonly ["create", "update", "delete"];
184
+ readonly ac: readonly ["create", "read", "update", "delete"];
165
185
  })[key][number] : never)[] | undefined; };
166
186
  permission?: never;
167
187
  }) & {
168
188
  role: R;
169
- }) => boolean;
189
+ }) => Promise<boolean>;
170
190
  };
171
191
  };
172
192
  getAtoms: ($fetch: _better_fetch_fetch.BetterFetch) => {
@@ -281,6 +301,11 @@ declare const inferOrgAdditionalFields: <O extends {
281
301
  modelName?: string;
282
302
  fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
283
303
  };
304
+ organizationRole?: {
305
+ modelName?: string;
306
+ fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
307
+ additionalFields?: { [key in string]: FieldAttribute; };
308
+ };
284
309
  } ? O : ((O extends {
285
310
  options: any;
286
311
  } ? O : {
@@ -330,6 +355,11 @@ declare const inferOrgAdditionalFields: <O extends {
330
355
  modelName?: string;
331
356
  fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
332
357
  };
358
+ organizationRole?: {
359
+ modelName?: string;
360
+ fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
361
+ additionalFields?: { [key in string]: FieldAttribute; };
362
+ };
333
363
  } | undefined ? S_1 : undefined : undefined : undefined : S;
334
364
 
335
365
  declare const usernameClient: () => {
@@ -1,12 +1,12 @@
1
- import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember } from '../../plugins/organization/index.js';
1
+ import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation, OrganizationOptions, TeamMember, OrganizationRole } from '../../plugins/organization/index.js';
2
2
  import { AccessControl, Role, Statements } from '../../plugins/access/index.js';
3
- import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.BCH1iVsI.js';
3
+ import * as nanostores from 'nanostores';
4
+ import { atom } from 'nanostores';
5
+ import { J as FieldAttribute, B as BetterAuthOptions, U as User, h as BetterAuthPlugin } from '../../shared/better-auth.v9lHrfe7.js';
4
6
  import { a as Prettify } from '../../shared/better-auth.DTtXpZYr.js';
5
- import { S as SessionQueryParams, e as Store } from '../../shared/better-auth.BLYxY3m3.js';
7
+ import { e as Store, C as ClientOptions, S as SessionQueryParams } from '../../shared/better-auth.DLXmZJi-.js';
6
8
  import * as _better_fetch_fetch from '@better-fetch/fetch';
7
9
  import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
8
- import * as nanostores from 'nanostores';
9
- import { atom } from 'nanostores';
10
10
  import { username } from '../../plugins/username/index.js';
11
11
  import { Session } from 'inspector';
12
12
  import { Passkey, passkey } from '../../plugins/passkey/index.js';
@@ -21,7 +21,7 @@ import { multiSession } from '../../plugins/multi-session/index.js';
21
21
  import { emailOTP } from '../../plugins/email-otp/index.js';
22
22
  import { sso } from '../../plugins/sso/index.js';
23
23
  import { oidcProvider } from '../../plugins/oidc-provider/index.js';
24
- import { a as apiKey } from '../../shared/better-auth.lTCLLcGt.js';
24
+ import { a as apiKey } from '../../shared/better-auth.CrW7XRZx.js';
25
25
  import { oneTimeToken } from '../../plugins/one-time-token/index.js';
26
26
  import { siwe } from '../../plugins/siwe/index.js';
27
27
  export { deviceAuthorizationClient } from '../../plugins/device-authorization/index.js';
@@ -31,7 +31,7 @@ import 'zod/v4';
31
31
  import 'better-call';
32
32
  import '../../plugins/organization/access/index.js';
33
33
  import 'kysely';
34
- import '../../shared/better-auth.CnJoIxG_.js';
34
+ import '../../shared/better-auth.CySkohPi.js';
35
35
  import 'jose';
36
36
  import 'zod/v4/core';
37
37
  import 'zod';
@@ -68,6 +68,14 @@ interface OrganizationClientOptions {
68
68
  [key: string]: FieldAttribute;
69
69
  };
70
70
  };
71
+ organizationRole?: {
72
+ additionalFields?: {
73
+ [key: string]: FieldAttribute;
74
+ };
75
+ };
76
+ };
77
+ dynamicAccessControl?: {
78
+ enabled: boolean;
71
79
  };
72
80
  }
73
81
  declare const organizationClient: <CO extends OrganizationClientOptions>(options?: CO) => {
@@ -78,6 +86,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
78
86
  readonly member: readonly ["create", "update", "delete"];
79
87
  readonly invitation: readonly ["create", "cancel"];
80
88
  readonly team: readonly ["create", "update", "delete"];
89
+ readonly ac: readonly ["create", "read", "update", "delete"];
81
90
  }>;
82
91
  roles: CO["roles"] extends Record<string, Role> ? CO["roles"] : {
83
92
  admin: Role;
@@ -90,8 +99,13 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
90
99
  } ? true : false;
91
100
  };
92
101
  schema: CO["schema"];
102
+ dynamicAccessControl: {
103
+ enabled: CO["dynamicAccessControl"] extends {
104
+ enabled: true;
105
+ } ? true : false;
106
+ };
93
107
  }>>;
94
- getActions: ($fetch: _better_fetch_fetch.BetterFetch) => {
108
+ getActions: ($fetch: _better_fetch_fetch.BetterFetch, _$store: Store, co: ClientOptions | undefined) => {
95
109
  $Infer: {
96
110
  ActiveOrganization: CO["teams"] extends {
97
111
  enabled: true;
@@ -134,16 +148,19 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
134
148
  readonly member: readonly ["create", "update", "delete"];
135
149
  readonly invitation: readonly ["create", "cancel"];
136
150
  readonly team: readonly ["create", "update", "delete"];
151
+ readonly ac: readonly ["create", "read", "update", "delete"];
137
152
  })]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
138
153
  readonly organization: readonly ["update", "delete"];
139
154
  readonly member: readonly ["create", "update", "delete"];
140
155
  readonly invitation: readonly ["create", "cancel"];
141
156
  readonly team: readonly ["create", "update", "delete"];
157
+ readonly ac: readonly ["create", "read", "update", "delete"];
142
158
  })[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
143
159
  readonly organization: readonly ["update", "delete"];
144
160
  readonly member: readonly ["create", "update", "delete"];
145
161
  readonly invitation: readonly ["create", "cancel"];
146
162
  readonly team: readonly ["create", "update", "delete"];
163
+ readonly ac: readonly ["create", "read", "update", "delete"];
147
164
  })[key][number] : never)[] | undefined; };
148
165
  permissions?: never;
149
166
  } | {
@@ -152,21 +169,24 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
152
169
  readonly member: readonly ["create", "update", "delete"];
153
170
  readonly invitation: readonly ["create", "cancel"];
154
171
  readonly team: readonly ["create", "update", "delete"];
172
+ readonly ac: readonly ["create", "read", "update", "delete"];
155
173
  })]?: ((CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
156
174
  readonly organization: readonly ["update", "delete"];
157
175
  readonly member: readonly ["create", "update", "delete"];
158
176
  readonly invitation: readonly ["create", "cancel"];
159
177
  readonly team: readonly ["create", "update", "delete"];
178
+ readonly ac: readonly ["create", "read", "update", "delete"];
160
179
  })[key] extends readonly unknown[] ? (CO["ac"] extends AccessControl<infer S extends Statements> ? S : {
161
180
  readonly organization: readonly ["update", "delete"];
162
181
  readonly member: readonly ["create", "update", "delete"];
163
182
  readonly invitation: readonly ["create", "cancel"];
164
183
  readonly team: readonly ["create", "update", "delete"];
184
+ readonly ac: readonly ["create", "read", "update", "delete"];
165
185
  })[key][number] : never)[] | undefined; };
166
186
  permission?: never;
167
187
  }) & {
168
188
  role: R;
169
- }) => boolean;
189
+ }) => Promise<boolean>;
170
190
  };
171
191
  };
172
192
  getAtoms: ($fetch: _better_fetch_fetch.BetterFetch) => {
@@ -281,6 +301,11 @@ declare const inferOrgAdditionalFields: <O extends {
281
301
  modelName?: string;
282
302
  fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
283
303
  };
304
+ organizationRole?: {
305
+ modelName?: string;
306
+ fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
307
+ additionalFields?: { [key in string]: FieldAttribute; };
308
+ };
284
309
  } ? O : ((O extends {
285
310
  options: any;
286
311
  } ? O : {
@@ -330,6 +355,11 @@ declare const inferOrgAdditionalFields: <O extends {
330
355
  modelName?: string;
331
356
  fields?: { [key in keyof Omit<TeamMember, "id">]?: string; };
332
357
  };
358
+ organizationRole?: {
359
+ modelName?: string;
360
+ fields?: { [key in keyof Omit<OrganizationRole, "id">]?: string; };
361
+ additionalFields?: { [key in string]: FieldAttribute; };
362
+ };
333
363
  } | undefined ? S_1 : undefined : undefined : undefined : S;
334
364
 
335
365
  declare const usernameClient: () => {
@@ -3,14 +3,42 @@ import '@better-fetch/fetch';
3
3
  import '../../shared/better-auth.CMQ3rA-I.mjs';
4
4
  import { u as useAuthQuery } from '../../shared/better-auth.kTs0zHGZ.mjs';
5
5
  import { ownerAc, memberAc, adminAc } from '../../plugins/organization/access/index.mjs';
6
- import { h as hasPermission } from '../../shared/better-auth.Dt0CvI2z.mjs';
6
+ import { c as clientSideHasPermission } from '../../shared/better-auth.DOFt_82p.mjs';
7
7
  import { startRegistration, WebAuthnError, startAuthentication } from '@simplewebauthn/browser';
8
8
  export { t as twoFactorClient } from '../../shared/better-auth.Ddw8bVyV.mjs';
9
9
  import { userAc, adminAc as adminAc$1 } from '../../plugins/admin/access/index.mjs';
10
- import { h as hasPermission$1 } from '../../shared/better-auth.bkwPl2G4.mjs';
10
+ import { h as hasPermission } from '../../shared/better-auth.bkwPl2G4.mjs';
11
+ import 'zod/v4';
12
+ import 'better-call';
13
+ import '../../shared/better-auth.D7PawI_-.mjs';
14
+ import '../../shared/better-auth.DV5EHeYG.mjs';
15
+ import '@better-auth/utils/base64';
16
+ import '@better-auth/utils/hmac';
17
+ import '../../shared/better-auth.BjBlybv-.mjs';
18
+ import '@better-auth/utils/binary';
19
+ import '../../shared/better-auth.n2KFGwjY.mjs';
11
20
  export { d as deviceAuthorizationClient } from '../../shared/better-auth.BpA03GIs.mjs';
12
21
  import '../../plugins/access/index.mjs';
13
22
  import '../../shared/better-auth.DdzSJf-n.mjs';
23
+ import '../../shared/better-auth.CW6D9eSx.mjs';
24
+ import '@better-auth/utils/hash';
25
+ import '../../crypto/index.mjs';
26
+ import '@noble/ciphers/chacha';
27
+ import '@noble/ciphers/utils';
28
+ import '@noble/ciphers/webcrypto';
29
+ import 'jose';
30
+ import '@noble/hashes/scrypt';
31
+ import '@better-auth/utils';
32
+ import '@better-auth/utils/hex';
33
+ import '@noble/hashes/utils';
34
+ import '../../shared/better-auth.B4Qoxdgc.mjs';
35
+ import '@better-auth/utils/random';
36
+ import '../../shared/better-auth.CuS_eDdK.mjs';
37
+ import '../../shared/better-auth.UfVWArIB.mjs';
38
+ import '../../shared/better-auth.BZZKN1g7.mjs';
39
+ import 'jose/errors';
40
+ import '../../shared/better-auth.BUPPRXfK.mjs';
41
+ import 'defu';
14
42
 
15
43
  const organizationClient = (options) => {
16
44
  const $listOrg = atom(false);
@@ -25,7 +53,7 @@ const organizationClient = (options) => {
25
53
  return {
26
54
  id: "organization",
27
55
  $InferServerPlugin: {},
28
- getActions: ($fetch) => ({
56
+ getActions: ($fetch, _$store, co) => ({
29
57
  $Infer: {
30
58
  ActiveOrganization: {},
31
59
  Organization: {},
@@ -35,7 +63,7 @@ const organizationClient = (options) => {
35
63
  },
36
64
  organization: {
37
65
  checkRolePermission: (data) => {
38
- const isAuthorized = hasPermission({
66
+ const isAuthorized = clientSideHasPermission({
39
67
  role: data.role,
40
68
  options: {
41
69
  ac: options?.ac,
@@ -348,7 +376,7 @@ const adminClient = (options) => {
348
376
  getActions: () => ({
349
377
  admin: {
350
378
  checkRolePermission: (data) => {
351
- const isAuthorized = hasPermission$1({
379
+ const isAuthorized = hasPermission({
352
380
  role: data.role,
353
381
  options: {
354
382
  ac: options?.ac,
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const proxy = require('../../shared/better-auth.B4s085TW.cjs');
3
+ const proxy = require('../../shared/better-auth.BEsywhdZ.cjs');
4
4
  const nanostores = require('nanostores');
5
5
  const react = require('react');
6
6
  require('@better-fetch/fetch');
@@ -4,14 +4,14 @@ export * from 'nanostores';
4
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
5
5
  import { BetterFetchError } from '@better-fetch/fetch';
6
6
  export * from '@better-fetch/fetch';
7
- import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.BgjEx6dy.cjs';
7
+ import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.DqvNU_YJ.cjs';
8
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.DTtXpZYr.cjs';
9
9
  import { DependencyList } from 'react';
10
- import { f as BASE_ERROR_CODES } from '../../shared/better-auth.BXZFHeKS.cjs';
10
+ import { f as BASE_ERROR_CODES } from '../../shared/better-auth.3m3MTRoL.cjs';
11
11
  import 'better-call';
12
12
  import 'kysely';
13
13
  import 'zod/v4';
14
- import '../../shared/better-auth.BVRe9oUF.cjs';
14
+ import '../../shared/better-auth.B2sdtpa-.cjs';
15
15
  import 'jose';
16
16
  import 'zod/v4/core';
17
17
  import 'zod';
@@ -69,15 +69,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
69
69
  data: InferClientAPI<Option> extends {
70
70
  getSession: () => Promise<infer Res>;
71
71
  } ? Res extends {
72
+ data: infer S;
73
+ error: null;
74
+ } | {
72
75
  data: null;
73
76
  error: {
74
77
  message?: string | undefined;
75
78
  status: number;
76
79
  statusText: string;
77
80
  };
78
- } | {
79
- data: infer S;
80
- error: null;
81
81
  } ? S : Res : never;
82
82
  isPending: boolean;
83
83
  error: BetterFetchError | null;
@@ -89,15 +89,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
89
89
  Session: NonNullable<InferClientAPI<Option> extends {
90
90
  getSession: () => Promise<infer Res>;
91
91
  } ? Res extends {
92
+ data: infer S;
93
+ error: null;
94
+ } | {
92
95
  data: null;
93
96
  error: {
94
97
  message?: string | undefined;
95
98
  status: number;
96
99
  statusText: string;
97
100
  };
98
- } | {
99
- data: infer S;
100
- error: null;
101
101
  } ? S : Res : never>;
102
102
  };
103
103
  $fetch: _better_fetch_fetch.BetterFetch<{
@@ -4,14 +4,14 @@ export * from 'nanostores';
4
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
5
5
  import { BetterFetchError } from '@better-fetch/fetch';
6
6
  export * from '@better-fetch/fetch';
7
- import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.Ctgkdy7x.mjs';
7
+ import { C as ClientOptions, B as BetterAuthClientPlugin, I as IsSignal, a as InferClientAPI, b as InferActions, S as SessionQueryParams, c as InferErrorCodes } from '../../shared/better-auth.Bh5GST-4.mjs';
8
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.DTtXpZYr.mjs';
9
9
  import { DependencyList } from 'react';
10
- import { f as BASE_ERROR_CODES } from '../../shared/better-auth.BpZ2qzWn.mjs';
10
+ import { f as BASE_ERROR_CODES } from '../../shared/better-auth.BeqVmFDy.mjs';
11
11
  import 'better-call';
12
12
  import 'kysely';
13
13
  import 'zod/v4';
14
- import '../../shared/better-auth.efEqxJ3k.mjs';
14
+ import '../../shared/better-auth.CBUKWpSt.mjs';
15
15
  import 'jose';
16
16
  import 'zod/v4/core';
17
17
  import 'zod';
@@ -69,15 +69,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
69
69
  data: InferClientAPI<Option> extends {
70
70
  getSession: () => Promise<infer Res>;
71
71
  } ? Res extends {
72
+ data: infer S;
73
+ error: null;
74
+ } | {
72
75
  data: null;
73
76
  error: {
74
77
  message?: string | undefined;
75
78
  status: number;
76
79
  statusText: string;
77
80
  };
78
- } | {
79
- data: infer S;
80
- error: null;
81
81
  } ? S : Res : never;
82
82
  isPending: boolean;
83
83
  error: BetterFetchError | null;
@@ -89,15 +89,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
89
89
  Session: NonNullable<InferClientAPI<Option> extends {
90
90
  getSession: () => Promise<infer Res>;
91
91
  } ? Res extends {
92
+ data: infer S;
93
+ error: null;
94
+ } | {
92
95
  data: null;
93
96
  error: {
94
97
  message?: string | undefined;
95
98
  status: number;
96
99
  statusText: string;
97
100
  };
98
- } | {
99
- data: infer S;
100
- error: null;
101
101
  } ? S : Res : never>;
102
102
  };
103
103
  $fetch: _better_fetch_fetch.BetterFetch<{