better-auth 1.3.8 → 1.3.9-beta.2

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 (267) hide show
  1. package/dist/adapters/drizzle-adapter/index.cjs +16 -0
  2. package/dist/adapters/drizzle-adapter/index.d.cts +2 -2
  3. package/dist/adapters/drizzle-adapter/index.d.mts +2 -2
  4. package/dist/adapters/drizzle-adapter/index.d.ts +2 -2
  5. package/dist/adapters/drizzle-adapter/index.mjs +17 -1
  6. package/dist/adapters/index.d.cts +3 -3
  7. package/dist/adapters/index.d.mts +3 -3
  8. package/dist/adapters/index.d.ts +3 -3
  9. package/dist/adapters/kysely-adapter/index.cjs +1 -1
  10. package/dist/adapters/kysely-adapter/index.d.cts +2 -2
  11. package/dist/adapters/kysely-adapter/index.d.mts +2 -2
  12. package/dist/adapters/kysely-adapter/index.d.ts +2 -2
  13. package/dist/adapters/kysely-adapter/index.mjs +1 -1
  14. package/dist/adapters/memory-adapter/index.cjs +1 -1
  15. package/dist/adapters/memory-adapter/index.d.cts +2 -2
  16. package/dist/adapters/memory-adapter/index.d.mts +2 -2
  17. package/dist/adapters/memory-adapter/index.d.ts +2 -2
  18. package/dist/adapters/memory-adapter/index.mjs +1 -1
  19. package/dist/adapters/mongodb-adapter/index.cjs +1 -1
  20. package/dist/adapters/mongodb-adapter/index.d.cts +2 -2
  21. package/dist/adapters/mongodb-adapter/index.d.mts +2 -2
  22. package/dist/adapters/mongodb-adapter/index.d.ts +2 -2
  23. package/dist/adapters/mongodb-adapter/index.mjs +1 -1
  24. package/dist/adapters/prisma-adapter/index.cjs +2 -0
  25. package/dist/adapters/prisma-adapter/index.d.cts +2 -2
  26. package/dist/adapters/prisma-adapter/index.d.mts +2 -2
  27. package/dist/adapters/prisma-adapter/index.d.ts +2 -2
  28. package/dist/adapters/prisma-adapter/index.mjs +2 -0
  29. package/dist/adapters/test.cjs +44 -0
  30. package/dist/adapters/test.d.cts +4 -2
  31. package/dist/adapters/test.d.mts +4 -2
  32. package/dist/adapters/test.d.ts +4 -2
  33. package/dist/adapters/test.mjs +44 -0
  34. package/dist/api/index.cjs +1 -1
  35. package/dist/api/index.d.cts +2 -2
  36. package/dist/api/index.d.mts +2 -2
  37. package/dist/api/index.d.ts +2 -2
  38. package/dist/api/index.mjs +2 -2
  39. package/dist/client/index.d.cts +4 -4
  40. package/dist/client/index.d.mts +4 -4
  41. package/dist/client/index.d.ts +4 -4
  42. package/dist/client/plugins/index.cjs +4 -3
  43. package/dist/client/plugins/index.d.cts +12 -11
  44. package/dist/client/plugins/index.d.mts +12 -11
  45. package/dist/client/plugins/index.d.ts +12 -11
  46. package/dist/client/plugins/index.mjs +4 -3
  47. package/dist/client/react/index.d.cts +3 -3
  48. package/dist/client/react/index.d.mts +3 -3
  49. package/dist/client/react/index.d.ts +3 -3
  50. package/dist/client/solid/index.d.cts +3 -3
  51. package/dist/client/solid/index.d.mts +3 -3
  52. package/dist/client/solid/index.d.ts +3 -3
  53. package/dist/client/svelte/index.d.cts +3 -3
  54. package/dist/client/svelte/index.d.mts +3 -3
  55. package/dist/client/svelte/index.d.ts +3 -3
  56. package/dist/client/vue/index.d.cts +3 -3
  57. package/dist/client/vue/index.d.mts +3 -3
  58. package/dist/client/vue/index.d.ts +3 -3
  59. package/dist/cookies/index.d.cts +2 -2
  60. package/dist/cookies/index.d.mts +2 -2
  61. package/dist/cookies/index.d.ts +2 -2
  62. package/dist/db/index.cjs +3 -3
  63. package/dist/db/index.d.cts +3 -3
  64. package/dist/db/index.d.mts +3 -3
  65. package/dist/db/index.d.ts +3 -3
  66. package/dist/db/index.mjs +3 -3
  67. package/dist/index.cjs +5 -5
  68. package/dist/index.d.cts +10 -10
  69. package/dist/index.d.mts +10 -10
  70. package/dist/index.d.ts +10 -10
  71. package/dist/index.mjs +5 -5
  72. package/dist/integrations/next-js.cjs +2 -2
  73. package/dist/integrations/next-js.d.cts +2 -2
  74. package/dist/integrations/next-js.d.mts +2 -2
  75. package/dist/integrations/next-js.d.ts +2 -2
  76. package/dist/integrations/next-js.mjs +2 -2
  77. package/dist/integrations/node.d.cts +2 -2
  78. package/dist/integrations/node.d.mts +2 -2
  79. package/dist/integrations/node.d.ts +2 -2
  80. package/dist/integrations/react-start.cjs +2 -2
  81. package/dist/integrations/react-start.d.cts +2 -2
  82. package/dist/integrations/react-start.d.mts +2 -2
  83. package/dist/integrations/react-start.d.ts +2 -2
  84. package/dist/integrations/react-start.mjs +2 -2
  85. package/dist/integrations/svelte-kit.cjs +1 -1
  86. package/dist/integrations/svelte-kit.d.cts +2 -2
  87. package/dist/integrations/svelte-kit.d.mts +2 -2
  88. package/dist/integrations/svelte-kit.d.ts +2 -2
  89. package/dist/integrations/svelte-kit.mjs +1 -1
  90. package/dist/oauth2/index.cjs +1 -1
  91. package/dist/oauth2/index.d.cts +4 -4
  92. package/dist/oauth2/index.d.mts +4 -4
  93. package/dist/oauth2/index.d.ts +4 -4
  94. package/dist/oauth2/index.mjs +1 -1
  95. package/dist/plugins/admin/access/index.cjs +0 -2
  96. package/dist/plugins/admin/access/index.d.cts +23 -23
  97. package/dist/plugins/admin/access/index.d.mts +23 -23
  98. package/dist/plugins/admin/access/index.d.ts +23 -23
  99. package/dist/plugins/admin/access/index.mjs +0 -2
  100. package/dist/plugins/admin/index.cjs +2 -2
  101. package/dist/plugins/admin/index.d.cts +16 -100
  102. package/dist/plugins/admin/index.d.mts +16 -100
  103. package/dist/plugins/admin/index.d.ts +16 -100
  104. package/dist/plugins/admin/index.mjs +2 -2
  105. package/dist/plugins/anonymous/index.cjs +1 -1
  106. package/dist/plugins/anonymous/index.d.cts +2 -2
  107. package/dist/plugins/anonymous/index.d.mts +2 -2
  108. package/dist/plugins/anonymous/index.d.ts +2 -2
  109. package/dist/plugins/anonymous/index.mjs +1 -1
  110. package/dist/plugins/bearer/index.cjs +1 -1
  111. package/dist/plugins/bearer/index.d.cts +2 -2
  112. package/dist/plugins/bearer/index.d.mts +2 -2
  113. package/dist/plugins/bearer/index.d.ts +2 -2
  114. package/dist/plugins/bearer/index.mjs +1 -1
  115. package/dist/plugins/captcha/index.d.cts +2 -2
  116. package/dist/plugins/captcha/index.d.mts +2 -2
  117. package/dist/plugins/captcha/index.d.ts +2 -2
  118. package/dist/plugins/custom-session/index.cjs +1 -1
  119. package/dist/plugins/custom-session/index.d.cts +2 -2
  120. package/dist/plugins/custom-session/index.d.mts +2 -2
  121. package/dist/plugins/custom-session/index.d.ts +2 -2
  122. package/dist/plugins/custom-session/index.mjs +1 -1
  123. package/dist/plugins/device-authorization/index.d.cts +2 -2
  124. package/dist/plugins/device-authorization/index.d.mts +2 -2
  125. package/dist/plugins/device-authorization/index.d.ts +2 -2
  126. package/dist/plugins/email-otp/index.cjs +1 -1
  127. package/dist/plugins/email-otp/index.d.cts +2 -2
  128. package/dist/plugins/email-otp/index.d.mts +2 -2
  129. package/dist/plugins/email-otp/index.d.ts +2 -2
  130. package/dist/plugins/email-otp/index.mjs +1 -1
  131. package/dist/plugins/generic-oauth/index.cjs +1 -1
  132. package/dist/plugins/generic-oauth/index.d.cts +2 -2
  133. package/dist/plugins/generic-oauth/index.d.mts +2 -2
  134. package/dist/plugins/generic-oauth/index.d.ts +2 -2
  135. package/dist/plugins/generic-oauth/index.mjs +1 -1
  136. package/dist/plugins/haveibeenpwned/index.cjs +1 -1
  137. package/dist/plugins/haveibeenpwned/index.d.cts +2 -2
  138. package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
  139. package/dist/plugins/haveibeenpwned/index.d.ts +2 -2
  140. package/dist/plugins/haveibeenpwned/index.mjs +1 -1
  141. package/dist/plugins/index.cjs +10 -10
  142. package/dist/plugins/index.d.cts +8 -7
  143. package/dist/plugins/index.d.mts +8 -7
  144. package/dist/plugins/index.d.ts +8 -7
  145. package/dist/plugins/index.mjs +11 -11
  146. package/dist/plugins/jwt/index.cjs +1 -1
  147. package/dist/plugins/jwt/index.d.cts +2 -2
  148. package/dist/plugins/jwt/index.d.mts +2 -2
  149. package/dist/plugins/jwt/index.d.ts +2 -2
  150. package/dist/plugins/jwt/index.mjs +1 -1
  151. package/dist/plugins/magic-link/index.cjs +1 -1
  152. package/dist/plugins/magic-link/index.mjs +1 -1
  153. package/dist/plugins/multi-session/index.cjs +1 -1
  154. package/dist/plugins/multi-session/index.d.cts +2 -2
  155. package/dist/plugins/multi-session/index.d.mts +2 -2
  156. package/dist/plugins/multi-session/index.d.ts +2 -2
  157. package/dist/plugins/multi-session/index.mjs +1 -1
  158. package/dist/plugins/oauth-proxy/index.cjs +1 -1
  159. package/dist/plugins/oauth-proxy/index.d.cts +2 -2
  160. package/dist/plugins/oauth-proxy/index.d.mts +2 -2
  161. package/dist/plugins/oauth-proxy/index.d.ts +2 -2
  162. package/dist/plugins/oauth-proxy/index.mjs +1 -1
  163. package/dist/plugins/oidc-provider/index.cjs +2 -2
  164. package/dist/plugins/oidc-provider/index.d.cts +6 -6
  165. package/dist/plugins/oidc-provider/index.d.mts +6 -6
  166. package/dist/plugins/oidc-provider/index.d.ts +6 -6
  167. package/dist/plugins/oidc-provider/index.mjs +2 -2
  168. package/dist/plugins/one-tap/index.cjs +1 -1
  169. package/dist/plugins/one-tap/index.mjs +1 -1
  170. package/dist/plugins/one-time-token/index.cjs +3 -3
  171. package/dist/plugins/one-time-token/index.d.cts +2 -2
  172. package/dist/plugins/one-time-token/index.d.mts +2 -2
  173. package/dist/plugins/one-time-token/index.d.ts +2 -2
  174. package/dist/plugins/one-time-token/index.mjs +3 -3
  175. package/dist/plugins/open-api/index.cjs +1 -1
  176. package/dist/plugins/open-api/index.d.cts +2 -2
  177. package/dist/plugins/open-api/index.d.mts +2 -2
  178. package/dist/plugins/open-api/index.d.ts +2 -2
  179. package/dist/plugins/open-api/index.mjs +1 -1
  180. package/dist/plugins/organization/index.cjs +4 -4
  181. package/dist/plugins/organization/index.d.cts +4 -4
  182. package/dist/plugins/organization/index.d.mts +4 -4
  183. package/dist/plugins/organization/index.d.ts +4 -4
  184. package/dist/plugins/organization/index.mjs +4 -4
  185. package/dist/plugins/passkey/index.cjs +1 -1
  186. package/dist/plugins/passkey/index.d.cts +2 -2
  187. package/dist/plugins/passkey/index.d.mts +2 -2
  188. package/dist/plugins/passkey/index.d.ts +2 -2
  189. package/dist/plugins/passkey/index.mjs +1 -1
  190. package/dist/plugins/phone-number/index.cjs +1 -1
  191. package/dist/plugins/phone-number/index.d.cts +2 -2
  192. package/dist/plugins/phone-number/index.d.mts +2 -2
  193. package/dist/plugins/phone-number/index.d.ts +2 -2
  194. package/dist/plugins/phone-number/index.mjs +1 -1
  195. package/dist/plugins/siwe/index.cjs +1 -1
  196. package/dist/plugins/siwe/index.d.cts +2 -2
  197. package/dist/plugins/siwe/index.d.mts +2 -2
  198. package/dist/plugins/siwe/index.d.ts +2 -2
  199. package/dist/plugins/siwe/index.mjs +1 -1
  200. package/dist/plugins/sso/index.cjs +1 -1
  201. package/dist/plugins/sso/index.d.cts +4 -4
  202. package/dist/plugins/sso/index.d.mts +4 -4
  203. package/dist/plugins/sso/index.d.ts +4 -4
  204. package/dist/plugins/sso/index.mjs +1 -1
  205. package/dist/plugins/two-factor/index.cjs +1 -1
  206. package/dist/plugins/two-factor/index.d.cts +2 -2
  207. package/dist/plugins/two-factor/index.d.mts +2 -2
  208. package/dist/plugins/two-factor/index.d.ts +2 -2
  209. package/dist/plugins/two-factor/index.mjs +1 -1
  210. package/dist/plugins/username/index.cjs +1 -1
  211. package/dist/plugins/username/index.d.cts +4 -4
  212. package/dist/plugins/username/index.d.mts +4 -4
  213. package/dist/plugins/username/index.d.ts +4 -4
  214. package/dist/plugins/username/index.mjs +1 -1
  215. package/dist/shared/{better-auth.DIVj9vPt.mjs → better-auth.3K3VNUn3.mjs} +1 -1
  216. package/dist/shared/{better-auth.BAH6fCWD.cjs → better-auth.B1yOWNP8.cjs} +1 -1
  217. package/dist/shared/{better-auth.nqWf7zUe.mjs → better-auth.B3CPLvGC.mjs} +5 -2
  218. package/dist/shared/{better-auth.BA2h5uPw.mjs → better-auth.B8UjXTUa.mjs} +3 -64
  219. package/dist/shared/{better-auth.DQ0tJQPp.cjs → better-auth.BWzwHY8m.cjs} +1 -1
  220. package/dist/shared/{better-auth.Cgmn9Fog.d.mts → better-auth.BZiffGTH.d.mts} +1 -1
  221. package/dist/shared/{better-auth.DQunmJlF.mjs → better-auth.BjjUH-Ka.mjs} +1 -1
  222. package/dist/shared/{better-auth.BYiVM63b.mjs → better-auth.BlqpEUaH.mjs} +4 -4
  223. package/dist/shared/{better-auth.D5EWSfdb.d.cts → better-auth.CEc4wau_.d.cts} +1 -1
  224. package/dist/shared/{better-auth.BIJBY4I4.d.cts → better-auth.CTMmErGI.d.cts} +2 -2
  225. package/dist/shared/{better-auth.DtH5dc5P.cjs → better-auth.CXBi-DJc.cjs} +3 -3
  226. package/dist/shared/{better-auth.B1-Ox-3r.cjs → better-auth.C_gHVcnc.cjs} +7 -0
  227. package/dist/shared/{better-auth.Dzm1HvKI.d.mts → better-auth.ChqAn6N0.d.mts} +1 -1
  228. package/dist/shared/{better-auth.DVhkokI7.mjs → better-auth.Ck4qhtF6.mjs} +1 -1
  229. package/dist/shared/{better-auth.BUyNJDKf.d.ts → better-auth.CnIVrMwK.d.ts} +1 -1
  230. package/dist/shared/{better-auth.h_x91clN.d.cts → better-auth.D9BrVtBy.d.cts} +1 -1
  231. package/dist/shared/{better-auth.DlWzob1-.mjs → better-auth.DAUyNtx1.mjs} +3 -3
  232. package/dist/shared/{better-auth.B-Ud-fSV.mjs → better-auth.DDDKwecE.mjs} +2 -2
  233. package/dist/shared/{better-auth.DlDZ0HYa.cjs → better-auth.DFJOJkY1.cjs} +4 -4
  234. package/dist/shared/{better-auth.C24xvKiK.d.cts → better-auth.DGuotwA1.d.cts} +6 -6
  235. package/dist/shared/{better-auth.DHFf2nZ9.cjs → better-auth.DTV9hYzN.cjs} +2 -2
  236. package/dist/shared/{better-auth.DFpuqBlM.d.ts → better-auth.DU2vRHKI.d.ts} +6 -6
  237. package/dist/shared/{better-auth.B8b3lep0.mjs → better-auth.DXKgbji-.mjs} +13 -1
  238. package/dist/shared/{better-auth.PF4vmqR_.cjs → better-auth.Dc0nj0we.cjs} +5 -2
  239. package/dist/shared/{better-auth.DSyrs_Ma.d.mts → better-auth.Df1_Wu_1.d.mts} +5 -5
  240. package/dist/shared/{better-auth.CCB6dj0q.cjs → better-auth.DtZRMuXL.cjs} +1 -1
  241. package/dist/shared/{better-auth.BmYM45vZ.cjs → better-auth.Dyb4JEgv.cjs} +2 -2
  242. package/dist/shared/{better-auth.DwqUQnE2.d.ts → better-auth.EF9Iq11i.d.ts} +1 -1
  243. package/dist/shared/{better-auth.DYTLL0-k.cjs → better-auth.TZOo7890.cjs} +1 -62
  244. package/dist/shared/{better-auth.CF8G3gBm.d.ts → better-auth.WOu5GuAp.d.ts} +5 -5
  245. package/dist/shared/{better-auth.DA6N5T2Z.mjs → better-auth.XP_NDvic.mjs} +7 -0
  246. package/dist/shared/{better-auth.DWpv-qG8.cjs → better-auth.YWGwdADP.cjs} +13 -1
  247. package/dist/shared/{better-auth.DUWKOO0N.d.mts → better-auth.ZUo2dMO3.d.mts} +2 -2
  248. package/dist/shared/{better-auth.Bb1FRSH5.cjs → better-auth.aZPAhP-f.cjs} +5 -0
  249. package/dist/shared/{better-auth.B5M8DinZ.d.mts → better-auth.f-bUldRg.d.mts} +6 -6
  250. package/dist/shared/{better-auth.CSVCtb77.mjs → better-auth.fBcUR9cm.mjs} +2 -2
  251. package/dist/shared/{better-auth.C7uhlcDq.mjs → better-auth.gF8vGD5L.mjs} +5 -0
  252. package/dist/shared/{better-auth.BH54xFDQ.d.cts → better-auth.llWU4_4y.d.cts} +5 -5
  253. package/dist/shared/{better-auth.DOq11zLi.d.ts → better-auth.mA4L_-fq.d.ts} +2 -2
  254. package/dist/social-providers/index.cjs +1 -1
  255. package/dist/social-providers/index.d.cts +1 -1
  256. package/dist/social-providers/index.d.mts +1 -1
  257. package/dist/social-providers/index.d.ts +1 -1
  258. package/dist/social-providers/index.mjs +1 -1
  259. package/dist/test-utils/index.cjs +7 -7
  260. package/dist/test-utils/index.d.cts +3 -3
  261. package/dist/test-utils/index.d.mts +3 -3
  262. package/dist/test-utils/index.d.ts +3 -3
  263. package/dist/test-utils/index.mjs +7 -7
  264. package/dist/types/index.d.cts +3 -3
  265. package/dist/types/index.d.mts +3 -3
  266. package/dist/types/index.d.ts +3 -3
  267. package/package.json +1 -1
@@ -100,6 +100,14 @@ const drizzleAdapter = (db, config) => index.createAdapter({
100
100
  }
101
101
  return [drizzleOrm.inArray(schemaModel[field], w.value)];
102
102
  }
103
+ if (w.operator === "not_in") {
104
+ if (!Array.isArray(w.value)) {
105
+ throw new index$1.BetterAuthError(
106
+ `The value for the field "${w.field}" must be an array when using the "not_in" operator.`
107
+ );
108
+ }
109
+ return [drizzleOrm.notInArray(schemaModel[field], w.value)];
110
+ }
103
111
  if (w.operator === "contains") {
104
112
  return [drizzleOrm.like(schemaModel[field], `%${w.value}%`)];
105
113
  }
@@ -141,6 +149,14 @@ const drizzleAdapter = (db, config) => index.createAdapter({
141
149
  }
142
150
  return drizzleOrm.inArray(schemaModel[field], w.value);
143
151
  }
152
+ if (w.operator === "not_in") {
153
+ if (!Array.isArray(w.value)) {
154
+ throw new index$1.BetterAuthError(
155
+ `The value for the field "${w.field}" must be an array when using the "not_in" operator.`
156
+ );
157
+ }
158
+ return drizzleOrm.notInArray(schemaModel[field], w.value);
159
+ }
144
160
  return drizzleOrm.eq(schemaModel[field], w.value);
145
161
  })
146
162
  );
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.C24xvKiK.cjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.cjs';
6
- import '../../shared/better-auth.BIJBY4I4.cjs';
6
+ import '../../shared/better-auth.CTMmErGI.cjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.B5M8DinZ.mjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.mjs';
6
- import '../../shared/better-auth.DUWKOO0N.mjs';
6
+ import '../../shared/better-auth.ZUo2dMO3.mjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DFpuqBlM.js';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.js';
6
- import '../../shared/better-auth.DOq11zLi.js';
6
+ import '../../shared/better-auth.mA4L_-fq.js';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,4 +1,4 @@
1
- import { count, desc, asc, sql, eq, inArray, like, lt, lte, ne, gt, gte, and, or } from 'drizzle-orm';
1
+ import { count, desc, asc, sql, eq, inArray, notInArray, like, lt, lte, ne, gt, gte, and, or } from 'drizzle-orm';
2
2
  import { B as BetterAuthError } from '../../shared/better-auth.DdzSJf-n.mjs';
3
3
  import { c as createAdapter } from '../../shared/better-auth.BuBqXPUp.mjs';
4
4
  import '../../shared/better-auth.BZZKN1g7.mjs';
@@ -98,6 +98,14 @@ const drizzleAdapter = (db, config) => createAdapter({
98
98
  }
99
99
  return [inArray(schemaModel[field], w.value)];
100
100
  }
101
+ if (w.operator === "not_in") {
102
+ if (!Array.isArray(w.value)) {
103
+ throw new BetterAuthError(
104
+ `The value for the field "${w.field}" must be an array when using the "not_in" operator.`
105
+ );
106
+ }
107
+ return [notInArray(schemaModel[field], w.value)];
108
+ }
101
109
  if (w.operator === "contains") {
102
110
  return [like(schemaModel[field], `%${w.value}%`)];
103
111
  }
@@ -139,6 +147,14 @@ const drizzleAdapter = (db, config) => createAdapter({
139
147
  }
140
148
  return inArray(schemaModel[field], w.value);
141
149
  }
150
+ if (w.operator === "not_in") {
151
+ if (!Array.isArray(w.value)) {
152
+ throw new BetterAuthError(
153
+ `The value for the field "${w.field}" must be an array when using the "not_in" operator.`
154
+ );
155
+ }
156
+ return notInArray(schemaModel[field], w.value);
157
+ }
142
158
  return eq(schemaModel[field], w.value);
143
159
  })
144
160
  );
@@ -1,10 +1,10 @@
1
- import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.C24xvKiK.cjs';
2
- export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.C24xvKiK.cjs';
1
+ import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DGuotwA1.cjs';
2
+ export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.DGuotwA1.cjs';
3
3
  import 'kysely';
4
4
  import 'better-call';
5
5
  import 'zod/v4';
6
6
  import '../shared/better-auth.DTtXpZYr.cjs';
7
- import '../shared/better-auth.BIJBY4I4.cjs';
7
+ import '../shared/better-auth.CTMmErGI.cjs';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,10 +1,10 @@
1
- import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.B5M8DinZ.mjs';
2
- export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.B5M8DinZ.mjs';
1
+ import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.f-bUldRg.mjs';
2
+ export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.f-bUldRg.mjs';
3
3
  import 'kysely';
4
4
  import 'better-call';
5
5
  import 'zod/v4';
6
6
  import '../shared/better-auth.DTtXpZYr.mjs';
7
- import '../shared/better-auth.DUWKOO0N.mjs';
7
+ import '../shared/better-auth.ZUo2dMO3.mjs';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,10 +1,10 @@
1
- import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DFpuqBlM.js';
2
- export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.DFpuqBlM.js';
1
+ import { b as AdapterConfig, C as CreateCustomAdapter, B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DU2vRHKI.js';
2
+ export { A as AdapterDebugLogs, e as AdapterTestDebugLogs, d as CleanedWhere, c as CustomAdapter } from '../shared/better-auth.DU2vRHKI.js';
3
3
  import 'kysely';
4
4
  import 'better-call';
5
5
  import 'zod/v4';
6
6
  import '../shared/better-auth.DTtXpZYr.js';
7
- import '../shared/better-auth.DOq11zLi.js';
7
+ import '../shared/better-auth.mA4L_-fq.js';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const kyselyAdapter = require('../../shared/better-auth.DWpv-qG8.cjs');
3
+ const kyselyAdapter = require('../../shared/better-auth.YWGwdADP.cjs');
4
4
  require('kysely');
5
5
  require('../../shared/better-auth.C9jfJUDF.cjs');
6
6
  require('../../shared/better-auth.vPQBmXQL.cjs');
@@ -1,9 +1,9 @@
1
1
  import { Kysely } from 'kysely';
2
- import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.C24xvKiK.cjs';
2
+ import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.cjs';
6
- import '../../shared/better-auth.BIJBY4I4.cjs';
6
+ import '../../shared/better-auth.CTMmErGI.cjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
1
  import { Kysely } from 'kysely';
2
- import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.B5M8DinZ.mjs';
2
+ import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.mjs';
6
- import '../../shared/better-auth.DUWKOO0N.mjs';
6
+ import '../../shared/better-auth.ZUo2dMO3.mjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
1
  import { Kysely } from 'kysely';
2
- import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.DFpuqBlM.js';
2
+ import { B as BetterAuthOptions, K as KyselyDatabaseType, A as AdapterDebugLogs, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.js';
6
- import '../../shared/better-auth.DOq11zLi.js';
6
+ import '../../shared/better-auth.mA4L_-fq.js';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { c as createKyselyAdapter, g as getKyselyDatabaseType, k as kyselyAdapter } from '../../shared/better-auth.B8b3lep0.mjs';
1
+ export { c as createKyselyAdapter, g as getKyselyDatabaseType, k as kyselyAdapter } from '../../shared/better-auth.DXKgbji-.mjs';
2
2
  import 'kysely';
3
3
  import '../../shared/better-auth.BuBqXPUp.mjs';
4
4
  import '../../shared/better-auth.BZZKN1g7.mjs';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const memoryAdapter = require('../../shared/better-auth.Bb1FRSH5.cjs');
3
+ const memoryAdapter = require('../../shared/better-auth.aZPAhP-f.cjs');
4
4
  require('@better-auth/utils/random');
5
5
  require('zod/v4');
6
6
  require('better-call');
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.C24xvKiK.cjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.cjs';
6
- import '../../shared/better-auth.BIJBY4I4.cjs';
6
+ import '../../shared/better-auth.CTMmErGI.cjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.B5M8DinZ.mjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.mjs';
6
- import '../../shared/better-auth.DUWKOO0N.mjs';
6
+ import '../../shared/better-auth.ZUo2dMO3.mjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DFpuqBlM.js';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.js';
6
- import '../../shared/better-auth.DOq11zLi.js';
6
+ import '../../shared/better-auth.mA4L_-fq.js';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { m as memoryAdapter } from '../../shared/better-auth.C7uhlcDq.mjs';
1
+ export { m as memoryAdapter } from '../../shared/better-auth.gF8vGD5L.mjs';
2
2
  import '@better-auth/utils/random';
3
3
  import 'zod/v4';
4
4
  import 'better-call';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const mongodbAdapter = require('../../shared/better-auth.B1-Ox-3r.cjs');
3
+ const mongodbAdapter = require('../../shared/better-auth.C_gHVcnc.cjs');
4
4
  require('mongodb');
5
5
  require('../../shared/better-auth.C9jfJUDF.cjs');
6
6
  require('../../shared/better-auth.vPQBmXQL.cjs');
@@ -1,10 +1,10 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.C24xvKiK.cjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
2
2
  import { Db } from 'mongodb';
3
3
  import 'kysely';
4
4
  import 'better-call';
5
5
  import 'zod/v4';
6
6
  import '../../shared/better-auth.DTtXpZYr.cjs';
7
- import '../../shared/better-auth.BIJBY4I4.cjs';
7
+ import '../../shared/better-auth.CTMmErGI.cjs';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,10 +1,10 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.B5M8DinZ.mjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
2
2
  import { Db } from 'mongodb';
3
3
  import 'kysely';
4
4
  import 'better-call';
5
5
  import 'zod/v4';
6
6
  import '../../shared/better-auth.DTtXpZYr.mjs';
7
- import '../../shared/better-auth.DUWKOO0N.mjs';
7
+ import '../../shared/better-auth.ZUo2dMO3.mjs';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,10 +1,10 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DFpuqBlM.js';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
2
2
  import { Db } from 'mongodb';
3
3
  import 'kysely';
4
4
  import 'better-call';
5
5
  import 'zod/v4';
6
6
  import '../../shared/better-auth.DTtXpZYr.js';
7
- import '../../shared/better-auth.DOq11zLi.js';
7
+ import '../../shared/better-auth.mA4L_-fq.js';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { m as mongodbAdapter } from '../../shared/better-auth.DA6N5T2Z.mjs';
1
+ export { m as mongodbAdapter } from '../../shared/better-auth.XP_NDvic.mjs';
2
2
  import 'mongodb';
3
3
  import '../../shared/better-auth.BuBqXPUp.mjs';
4
4
  import '../../shared/better-auth.BZZKN1g7.mjs';
@@ -47,6 +47,8 @@ const prismaAdapter = (prisma, config) => index.createAdapter({
47
47
  return "endsWith";
48
48
  case "ne":
49
49
  return "not";
50
+ case "not_in":
51
+ return "notIn";
50
52
  default:
51
53
  return operator;
52
54
  }
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.C24xvKiK.cjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DGuotwA1.cjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.cjs';
6
- import '../../shared/better-auth.BIJBY4I4.cjs';
6
+ import '../../shared/better-auth.CTMmErGI.cjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.B5M8DinZ.mjs';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.f-bUldRg.mjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.mjs';
6
- import '../../shared/better-auth.DUWKOO0N.mjs';
6
+ import '../../shared/better-auth.ZUo2dMO3.mjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DFpuqBlM.js';
1
+ import { A as AdapterDebugLogs, B as BetterAuthOptions, a as Adapter } from '../../shared/better-auth.DU2vRHKI.js';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../../shared/better-auth.DTtXpZYr.js';
6
- import '../../shared/better-auth.DOq11zLi.js';
6
+ import '../../shared/better-auth.mA4L_-fq.js';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -45,6 +45,8 @@ const prismaAdapter = (prisma, config) => createAdapter({
45
45
  return "endsWith";
46
46
  case "ne":
47
47
  return "not";
48
+ case "not_in":
49
+ return "notIn";
48
50
  default:
49
51
  return operator;
50
52
  }
@@ -30,6 +30,7 @@ const adapterTests = {
30
30
  SHOULD_FIND_MANY_WITH_WHERE: "should find many with where",
31
31
  SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators",
32
32
  SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields",
33
+ SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator",
33
34
  SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy",
34
35
  SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit",
35
36
  SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset",
@@ -316,6 +317,49 @@ async function adapterTest({ getAdapter, disableTests: disabledTests, testPrefix
316
317
  vitest.expect(res.length).toBe(2);
317
318
  }
318
319
  );
320
+ vitest.test.skipIf(disabledTests?.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR)(
321
+ `${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR}`,
322
+ async ({ onTestFailed }) => {
323
+ await resetDebugLogs();
324
+ onTestFailed(async () => {
325
+ await printDebugLogs();
326
+ });
327
+ const newUser3 = await (await adapter()).create({
328
+ model: "user",
329
+ data: {
330
+ name: "user",
331
+ email: "test-email3email.com",
332
+ emailVerified: true,
333
+ createdAt: /* @__PURE__ */ new Date(),
334
+ updatedAt: /* @__PURE__ */ new Date()
335
+ }
336
+ });
337
+ const allUsers = await (await adapter()).findMany({
338
+ model: "user"
339
+ });
340
+ vitest.expect(allUsers.length).toBe(6);
341
+ const usersWithoutNotIn = await (await adapter()).findMany({
342
+ model: "user",
343
+ where: [
344
+ {
345
+ field: "id",
346
+ operator: "not_in",
347
+ value: [user.id, newUser3.id]
348
+ }
349
+ ]
350
+ });
351
+ vitest.expect(usersWithoutNotIn.length).toBe(4);
352
+ await (await adapter()).delete({
353
+ model: "user",
354
+ where: [
355
+ {
356
+ field: "id",
357
+ value: newUser3.id
358
+ }
359
+ ]
360
+ });
361
+ }
362
+ );
319
363
  vitest.test.skipIf(disabledTests?.SHOULD_WORK_WITH_REFERENCE_FIELDS)(
320
364
  `${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_WORK_WITH_REFERENCE_FIELDS}`,
321
365
  async ({ onTestFailed }) => {
@@ -1,9 +1,9 @@
1
- import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.C24xvKiK.cjs';
1
+ import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DGuotwA1.cjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../shared/better-auth.DTtXpZYr.cjs';
6
- import '../shared/better-auth.BIJBY4I4.cjs';
6
+ import '../shared/better-auth.CTMmErGI.cjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -33,6 +33,7 @@ declare const adapterTests: {
33
33
  readonly SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
34
34
  readonly SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
35
35
  readonly SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
36
+ readonly SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
36
37
  readonly SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
37
38
  readonly SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
38
39
  readonly SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
@@ -60,6 +61,7 @@ declare const numberIdAdapterTests: {
60
61
  SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
61
62
  SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
62
63
  SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
64
+ SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
63
65
  SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
64
66
  SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
65
67
  SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
@@ -1,9 +1,9 @@
1
- import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.B5M8DinZ.mjs';
1
+ import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.f-bUldRg.mjs';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../shared/better-auth.DTtXpZYr.mjs';
6
- import '../shared/better-auth.DUWKOO0N.mjs';
6
+ import '../shared/better-auth.ZUo2dMO3.mjs';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -33,6 +33,7 @@ declare const adapterTests: {
33
33
  readonly SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
34
34
  readonly SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
35
35
  readonly SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
36
+ readonly SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
36
37
  readonly SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
37
38
  readonly SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
38
39
  readonly SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
@@ -60,6 +61,7 @@ declare const numberIdAdapterTests: {
60
61
  SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
61
62
  SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
62
63
  SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
64
+ SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
63
65
  SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
64
66
  SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
65
67
  SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
@@ -1,9 +1,9 @@
1
- import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DFpuqBlM.js';
1
+ import { B as BetterAuthOptions, a as Adapter } from '../shared/better-auth.DU2vRHKI.js';
2
2
  import 'kysely';
3
3
  import 'better-call';
4
4
  import 'zod/v4';
5
5
  import '../shared/better-auth.DTtXpZYr.js';
6
- import '../shared/better-auth.DOq11zLi.js';
6
+ import '../shared/better-auth.mA4L_-fq.js';
7
7
  import 'jose';
8
8
  import 'zod/v4/core';
9
9
  import 'zod';
@@ -33,6 +33,7 @@ declare const adapterTests: {
33
33
  readonly SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
34
34
  readonly SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
35
35
  readonly SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
36
+ readonly SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
36
37
  readonly SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
37
38
  readonly SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
38
39
  readonly SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
@@ -60,6 +61,7 @@ declare const numberIdAdapterTests: {
60
61
  SHOULD_FIND_MANY_WITH_WHERE: "should find many with where";
61
62
  SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators";
62
63
  SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields";
64
+ SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator";
63
65
  SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy";
64
66
  SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit";
65
67
  SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset";
@@ -28,6 +28,7 @@ const adapterTests = {
28
28
  SHOULD_FIND_MANY_WITH_WHERE: "should find many with where",
29
29
  SHOULD_FIND_MANY_WITH_OPERATORS: "should find many with operators",
30
30
  SHOULD_WORK_WITH_REFERENCE_FIELDS: "should work with reference fields",
31
+ SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR: "should find many with not in operator",
31
32
  SHOULD_FIND_MANY_WITH_SORT_BY: "should find many with sortBy",
32
33
  SHOULD_FIND_MANY_WITH_LIMIT: "should find many with limit",
33
34
  SHOULD_FIND_MANY_WITH_OFFSET: "should find many with offset",
@@ -314,6 +315,49 @@ async function adapterTest({ getAdapter, disableTests: disabledTests, testPrefix
314
315
  expect(res.length).toBe(2);
315
316
  }
316
317
  );
318
+ test.skipIf(disabledTests?.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR)(
319
+ `${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_FIND_MANY_WITH_NOT_IN_OPERATOR}`,
320
+ async ({ onTestFailed }) => {
321
+ await resetDebugLogs();
322
+ onTestFailed(async () => {
323
+ await printDebugLogs();
324
+ });
325
+ const newUser3 = await (await adapter()).create({
326
+ model: "user",
327
+ data: {
328
+ name: "user",
329
+ email: "test-email3email.com",
330
+ emailVerified: true,
331
+ createdAt: /* @__PURE__ */ new Date(),
332
+ updatedAt: /* @__PURE__ */ new Date()
333
+ }
334
+ });
335
+ const allUsers = await (await adapter()).findMany({
336
+ model: "user"
337
+ });
338
+ expect(allUsers.length).toBe(6);
339
+ const usersWithoutNotIn = await (await adapter()).findMany({
340
+ model: "user",
341
+ where: [
342
+ {
343
+ field: "id",
344
+ operator: "not_in",
345
+ value: [user.id, newUser3.id]
346
+ }
347
+ ]
348
+ });
349
+ expect(usersWithoutNotIn.length).toBe(4);
350
+ await (await adapter()).delete({
351
+ model: "user",
352
+ where: [
353
+ {
354
+ field: "id",
355
+ value: newUser3.id
356
+ }
357
+ ]
358
+ });
359
+ }
360
+ );
317
361
  test.skipIf(disabledTests?.SHOULD_WORK_WITH_REFERENCE_FIELDS)(
318
362
  `${testPrefix ? `${testPrefix} - ` : ""}${adapterTests.SHOULD_WORK_WITH_REFERENCE_FIELDS}`,
319
363
  async ({ onTestFailed }) => {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const betterCall = require('better-call');
4
- const socialProviders_index = require('../shared/better-auth.PF4vmqR_.cjs');
4
+ const socialProviders_index = require('../shared/better-auth.Dc0nj0we.cjs');
5
5
  const session = require('../shared/better-auth.CLv80Pwz.cjs');
6
6
  const z = require('zod/v4');
7
7
  const cookies_index = require('../shared/better-auth.D5q0JUiv.cjs');
@@ -1,5 +1,5 @@
1
- import '../shared/better-auth.BIJBY4I4.cjs';
2
- export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.C24xvKiK.cjs';
1
+ import '../shared/better-auth.CTMmErGI.cjs';
2
+ export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.DGuotwA1.cjs';
3
3
  export { APIError } from 'better-call';
4
4
  import '../shared/better-auth.DTtXpZYr.cjs';
5
5
  import 'zod/v4/core';
@@ -1,5 +1,5 @@
1
- import '../shared/better-auth.DUWKOO0N.mjs';
2
- export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.B5M8DinZ.mjs';
1
+ import '../shared/better-auth.ZUo2dMO3.mjs';
2
+ export { z as AuthEndpoint, D as AuthMiddleware, bp as accountInfo, aS as callbackOAuth, bg as changeEmail, bc as changePassword, aN as checkEndpointConflicts, y as createAuthEndpoint, x as createAuthMiddleware, b7 as createEmailVerificationToken, be as deleteUser, bf as deleteUserCallback, bh as error, b3 as forgetPassword, b5 as forgetPasswordCallback, aY as freshSessionMiddleware, bn as getAccessToken, aO as getEndpoints, aU as getSession, aV as getSessionFromCtx, aT as getSessionQuerySchema, bl as linkSocialAccount, aZ as listSessions, bk as listUserAccounts, bi as ok, w as optionsMiddleware, br as originCheck, bq as originCheckMiddleware, bo as refreshToken, aX as requestOnlySessionMiddleware, b2 as requestPasswordReset, b4 as requestPasswordResetCallback, b6 as resetPassword, b0 as revokeOtherSessions, a_ as revokeSession, a$ as revokeSessions, aP as router, b9 as sendVerificationEmail, b8 as sendVerificationEmailFn, aW as sessionMiddleware, bd as setPassword, aR as signInEmail, aQ as signInSocial, b1 as signOut, bj as signUpEmail, bm as unlinkAccount, bb as updateUser, ba as verifyEmail } from '../shared/better-auth.f-bUldRg.mjs';
3
3
  export { APIError } from 'better-call';
4
4
  import '../shared/better-auth.DTtXpZYr.mjs';
5
5
  import 'zod/v4/core';