@sirketio/auth 0.0.1

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 (594) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +36 -0
  2. package/dist/adapter/index.d.mts +4 -0
  3. package/dist/adapter/index.mjs +7 -0
  4. package/dist/api/index.d.mts +3872 -0
  5. package/dist/api/index.mjs +206 -0
  6. package/dist/api/index.mjs.map +1 -0
  7. package/dist/api/middlewares/index.d.mts +1 -0
  8. package/dist/api/middlewares/index.mjs +3 -0
  9. package/dist/api/middlewares/origin-check.d.mts +18 -0
  10. package/dist/api/middlewares/origin-check.mjs +140 -0
  11. package/dist/api/middlewares/origin-check.mjs.map +1 -0
  12. package/dist/api/rate-limiter/index.mjs +204 -0
  13. package/dist/api/rate-limiter/index.mjs.map +1 -0
  14. package/dist/api/routes/account.d.mts +410 -0
  15. package/dist/api/routes/account.mjs +493 -0
  16. package/dist/api/routes/account.mjs.map +1 -0
  17. package/dist/api/routes/callback.d.mts +31 -0
  18. package/dist/api/routes/callback.mjs +179 -0
  19. package/dist/api/routes/callback.mjs.map +1 -0
  20. package/dist/api/routes/email-verification.d.mts +161 -0
  21. package/dist/api/routes/email-verification.mjs +299 -0
  22. package/dist/api/routes/email-verification.mjs.map +1 -0
  23. package/dist/api/routes/error.d.mts +28 -0
  24. package/dist/api/routes/error.mjs +386 -0
  25. package/dist/api/routes/error.mjs.map +1 -0
  26. package/dist/api/routes/index.d.mts +11 -0
  27. package/dist/api/routes/index.mjs +13 -0
  28. package/dist/api/routes/ok.d.mts +36 -0
  29. package/dist/api/routes/ok.mjs +30 -0
  30. package/dist/api/routes/ok.mjs.map +1 -0
  31. package/dist/api/routes/password.d.mts +182 -0
  32. package/dist/api/routes/password.mjs +198 -0
  33. package/dist/api/routes/password.mjs.map +1 -0
  34. package/dist/api/routes/session.d.mts +415 -0
  35. package/dist/api/routes/session.mjs +483 -0
  36. package/dist/api/routes/session.mjs.map +1 -0
  37. package/dist/api/routes/sign-in.d.mts +171 -0
  38. package/dist/api/routes/sign-in.mjs +263 -0
  39. package/dist/api/routes/sign-in.mjs.map +1 -0
  40. package/dist/api/routes/sign-out.d.mts +36 -0
  41. package/dist/api/routes/sign-out.mjs +33 -0
  42. package/dist/api/routes/sign-out.mjs.map +1 -0
  43. package/dist/api/routes/sign-up.d.mts +160 -0
  44. package/dist/api/routes/sign-up.mjs +227 -0
  45. package/dist/api/routes/sign-up.mjs.map +1 -0
  46. package/dist/api/routes/update-user.d.mts +445 -0
  47. package/dist/api/routes/update-user.mjs +493 -0
  48. package/dist/api/routes/update-user.mjs.map +1 -0
  49. package/dist/api/state/oauth.d.mts +18 -0
  50. package/dist/api/state/oauth.mjs +8 -0
  51. package/dist/api/state/oauth.mjs.map +1 -0
  52. package/dist/api/state/should-session-refresh.d.mts +13 -0
  53. package/dist/api/state/should-session-refresh.mjs +16 -0
  54. package/dist/api/state/should-session-refresh.mjs.map +1 -0
  55. package/dist/api/to-auth-endpoints.mjs +197 -0
  56. package/dist/api/to-auth-endpoints.mjs.map +1 -0
  57. package/dist/auth/base.mjs +45 -0
  58. package/dist/auth/base.mjs.map +1 -0
  59. package/dist/auth/minimal.d.mts +12 -0
  60. package/dist/auth/minimal.mjs +14 -0
  61. package/dist/auth/minimal.mjs.map +1 -0
  62. package/dist/auth/trusted-origins.mjs +31 -0
  63. package/dist/auth/trusted-origins.mjs.map +1 -0
  64. package/dist/client/broadcast-channel.d.mts +20 -0
  65. package/dist/client/broadcast-channel.mjs +46 -0
  66. package/dist/client/broadcast-channel.mjs.map +1 -0
  67. package/dist/client/config.mjs +90 -0
  68. package/dist/client/config.mjs.map +1 -0
  69. package/dist/client/fetch-plugins.mjs +18 -0
  70. package/dist/client/fetch-plugins.mjs.map +1 -0
  71. package/dist/client/focus-manager.d.mts +11 -0
  72. package/dist/client/focus-manager.mjs +32 -0
  73. package/dist/client/focus-manager.mjs.map +1 -0
  74. package/dist/client/index.d.mts +33 -0
  75. package/dist/client/index.mjs +21 -0
  76. package/dist/client/index.mjs.map +1 -0
  77. package/dist/client/online-manager.d.mts +12 -0
  78. package/dist/client/online-manager.mjs +35 -0
  79. package/dist/client/online-manager.mjs.map +1 -0
  80. package/dist/client/parser.mjs +73 -0
  81. package/dist/client/parser.mjs.map +1 -0
  82. package/dist/client/path-to-object.d.mts +65 -0
  83. package/dist/client/plugins/index.d.mts +53 -0
  84. package/dist/client/plugins/index.mjs +30 -0
  85. package/dist/client/plugins/infer-plugin.d.mts +16 -0
  86. package/dist/client/plugins/infer-plugin.mjs +11 -0
  87. package/dist/client/plugins/infer-plugin.mjs.map +1 -0
  88. package/dist/client/proxy.mjs +79 -0
  89. package/dist/client/proxy.mjs.map +1 -0
  90. package/dist/client/query.d.mts +23 -0
  91. package/dist/client/query.mjs +98 -0
  92. package/dist/client/query.mjs.map +1 -0
  93. package/dist/client/react/index.d.mts +128 -0
  94. package/dist/client/react/index.mjs +24 -0
  95. package/dist/client/react/index.mjs.map +1 -0
  96. package/dist/client/react/react-store.d.mts +47 -0
  97. package/dist/client/react/react-store.mjs +47 -0
  98. package/dist/client/react/react-store.mjs.map +1 -0
  99. package/dist/client/session-atom.mjs +29 -0
  100. package/dist/client/session-atom.mjs.map +1 -0
  101. package/dist/client/session-refresh.d.mts +28 -0
  102. package/dist/client/session-refresh.mjs +140 -0
  103. package/dist/client/session-refresh.mjs.map +1 -0
  104. package/dist/client/types.d.mts +41 -0
  105. package/dist/client/vanilla.d.mts +127 -0
  106. package/dist/client/vanilla.mjs +20 -0
  107. package/dist/client/vanilla.mjs.map +1 -0
  108. package/dist/context/create-context.mjs +211 -0
  109. package/dist/context/create-context.mjs.map +1 -0
  110. package/dist/context/helpers.mjs +83 -0
  111. package/dist/context/helpers.mjs.map +1 -0
  112. package/dist/context/init.mjs +20 -0
  113. package/dist/context/init.mjs.map +1 -0
  114. package/dist/cookies/cookie-utils.d.mts +29 -0
  115. package/dist/cookies/cookie-utils.mjs +105 -0
  116. package/dist/cookies/cookie-utils.mjs.map +1 -0
  117. package/dist/cookies/index.d.mts +121 -0
  118. package/dist/cookies/index.mjs +261 -0
  119. package/dist/cookies/index.mjs.map +1 -0
  120. package/dist/cookies/session-store.d.mts +36 -0
  121. package/dist/cookies/session-store.mjs +200 -0
  122. package/dist/cookies/session-store.mjs.map +1 -0
  123. package/dist/crypto/buffer.d.mts +8 -0
  124. package/dist/crypto/buffer.mjs +18 -0
  125. package/dist/crypto/buffer.mjs.map +1 -0
  126. package/dist/crypto/index.d.mts +27 -0
  127. package/dist/crypto/index.mjs +38 -0
  128. package/dist/crypto/index.mjs.map +1 -0
  129. package/dist/crypto/jwt.d.mts +8 -0
  130. package/dist/crypto/jwt.mjs +95 -0
  131. package/dist/crypto/jwt.mjs.map +1 -0
  132. package/dist/crypto/password.d.mts +12 -0
  133. package/dist/crypto/password.mjs +36 -0
  134. package/dist/crypto/password.mjs.map +1 -0
  135. package/dist/crypto/random.d.mts +5 -0
  136. package/dist/crypto/random.mjs +8 -0
  137. package/dist/crypto/random.mjs.map +1 -0
  138. package/dist/db/adapter-base.d.mts +8 -0
  139. package/dist/db/adapter-base.mjs +19 -0
  140. package/dist/db/adapter-base.mjs.map +1 -0
  141. package/dist/db/field-converter.d.mts +8 -0
  142. package/dist/db/field-converter.mjs +21 -0
  143. package/dist/db/field-converter.mjs.map +1 -0
  144. package/dist/db/field.d.mts +42 -0
  145. package/dist/db/get-schema.d.mts +11 -0
  146. package/dist/db/get-schema.mjs +39 -0
  147. package/dist/db/get-schema.mjs.map +1 -0
  148. package/dist/db/index.d.mts +18 -0
  149. package/dist/db/index.mjs +34 -0
  150. package/dist/db/index.mjs.map +1 -0
  151. package/dist/db/internal-adapter.d.mts +14 -0
  152. package/dist/db/internal-adapter.mjs +616 -0
  153. package/dist/db/internal-adapter.mjs.map +1 -0
  154. package/dist/db/schema.d.mts +49 -0
  155. package/dist/db/schema.mjs +118 -0
  156. package/dist/db/schema.mjs.map +1 -0
  157. package/dist/db/to-zod.d.mts +36 -0
  158. package/dist/db/to-zod.mjs +26 -0
  159. package/dist/db/to-zod.mjs.map +1 -0
  160. package/dist/db/verification-token-storage.mjs +28 -0
  161. package/dist/db/verification-token-storage.mjs.map +1 -0
  162. package/dist/db/with-hooks.d.mts +33 -0
  163. package/dist/db/with-hooks.mjs +159 -0
  164. package/dist/db/with-hooks.mjs.map +1 -0
  165. package/dist/index.d.mts +53 -0
  166. package/dist/index.mjs +27 -0
  167. package/dist/integrations/next-js.d.mts +29 -0
  168. package/dist/integrations/next-js.mjs +85 -0
  169. package/dist/integrations/next-js.mjs.map +1 -0
  170. package/dist/oauth2/index.d.mts +5 -0
  171. package/dist/oauth2/index.mjs +7 -0
  172. package/dist/oauth2/link-account.d.mts +48 -0
  173. package/dist/oauth2/link-account.mjs +143 -0
  174. package/dist/oauth2/link-account.mjs.map +1 -0
  175. package/dist/oauth2/state.d.mts +26 -0
  176. package/dist/oauth2/state.mjs +51 -0
  177. package/dist/oauth2/state.mjs.map +1 -0
  178. package/dist/oauth2/utils.d.mts +8 -0
  179. package/dist/oauth2/utils.mjs +31 -0
  180. package/dist/oauth2/utils.mjs.map +1 -0
  181. package/dist/plugins/access/access.d.mts +30 -0
  182. package/dist/plugins/access/access.mjs +46 -0
  183. package/dist/plugins/access/access.mjs.map +1 -0
  184. package/dist/plugins/access/index.d.mts +3 -0
  185. package/dist/plugins/access/index.mjs +3 -0
  186. package/dist/plugins/access/types.d.mts +17 -0
  187. package/dist/plugins/additional-fields/client.d.mts +96 -0
  188. package/dist/plugins/additional-fields/client.mjs +11 -0
  189. package/dist/plugins/additional-fields/client.mjs.map +1 -0
  190. package/dist/plugins/admin/access/index.d.mts +2 -0
  191. package/dist/plugins/admin/access/index.mjs +3 -0
  192. package/dist/plugins/admin/access/statement.d.mts +118 -0
  193. package/dist/plugins/admin/access/statement.mjs +53 -0
  194. package/dist/plugins/admin/access/statement.mjs.map +1 -0
  195. package/dist/plugins/admin/admin.d.mts +911 -0
  196. package/dist/plugins/admin/admin.mjs +95 -0
  197. package/dist/plugins/admin/admin.mjs.map +1 -0
  198. package/dist/plugins/admin/client.d.mts +76 -0
  199. package/dist/plugins/admin/client.mjs +36 -0
  200. package/dist/plugins/admin/client.mjs.map +1 -0
  201. package/dist/plugins/admin/error-codes.d.mts +29 -0
  202. package/dist/plugins/admin/error-codes.mjs +30 -0
  203. package/dist/plugins/admin/error-codes.mjs.map +1 -0
  204. package/dist/plugins/admin/has-permission.mjs +16 -0
  205. package/dist/plugins/admin/has-permission.mjs.map +1 -0
  206. package/dist/plugins/admin/index.d.mts +3 -0
  207. package/dist/plugins/admin/index.mjs +3 -0
  208. package/dist/plugins/admin/routes.mjs +841 -0
  209. package/dist/plugins/admin/routes.mjs.map +1 -0
  210. package/dist/plugins/admin/schema.d.mts +40 -0
  211. package/dist/plugins/admin/schema.mjs +34 -0
  212. package/dist/plugins/admin/schema.mjs.map +1 -0
  213. package/dist/plugins/admin/types.d.mts +89 -0
  214. package/dist/plugins/api-key/adapter.mjs +468 -0
  215. package/dist/plugins/api-key/adapter.mjs.map +1 -0
  216. package/dist/plugins/api-key/client.d.mts +46 -0
  217. package/dist/plugins/api-key/client.mjs +19 -0
  218. package/dist/plugins/api-key/client.mjs.map +1 -0
  219. package/dist/plugins/api-key/error-codes.d.mts +33 -0
  220. package/dist/plugins/api-key/error-codes.mjs +34 -0
  221. package/dist/plugins/api-key/error-codes.mjs.map +1 -0
  222. package/dist/plugins/api-key/index.d.mts +1251 -0
  223. package/dist/plugins/api-key/index.mjs +134 -0
  224. package/dist/plugins/api-key/index.mjs.map +1 -0
  225. package/dist/plugins/api-key/rate-limit.mjs +74 -0
  226. package/dist/plugins/api-key/rate-limit.mjs.map +1 -0
  227. package/dist/plugins/api-key/routes/create-api-key.mjs +252 -0
  228. package/dist/plugins/api-key/routes/create-api-key.mjs.map +1 -0
  229. package/dist/plugins/api-key/routes/delete-all-expired-api-keys.mjs +24 -0
  230. package/dist/plugins/api-key/routes/delete-all-expired-api-keys.mjs.map +1 -0
  231. package/dist/plugins/api-key/routes/delete-api-key.mjs +74 -0
  232. package/dist/plugins/api-key/routes/delete-api-key.mjs.map +1 -0
  233. package/dist/plugins/api-key/routes/get-api-key.mjs +158 -0
  234. package/dist/plugins/api-key/routes/get-api-key.mjs.map +1 -0
  235. package/dist/plugins/api-key/routes/index.mjs +71 -0
  236. package/dist/plugins/api-key/routes/index.mjs.map +1 -0
  237. package/dist/plugins/api-key/routes/list-api-keys.mjs +194 -0
  238. package/dist/plugins/api-key/routes/list-api-keys.mjs.map +1 -0
  239. package/dist/plugins/api-key/routes/update-api-key.mjs +248 -0
  240. package/dist/plugins/api-key/routes/update-api-key.mjs.map +1 -0
  241. package/dist/plugins/api-key/routes/verify-api-key.mjs +224 -0
  242. package/dist/plugins/api-key/routes/verify-api-key.mjs.map +1 -0
  243. package/dist/plugins/api-key/schema.d.mts +199 -0
  244. package/dist/plugins/api-key/schema.mjs +130 -0
  245. package/dist/plugins/api-key/schema.mjs.map +1 -0
  246. package/dist/plugins/api-key/types.d.mts +346 -0
  247. package/dist/plugins/bearer/index.d.mts +45 -0
  248. package/dist/plugins/bearer/index.mjs +66 -0
  249. package/dist/plugins/bearer/index.mjs.map +1 -0
  250. package/dist/plugins/captcha/constants.d.mts +10 -0
  251. package/dist/plugins/captcha/constants.mjs +22 -0
  252. package/dist/plugins/captcha/constants.mjs.map +1 -0
  253. package/dist/plugins/captcha/error-codes.mjs +16 -0
  254. package/dist/plugins/captcha/error-codes.mjs.map +1 -0
  255. package/dist/plugins/captcha/index.d.mts +21 -0
  256. package/dist/plugins/captcha/index.mjs +62 -0
  257. package/dist/plugins/captcha/index.mjs.map +1 -0
  258. package/dist/plugins/captcha/types.d.mts +28 -0
  259. package/dist/plugins/captcha/utils.mjs +11 -0
  260. package/dist/plugins/captcha/utils.mjs.map +1 -0
  261. package/dist/plugins/captcha/verify-handlers/captchafox.mjs +28 -0
  262. package/dist/plugins/captcha/verify-handlers/captchafox.mjs.map +1 -0
  263. package/dist/plugins/captcha/verify-handlers/cloudflare-turnstile.mjs +26 -0
  264. package/dist/plugins/captcha/verify-handlers/cloudflare-turnstile.mjs.map +1 -0
  265. package/dist/plugins/captcha/verify-handlers/google-recaptcha.mjs +30 -0
  266. package/dist/plugins/captcha/verify-handlers/google-recaptcha.mjs.map +1 -0
  267. package/dist/plugins/captcha/verify-handlers/h-captcha.mjs +28 -0
  268. package/dist/plugins/captcha/verify-handlers/h-captcha.mjs.map +1 -0
  269. package/dist/plugins/captcha/verify-handlers/index.mjs +6 -0
  270. package/dist/plugins/custom-session/client.d.mts +17 -0
  271. package/dist/plugins/custom-session/client.mjs +11 -0
  272. package/dist/plugins/custom-session/client.mjs.map +1 -0
  273. package/dist/plugins/custom-session/index.d.mts +72 -0
  274. package/dist/plugins/custom-session/index.mjs +78 -0
  275. package/dist/plugins/custom-session/index.mjs.map +1 -0
  276. package/dist/plugins/device-authorization/client.d.mts +17 -0
  277. package/dist/plugins/device-authorization/client.mjs +18 -0
  278. package/dist/plugins/device-authorization/client.mjs.map +1 -0
  279. package/dist/plugins/device-authorization/error-codes.mjs +21 -0
  280. package/dist/plugins/device-authorization/error-codes.mjs.map +1 -0
  281. package/dist/plugins/device-authorization/index.d.mts +424 -0
  282. package/dist/plugins/device-authorization/index.mjs +50 -0
  283. package/dist/plugins/device-authorization/index.mjs.map +1 -0
  284. package/dist/plugins/device-authorization/routes.mjs +510 -0
  285. package/dist/plugins/device-authorization/routes.mjs.map +1 -0
  286. package/dist/plugins/device-authorization/schema.mjs +57 -0
  287. package/dist/plugins/device-authorization/schema.mjs.map +1 -0
  288. package/dist/plugins/email-otp/client.d.mts +21 -0
  289. package/dist/plugins/email-otp/client.mjs +18 -0
  290. package/dist/plugins/email-otp/client.mjs.map +1 -0
  291. package/dist/plugins/email-otp/error-codes.d.mts +11 -0
  292. package/dist/plugins/email-otp/error-codes.mjs +12 -0
  293. package/dist/plugins/email-otp/error-codes.mjs.map +1 -0
  294. package/dist/plugins/email-otp/index.d.mts +428 -0
  295. package/dist/plugins/email-otp/index.mjs +130 -0
  296. package/dist/plugins/email-otp/index.mjs.map +1 -0
  297. package/dist/plugins/email-otp/otp-token.mjs +29 -0
  298. package/dist/plugins/email-otp/otp-token.mjs.map +1 -0
  299. package/dist/plugins/email-otp/routes.mjs +631 -0
  300. package/dist/plugins/email-otp/routes.mjs.map +1 -0
  301. package/dist/plugins/email-otp/types.d.mts +86 -0
  302. package/dist/plugins/email-otp/utils.mjs +17 -0
  303. package/dist/plugins/email-otp/utils.mjs.map +1 -0
  304. package/dist/plugins/generic-oauth/client.d.mts +33 -0
  305. package/dist/plugins/generic-oauth/client.mjs +14 -0
  306. package/dist/plugins/generic-oauth/client.mjs.map +1 -0
  307. package/dist/plugins/generic-oauth/error-codes.d.mts +16 -0
  308. package/dist/plugins/generic-oauth/error-codes.mjs +17 -0
  309. package/dist/plugins/generic-oauth/error-codes.mjs.map +1 -0
  310. package/dist/plugins/generic-oauth/index.d.mts +201 -0
  311. package/dist/plugins/generic-oauth/index.mjs +145 -0
  312. package/dist/plugins/generic-oauth/index.mjs.map +1 -0
  313. package/dist/plugins/generic-oauth/providers/auth0.d.mts +37 -0
  314. package/dist/plugins/generic-oauth/providers/auth0.mjs +62 -0
  315. package/dist/plugins/generic-oauth/providers/auth0.mjs.map +1 -0
  316. package/dist/plugins/generic-oauth/providers/gumroad.d.mts +32 -0
  317. package/dist/plugins/generic-oauth/providers/gumroad.mjs +60 -0
  318. package/dist/plugins/generic-oauth/providers/gumroad.mjs.map +1 -0
  319. package/dist/plugins/generic-oauth/providers/hubspot.d.mts +37 -0
  320. package/dist/plugins/generic-oauth/providers/hubspot.mjs +60 -0
  321. package/dist/plugins/generic-oauth/providers/hubspot.mjs.map +1 -0
  322. package/dist/plugins/generic-oauth/providers/index.d.mts +9 -0
  323. package/dist/plugins/generic-oauth/providers/index.mjs +11 -0
  324. package/dist/plugins/generic-oauth/providers/keycloak.d.mts +37 -0
  325. package/dist/plugins/generic-oauth/providers/keycloak.mjs +62 -0
  326. package/dist/plugins/generic-oauth/providers/keycloak.mjs.map +1 -0
  327. package/dist/plugins/generic-oauth/providers/line.d.mts +55 -0
  328. package/dist/plugins/generic-oauth/providers/line.mjs +91 -0
  329. package/dist/plugins/generic-oauth/providers/line.mjs.map +1 -0
  330. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +37 -0
  331. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.mjs +66 -0
  332. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.mjs.map +1 -0
  333. package/dist/plugins/generic-oauth/providers/okta.d.mts +37 -0
  334. package/dist/plugins/generic-oauth/providers/okta.mjs +62 -0
  335. package/dist/plugins/generic-oauth/providers/okta.mjs.map +1 -0
  336. package/dist/plugins/generic-oauth/providers/patreon.d.mts +30 -0
  337. package/dist/plugins/generic-oauth/providers/patreon.mjs +59 -0
  338. package/dist/plugins/generic-oauth/providers/patreon.mjs.map +1 -0
  339. package/dist/plugins/generic-oauth/providers/slack.d.mts +30 -0
  340. package/dist/plugins/generic-oauth/providers/slack.mjs +61 -0
  341. package/dist/plugins/generic-oauth/providers/slack.mjs.map +1 -0
  342. package/dist/plugins/generic-oauth/routes.mjs +411 -0
  343. package/dist/plugins/generic-oauth/routes.mjs.map +1 -0
  344. package/dist/plugins/generic-oauth/types.d.mts +159 -0
  345. package/dist/plugins/haveibeenpwned/index.d.mts +46 -0
  346. package/dist/plugins/haveibeenpwned/index.mjs +57 -0
  347. package/dist/plugins/haveibeenpwned/index.mjs.map +1 -0
  348. package/dist/plugins/index.d.mts +65 -0
  349. package/dist/plugins/index.mjs +48 -0
  350. package/dist/plugins/jwt/adapter.mjs +27 -0
  351. package/dist/plugins/jwt/adapter.mjs.map +1 -0
  352. package/dist/plugins/jwt/client.d.mts +40 -0
  353. package/dist/plugins/jwt/client.mjs +19 -0
  354. package/dist/plugins/jwt/client.mjs.map +1 -0
  355. package/dist/plugins/jwt/index.d.mts +224 -0
  356. package/dist/plugins/jwt/index.mjs +202 -0
  357. package/dist/plugins/jwt/index.mjs.map +1 -0
  358. package/dist/plugins/jwt/schema.d.mts +26 -0
  359. package/dist/plugins/jwt/schema.mjs +23 -0
  360. package/dist/plugins/jwt/schema.mjs.map +1 -0
  361. package/dist/plugins/jwt/sign.d.mts +57 -0
  362. package/dist/plugins/jwt/sign.mjs +66 -0
  363. package/dist/plugins/jwt/sign.mjs.map +1 -0
  364. package/dist/plugins/jwt/types.d.mts +194 -0
  365. package/dist/plugins/jwt/utils.d.mts +42 -0
  366. package/dist/plugins/jwt/utils.mjs +64 -0
  367. package/dist/plugins/jwt/utils.mjs.map +1 -0
  368. package/dist/plugins/jwt/verify.d.mts +12 -0
  369. package/dist/plugins/jwt/verify.mjs +46 -0
  370. package/dist/plugins/jwt/verify.mjs.map +1 -0
  371. package/dist/plugins/last-login-method/client.d.mts +38 -0
  372. package/dist/plugins/last-login-method/client.mjs +32 -0
  373. package/dist/plugins/last-login-method/client.mjs.map +1 -0
  374. package/dist/plugins/last-login-method/index.d.mts +118 -0
  375. package/dist/plugins/last-login-method/index.mjs +76 -0
  376. package/dist/plugins/last-login-method/index.mjs.map +1 -0
  377. package/dist/plugins/magic-link/client.d.mts +10 -0
  378. package/dist/plugins/magic-link/client.mjs +11 -0
  379. package/dist/plugins/magic-link/client.mjs.map +1 -0
  380. package/dist/plugins/magic-link/index.d.mts +193 -0
  381. package/dist/plugins/magic-link/index.mjs +177 -0
  382. package/dist/plugins/magic-link/index.mjs.map +1 -0
  383. package/dist/plugins/magic-link/utils.mjs +12 -0
  384. package/dist/plugins/magic-link/utils.mjs.map +1 -0
  385. package/dist/plugins/mcp/authorize.mjs +133 -0
  386. package/dist/plugins/mcp/authorize.mjs.map +1 -0
  387. package/dist/plugins/mcp/index.d.mts +458 -0
  388. package/dist/plugins/mcp/index.mjs +717 -0
  389. package/dist/plugins/mcp/index.mjs.map +1 -0
  390. package/dist/plugins/multi-session/client.d.mts +19 -0
  391. package/dist/plugins/multi-session/client.mjs +20 -0
  392. package/dist/plugins/multi-session/client.mjs.map +1 -0
  393. package/dist/plugins/multi-session/error-codes.d.mts +9 -0
  394. package/dist/plugins/multi-session/error-codes.mjs +8 -0
  395. package/dist/plugins/multi-session/error-codes.mjs.map +1 -0
  396. package/dist/plugins/multi-session/index.d.mts +235 -0
  397. package/dist/plugins/multi-session/index.mjs +172 -0
  398. package/dist/plugins/multi-session/index.mjs.map +1 -0
  399. package/dist/plugins/oauth-proxy/index.d.mts +97 -0
  400. package/dist/plugins/oauth-proxy/index.mjs +305 -0
  401. package/dist/plugins/oauth-proxy/index.mjs.map +1 -0
  402. package/dist/plugins/oauth-proxy/utils.mjs +51 -0
  403. package/dist/plugins/oauth-proxy/utils.mjs.map +1 -0
  404. package/dist/plugins/oidc-provider/authorize.mjs +194 -0
  405. package/dist/plugins/oidc-provider/authorize.mjs.map +1 -0
  406. package/dist/plugins/oidc-provider/client.d.mts +12 -0
  407. package/dist/plugins/oidc-provider/client.mjs +11 -0
  408. package/dist/plugins/oidc-provider/client.mjs.map +1 -0
  409. package/dist/plugins/oidc-provider/error.mjs +17 -0
  410. package/dist/plugins/oidc-provider/error.mjs.map +1 -0
  411. package/dist/plugins/oidc-provider/index.d.mts +702 -0
  412. package/dist/plugins/oidc-provider/index.mjs +1093 -0
  413. package/dist/plugins/oidc-provider/index.mjs.map +1 -0
  414. package/dist/plugins/oidc-provider/schema.d.mts +160 -0
  415. package/dist/plugins/oidc-provider/schema.mjs +132 -0
  416. package/dist/plugins/oidc-provider/schema.mjs.map +1 -0
  417. package/dist/plugins/oidc-provider/types.d.mts +517 -0
  418. package/dist/plugins/oidc-provider/utils/prompt.mjs +19 -0
  419. package/dist/plugins/oidc-provider/utils/prompt.mjs.map +1 -0
  420. package/dist/plugins/oidc-provider/utils.mjs +15 -0
  421. package/dist/plugins/oidc-provider/utils.mjs.map +1 -0
  422. package/dist/plugins/one-tap/client.d.mts +174 -0
  423. package/dist/plugins/one-tap/client.mjs +188 -0
  424. package/dist/plugins/one-tap/client.mjs.map +1 -0
  425. package/dist/plugins/one-tap/index.d.mts +83 -0
  426. package/dist/plugins/one-tap/index.mjs +95 -0
  427. package/dist/plugins/one-tap/index.mjs.map +1 -0
  428. package/dist/plugins/one-time-token/client.d.mts +10 -0
  429. package/dist/plugins/one-time-token/client.mjs +11 -0
  430. package/dist/plugins/one-time-token/client.mjs.map +1 -0
  431. package/dist/plugins/one-time-token/index.d.mts +133 -0
  432. package/dist/plugins/one-time-token/index.mjs +82 -0
  433. package/dist/plugins/one-time-token/index.mjs.map +1 -0
  434. package/dist/plugins/one-time-token/utils.mjs +12 -0
  435. package/dist/plugins/one-time-token/utils.mjs.map +1 -0
  436. package/dist/plugins/open-api/generator.d.mts +115 -0
  437. package/dist/plugins/open-api/generator.mjs +315 -0
  438. package/dist/plugins/open-api/generator.mjs.map +1 -0
  439. package/dist/plugins/open-api/index.d.mts +97 -0
  440. package/dist/plugins/open-api/index.mjs +67 -0
  441. package/dist/plugins/open-api/index.mjs.map +1 -0
  442. package/dist/plugins/open-api/logo.mjs +15 -0
  443. package/dist/plugins/open-api/logo.mjs.map +1 -0
  444. package/dist/plugins/organization/access/index.d.mts +2 -0
  445. package/dist/plugins/organization/access/index.mjs +3 -0
  446. package/dist/plugins/organization/access/statement.d.mts +249 -0
  447. package/dist/plugins/organization/access/statement.mjs +81 -0
  448. package/dist/plugins/organization/access/statement.mjs.map +1 -0
  449. package/dist/plugins/organization/adapter.d.mts +792 -0
  450. package/dist/plugins/organization/adapter.mjs +624 -0
  451. package/dist/plugins/organization/adapter.mjs.map +1 -0
  452. package/dist/plugins/organization/call.mjs +19 -0
  453. package/dist/plugins/organization/call.mjs.map +1 -0
  454. package/dist/plugins/organization/client.d.mts +372 -0
  455. package/dist/plugins/organization/client.mjs +95 -0
  456. package/dist/plugins/organization/client.mjs.map +1 -0
  457. package/dist/plugins/organization/error-codes.d.mts +65 -0
  458. package/dist/plugins/organization/error-codes.mjs +66 -0
  459. package/dist/plugins/organization/error-codes.mjs.map +1 -0
  460. package/dist/plugins/organization/has-permission.mjs +35 -0
  461. package/dist/plugins/organization/has-permission.mjs.map +1 -0
  462. package/dist/plugins/organization/index.d.mts +5 -0
  463. package/dist/plugins/organization/index.mjs +4 -0
  464. package/dist/plugins/organization/organization.d.mts +394 -0
  465. package/dist/plugins/organization/organization.mjs +428 -0
  466. package/dist/plugins/organization/organization.mjs.map +1 -0
  467. package/dist/plugins/organization/permission.d.mts +17 -0
  468. package/dist/plugins/organization/permission.mjs +16 -0
  469. package/dist/plugins/organization/permission.mjs.map +1 -0
  470. package/dist/plugins/organization/routes/crud-access-control.d.mts +394 -0
  471. package/dist/plugins/organization/routes/crud-access-control.mjs +678 -0
  472. package/dist/plugins/organization/routes/crud-access-control.mjs.map +1 -0
  473. package/dist/plugins/organization/routes/crud-invites.d.mts +1031 -0
  474. package/dist/plugins/organization/routes/crud-invites.mjs +551 -0
  475. package/dist/plugins/organization/routes/crud-invites.mjs.map +1 -0
  476. package/dist/plugins/organization/routes/crud-members.d.mts +940 -0
  477. package/dist/plugins/organization/routes/crud-members.mjs +466 -0
  478. package/dist/plugins/organization/routes/crud-members.mjs.map +1 -0
  479. package/dist/plugins/organization/routes/crud-org.d.mts +708 -0
  480. package/dist/plugins/organization/routes/crud-org.mjs +423 -0
  481. package/dist/plugins/organization/routes/crud-org.mjs.map +1 -0
  482. package/dist/plugins/organization/routes/crud-team.d.mts +1071 -0
  483. package/dist/plugins/organization/routes/crud-team.mjs +676 -0
  484. package/dist/plugins/organization/routes/crud-team.mjs.map +1 -0
  485. package/dist/plugins/organization/schema.d.mts +376 -0
  486. package/dist/plugins/organization/schema.mjs +68 -0
  487. package/dist/plugins/organization/schema.mjs.map +1 -0
  488. package/dist/plugins/organization/types.d.mts +677 -0
  489. package/dist/plugins/phone-number/client.d.mts +31 -0
  490. package/dist/plugins/phone-number/client.mjs +20 -0
  491. package/dist/plugins/phone-number/client.mjs.map +1 -0
  492. package/dist/plugins/phone-number/error-codes.d.mts +20 -0
  493. package/dist/plugins/phone-number/error-codes.mjs +21 -0
  494. package/dist/plugins/phone-number/error-codes.mjs.map +1 -0
  495. package/dist/plugins/phone-number/index.d.mts +318 -0
  496. package/dist/plugins/phone-number/index.mjs +49 -0
  497. package/dist/plugins/phone-number/index.mjs.map +1 -0
  498. package/dist/plugins/phone-number/routes.mjs +472 -0
  499. package/dist/plugins/phone-number/routes.mjs.map +1 -0
  500. package/dist/plugins/phone-number/schema.d.mts +23 -0
  501. package/dist/plugins/phone-number/schema.mjs +20 -0
  502. package/dist/plugins/phone-number/schema.mjs.map +1 -0
  503. package/dist/plugins/phone-number/types.d.mts +118 -0
  504. package/dist/plugins/two-factor/backup-codes/index.d.mts +279 -0
  505. package/dist/plugins/two-factor/backup-codes/index.mjs +277 -0
  506. package/dist/plugins/two-factor/backup-codes/index.mjs.map +1 -0
  507. package/dist/plugins/two-factor/client.d.mts +55 -0
  508. package/dist/plugins/two-factor/client.mjs +37 -0
  509. package/dist/plugins/two-factor/client.mjs.map +1 -0
  510. package/dist/plugins/two-factor/constant.mjs +8 -0
  511. package/dist/plugins/two-factor/constant.mjs.map +1 -0
  512. package/dist/plugins/two-factor/error-code.d.mts +17 -0
  513. package/dist/plugins/two-factor/error-code.mjs +18 -0
  514. package/dist/plugins/two-factor/error-code.mjs.map +1 -0
  515. package/dist/plugins/two-factor/index.d.mts +670 -0
  516. package/dist/plugins/two-factor/index.mjs +228 -0
  517. package/dist/plugins/two-factor/index.mjs.map +1 -0
  518. package/dist/plugins/two-factor/otp/index.d.mts +216 -0
  519. package/dist/plugins/two-factor/otp/index.mjs +199 -0
  520. package/dist/plugins/two-factor/otp/index.mjs.map +1 -0
  521. package/dist/plugins/two-factor/schema.d.mts +41 -0
  522. package/dist/plugins/two-factor/schema.mjs +36 -0
  523. package/dist/plugins/two-factor/schema.mjs.map +1 -0
  524. package/dist/plugins/two-factor/totp/index.d.mts +210 -0
  525. package/dist/plugins/two-factor/totp/index.mjs +157 -0
  526. package/dist/plugins/two-factor/totp/index.mjs.map +1 -0
  527. package/dist/plugins/two-factor/types.d.mts +73 -0
  528. package/dist/plugins/two-factor/utils.mjs +12 -0
  529. package/dist/plugins/two-factor/utils.mjs.map +1 -0
  530. package/dist/plugins/two-factor/verify-two-factor.mjs +85 -0
  531. package/dist/plugins/two-factor/verify-two-factor.mjs.map +1 -0
  532. package/dist/plugins/username/client.d.mts +26 -0
  533. package/dist/plugins/username/client.mjs +18 -0
  534. package/dist/plugins/username/client.mjs.map +1 -0
  535. package/dist/plugins/username/error-codes.d.mts +16 -0
  536. package/dist/plugins/username/error-codes.mjs +17 -0
  537. package/dist/plugins/username/error-codes.mjs.map +1 -0
  538. package/dist/plugins/username/index.d.mts +251 -0
  539. package/dist/plugins/username/index.mjs +234 -0
  540. package/dist/plugins/username/index.mjs.map +1 -0
  541. package/dist/plugins/username/schema.d.mts +33 -0
  542. package/dist/plugins/username/schema.mjs +26 -0
  543. package/dist/plugins/username/schema.mjs.map +1 -0
  544. package/dist/providers/index.d.mts +1 -0
  545. package/dist/providers/index.mjs +3 -0
  546. package/dist/state.d.mts +42 -0
  547. package/dist/state.mjs +107 -0
  548. package/dist/state.mjs.map +1 -0
  549. package/dist/types/adapter.d.mts +2 -0
  550. package/dist/types/api.d.mts +29 -0
  551. package/dist/types/auth.d.mts +29 -0
  552. package/dist/types/helper.d.mts +10 -0
  553. package/dist/types/index.d.mts +11 -0
  554. package/dist/types/index.mjs +1 -0
  555. package/dist/types/models.d.mts +11 -0
  556. package/dist/types/plugins.d.mts +20 -0
  557. package/dist/utils/boolean.mjs +8 -0
  558. package/dist/utils/boolean.mjs.map +1 -0
  559. package/dist/utils/constants.mjs +6 -0
  560. package/dist/utils/constants.mjs.map +1 -0
  561. package/dist/utils/date.mjs +8 -0
  562. package/dist/utils/date.mjs.map +1 -0
  563. package/dist/utils/get-request-ip.d.mts +7 -0
  564. package/dist/utils/get-request-ip.mjs +23 -0
  565. package/dist/utils/get-request-ip.mjs.map +1 -0
  566. package/dist/utils/hide-metadata.d.mts +7 -0
  567. package/dist/utils/hide-metadata.mjs +6 -0
  568. package/dist/utils/hide-metadata.mjs.map +1 -0
  569. package/dist/utils/index.d.mts +4 -0
  570. package/dist/utils/index.mjs +6 -0
  571. package/dist/utils/is-api-error.d.mts +7 -0
  572. package/dist/utils/is-api-error.mjs +11 -0
  573. package/dist/utils/is-api-error.mjs.map +1 -0
  574. package/dist/utils/is-atom.mjs +8 -0
  575. package/dist/utils/is-atom.mjs.map +1 -0
  576. package/dist/utils/is-promise.mjs +8 -0
  577. package/dist/utils/is-promise.mjs.map +1 -0
  578. package/dist/utils/middleware-response.mjs +9 -0
  579. package/dist/utils/middleware-response.mjs.map +1 -0
  580. package/dist/utils/password.mjs +26 -0
  581. package/dist/utils/password.mjs.map +1 -0
  582. package/dist/utils/plugin-helper.mjs +17 -0
  583. package/dist/utils/plugin-helper.mjs.map +1 -0
  584. package/dist/utils/shim.mjs +24 -0
  585. package/dist/utils/shim.mjs.map +1 -0
  586. package/dist/utils/time.d.mts +49 -0
  587. package/dist/utils/time.mjs +100 -0
  588. package/dist/utils/time.mjs.map +1 -0
  589. package/dist/utils/url.d.mts +8 -0
  590. package/dist/utils/url.mjs +92 -0
  591. package/dist/utils/url.mjs.map +1 -0
  592. package/dist/utils/wildcard.mjs +108 -0
  593. package/dist/utils/wildcard.mjs.map +1 -0
  594. package/package.json +428 -0
@@ -0,0 +1,1031 @@
1
+ import { FieldAttributeToObject, InferAdditionalFieldsFromPluginOptions, RemoveFieldsWithReturnedFalse } from "../../../db/field.mjs";
2
+ import "../../../db/index.mjs";
3
+ import { Role } from "../../access/types.mjs";
4
+ import { OrganizationOptions } from "../types.mjs";
5
+ import { InferOrganizationRolesFromOption, InvitationStatus } from "../schema.mjs";
6
+ import "../../index.mjs";
7
+ import { defaultRoles } from "../access/statement.mjs";
8
+ import "../index.mjs";
9
+ import * as _better_auth_core0 from "@better-auth/core";
10
+ import * as _better_auth_core_db0 from "@better-auth/core/db";
11
+ import * as better_call0 from "better-call";
12
+ import * as z from "zod";
13
+
14
+ //#region src/plugins/organization/routes/crud-invites.d.ts
15
+ declare const createInvitation: <O extends OrganizationOptions>(option: O) => better_call0.StrictEndpoint<"/organization/invite-member", {
16
+ method: "POST";
17
+ requireHeaders: true;
18
+ use: (((inputContext: better_call0.MiddlewareInputContext<{
19
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
20
+ session: {
21
+ session: Record<string, any> & {
22
+ id: string;
23
+ createdAt: Date;
24
+ updatedAt: Date;
25
+ userId: string;
26
+ expiresAt: Date;
27
+ token: string;
28
+ ipAddress?: string | null | undefined;
29
+ userAgent?: string | null | undefined;
30
+ };
31
+ user: Record<string, any> & {
32
+ id: string;
33
+ createdAt: Date;
34
+ updatedAt: Date;
35
+ email: string;
36
+ emailVerified: boolean;
37
+ name: string;
38
+ image?: string | null | undefined;
39
+ };
40
+ };
41
+ }>)[];
42
+ }>) => Promise<{
43
+ session: {
44
+ session: {
45
+ id: string;
46
+ createdAt: Date;
47
+ updatedAt: Date;
48
+ userId: string;
49
+ expiresAt: Date;
50
+ token: string;
51
+ ipAddress?: string | null | undefined;
52
+ userAgent?: string | null | undefined;
53
+ } & {
54
+ activeTeamId?: string | undefined;
55
+ activeOrganizationId?: string | undefined;
56
+ };
57
+ user: {
58
+ id: string;
59
+ createdAt: Date;
60
+ updatedAt: Date;
61
+ email: string;
62
+ emailVerified: boolean;
63
+ name: string;
64
+ image?: string | null | undefined;
65
+ };
66
+ };
67
+ }>) | ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
68
+ orgOptions: OrganizationOptions;
69
+ roles: typeof defaultRoles & {
70
+ [key: string]: Role<{}>;
71
+ };
72
+ getSession: (context: _better_auth_core0.GenericEndpointContext) => Promise<{
73
+ session: {
74
+ id: string;
75
+ createdAt: Date;
76
+ updatedAt: Date;
77
+ userId: string;
78
+ expiresAt: Date;
79
+ token: string;
80
+ ipAddress?: string | null | undefined;
81
+ userAgent?: string | null | undefined;
82
+ } & {
83
+ activeTeamId?: string | undefined;
84
+ activeOrganizationId?: string | undefined;
85
+ };
86
+ user: {
87
+ id: string;
88
+ createdAt: Date;
89
+ updatedAt: Date;
90
+ email: string;
91
+ emailVerified: boolean;
92
+ name: string;
93
+ image?: string | null | undefined;
94
+ };
95
+ }>;
96
+ }>))[];
97
+ body: z.ZodObject<{
98
+ email: z.ZodString;
99
+ role: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
100
+ organizationId: z.ZodOptional<z.ZodString>;
101
+ resend: z.ZodOptional<z.ZodBoolean>;
102
+ teamId: z.ZodUnion<readonly [z.ZodOptional<z.ZodString>, z.ZodOptional<z.ZodArray<z.ZodString>>]>;
103
+ }, z.core.$strip>;
104
+ metadata: {
105
+ $Infer: {
106
+ body: {
107
+ /**
108
+ * The email address of the user
109
+ * to invite
110
+ */
111
+ email: string;
112
+ /**
113
+ * The role to assign to the user
114
+ */
115
+ role: InferOrganizationRolesFromOption<O> | InferOrganizationRolesFromOption<O>[];
116
+ /**
117
+ * The organization ID to invite
118
+ * the user to
119
+ */
120
+ organizationId?: string | undefined;
121
+ /**
122
+ * Resend the invitation email, if
123
+ * the user is already invited
124
+ */
125
+ resend?: boolean | undefined;
126
+ } & (O extends {
127
+ teams: {
128
+ enabled: true;
129
+ };
130
+ } ? {
131
+ /**
132
+ * The team the user is
133
+ * being invited to.
134
+ */
135
+ teamId?: (string | string[]) | undefined;
136
+ } : {}) & InferAdditionalFieldsFromPluginOptions<"invitation", O, false>;
137
+ };
138
+ openapi: {
139
+ operationId: string;
140
+ description: string;
141
+ responses: {
142
+ "200": {
143
+ description: string;
144
+ content: {
145
+ "application/json": {
146
+ schema: {
147
+ type: "object";
148
+ properties: {
149
+ id: {
150
+ type: string;
151
+ };
152
+ email: {
153
+ type: string;
154
+ };
155
+ role: {
156
+ type: string;
157
+ };
158
+ organizationId: {
159
+ type: string;
160
+ };
161
+ inviterId: {
162
+ type: string;
163
+ };
164
+ status: {
165
+ type: string;
166
+ };
167
+ expiresAt: {
168
+ type: string;
169
+ };
170
+ createdAt: {
171
+ type: string;
172
+ };
173
+ };
174
+ required: string[];
175
+ };
176
+ };
177
+ };
178
+ };
179
+ };
180
+ };
181
+ };
182
+ }, ((O["teams"] extends {
183
+ enabled: true;
184
+ } ? {
185
+ id: string;
186
+ organizationId: string;
187
+ email: string;
188
+ role: InferOrganizationRolesFromOption<O>;
189
+ status: InvitationStatus;
190
+ inviterId: string;
191
+ expiresAt: Date;
192
+ createdAt: Date;
193
+ teamId?: string | undefined;
194
+ } : {
195
+ id: string;
196
+ organizationId: string;
197
+ email: string;
198
+ role: InferOrganizationRolesFromOption<O>;
199
+ status: InvitationStatus;
200
+ inviterId: string;
201
+ expiresAt: Date;
202
+ createdAt: Date;
203
+ }) & (O["schema"] extends {
204
+ invitation?: {
205
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
206
+ } | undefined;
207
+ } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | ((O["teams"] extends {
208
+ enabled: true;
209
+ } ? {
210
+ id: string;
211
+ organizationId: string;
212
+ email: string;
213
+ role: InferOrganizationRolesFromOption<O>;
214
+ status: InvitationStatus;
215
+ inviterId: string;
216
+ expiresAt: Date;
217
+ createdAt: Date;
218
+ teamId?: string | undefined;
219
+ } : {
220
+ id: string;
221
+ organizationId: string;
222
+ email: string;
223
+ role: InferOrganizationRolesFromOption<O>;
224
+ status: InvitationStatus;
225
+ inviterId: string;
226
+ expiresAt: Date;
227
+ createdAt: Date;
228
+ }) & (O["schema"] extends {
229
+ invitation?: {
230
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
231
+ } | undefined;
232
+ } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never)>;
233
+ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => better_call0.StrictEndpoint<"/organization/accept-invitation", {
234
+ method: "POST";
235
+ body: z.ZodObject<{
236
+ invitationId: z.ZodString;
237
+ }, z.core.$strip>;
238
+ requireHeaders: true;
239
+ use: (((inputContext: better_call0.MiddlewareInputContext<{
240
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
241
+ session: {
242
+ session: Record<string, any> & {
243
+ id: string;
244
+ createdAt: Date;
245
+ updatedAt: Date;
246
+ userId: string;
247
+ expiresAt: Date;
248
+ token: string;
249
+ ipAddress?: string | null | undefined;
250
+ userAgent?: string | null | undefined;
251
+ };
252
+ user: Record<string, any> & {
253
+ id: string;
254
+ createdAt: Date;
255
+ updatedAt: Date;
256
+ email: string;
257
+ emailVerified: boolean;
258
+ name: string;
259
+ image?: string | null | undefined;
260
+ };
261
+ };
262
+ }>)[];
263
+ }>) => Promise<{
264
+ session: {
265
+ session: {
266
+ id: string;
267
+ createdAt: Date;
268
+ updatedAt: Date;
269
+ userId: string;
270
+ expiresAt: Date;
271
+ token: string;
272
+ ipAddress?: string | null | undefined;
273
+ userAgent?: string | null | undefined;
274
+ } & {
275
+ activeTeamId?: string | undefined;
276
+ activeOrganizationId?: string | undefined;
277
+ };
278
+ user: {
279
+ id: string;
280
+ createdAt: Date;
281
+ updatedAt: Date;
282
+ email: string;
283
+ emailVerified: boolean;
284
+ name: string;
285
+ image?: string | null | undefined;
286
+ };
287
+ };
288
+ }>) | ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
289
+ orgOptions: OrganizationOptions;
290
+ roles: typeof defaultRoles & {
291
+ [key: string]: Role<{}>;
292
+ };
293
+ getSession: (context: _better_auth_core0.GenericEndpointContext) => Promise<{
294
+ session: {
295
+ id: string;
296
+ createdAt: Date;
297
+ updatedAt: Date;
298
+ userId: string;
299
+ expiresAt: Date;
300
+ token: string;
301
+ ipAddress?: string | null | undefined;
302
+ userAgent?: string | null | undefined;
303
+ } & {
304
+ activeTeamId?: string | undefined;
305
+ activeOrganizationId?: string | undefined;
306
+ };
307
+ user: {
308
+ id: string;
309
+ createdAt: Date;
310
+ updatedAt: Date;
311
+ email: string;
312
+ emailVerified: boolean;
313
+ name: string;
314
+ image?: string | null | undefined;
315
+ };
316
+ }>;
317
+ }>))[];
318
+ metadata: {
319
+ openapi: {
320
+ description: string;
321
+ responses: {
322
+ "200": {
323
+ description: string;
324
+ content: {
325
+ "application/json": {
326
+ schema: {
327
+ type: "object";
328
+ properties: {
329
+ invitation: {
330
+ type: string;
331
+ };
332
+ member: {
333
+ type: string;
334
+ };
335
+ };
336
+ };
337
+ };
338
+ };
339
+ };
340
+ };
341
+ };
342
+ };
343
+ }, {
344
+ invitation: (O["teams"] extends {
345
+ enabled: true;
346
+ } ? {
347
+ id: string;
348
+ organizationId: string;
349
+ email: string;
350
+ role: InferOrganizationRolesFromOption<O>;
351
+ status: InvitationStatus;
352
+ inviterId: string;
353
+ expiresAt: Date;
354
+ createdAt: Date;
355
+ teamId?: string | undefined;
356
+ } : {
357
+ id: string;
358
+ organizationId: string;
359
+ email: string;
360
+ role: InferOrganizationRolesFromOption<O>;
361
+ status: InvitationStatus;
362
+ inviterId: string;
363
+ expiresAt: Date;
364
+ createdAt: Date;
365
+ }) & (O["schema"] extends {
366
+ invitation?: {
367
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
368
+ } | undefined;
369
+ } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never;
370
+ member: {
371
+ id: string;
372
+ organizationId: string;
373
+ userId: string;
374
+ role: string;
375
+ createdAt: Date;
376
+ } & InferAdditionalFieldsFromPluginOptions<"member", O, false>;
377
+ }>;
378
+ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => better_call0.StrictEndpoint<"/organization/reject-invitation", {
379
+ method: "POST";
380
+ body: z.ZodObject<{
381
+ invitationId: z.ZodString;
382
+ }, z.core.$strip>;
383
+ requireHeaders: true;
384
+ use: (((inputContext: better_call0.MiddlewareInputContext<{
385
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
386
+ session: {
387
+ session: Record<string, any> & {
388
+ id: string;
389
+ createdAt: Date;
390
+ updatedAt: Date;
391
+ userId: string;
392
+ expiresAt: Date;
393
+ token: string;
394
+ ipAddress?: string | null | undefined;
395
+ userAgent?: string | null | undefined;
396
+ };
397
+ user: Record<string, any> & {
398
+ id: string;
399
+ createdAt: Date;
400
+ updatedAt: Date;
401
+ email: string;
402
+ emailVerified: boolean;
403
+ name: string;
404
+ image?: string | null | undefined;
405
+ };
406
+ };
407
+ }>)[];
408
+ }>) => Promise<{
409
+ session: {
410
+ session: {
411
+ id: string;
412
+ createdAt: Date;
413
+ updatedAt: Date;
414
+ userId: string;
415
+ expiresAt: Date;
416
+ token: string;
417
+ ipAddress?: string | null | undefined;
418
+ userAgent?: string | null | undefined;
419
+ } & {
420
+ activeTeamId?: string | undefined;
421
+ activeOrganizationId?: string | undefined;
422
+ };
423
+ user: {
424
+ id: string;
425
+ createdAt: Date;
426
+ updatedAt: Date;
427
+ email: string;
428
+ emailVerified: boolean;
429
+ name: string;
430
+ image?: string | null | undefined;
431
+ };
432
+ };
433
+ }>) | ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
434
+ orgOptions: OrganizationOptions;
435
+ roles: typeof defaultRoles & {
436
+ [key: string]: Role<{}>;
437
+ };
438
+ getSession: (context: _better_auth_core0.GenericEndpointContext) => Promise<{
439
+ session: {
440
+ id: string;
441
+ createdAt: Date;
442
+ updatedAt: Date;
443
+ userId: string;
444
+ expiresAt: Date;
445
+ token: string;
446
+ ipAddress?: string | null | undefined;
447
+ userAgent?: string | null | undefined;
448
+ } & {
449
+ activeTeamId?: string | undefined;
450
+ activeOrganizationId?: string | undefined;
451
+ };
452
+ user: {
453
+ id: string;
454
+ createdAt: Date;
455
+ updatedAt: Date;
456
+ email: string;
457
+ emailVerified: boolean;
458
+ name: string;
459
+ image?: string | null | undefined;
460
+ };
461
+ }>;
462
+ }>))[];
463
+ metadata: {
464
+ openapi: {
465
+ description: string;
466
+ responses: {
467
+ "200": {
468
+ description: string;
469
+ content: {
470
+ "application/json": {
471
+ schema: {
472
+ type: "object";
473
+ properties: {
474
+ invitation: {
475
+ type: string;
476
+ };
477
+ member: {
478
+ type: string;
479
+ nullable: boolean;
480
+ };
481
+ };
482
+ };
483
+ };
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ }, {
490
+ invitation: {
491
+ id: string;
492
+ organizationId: string;
493
+ email: string;
494
+ role: "owner" | "admin" | "member";
495
+ status: InvitationStatus;
496
+ inviterId: string;
497
+ expiresAt: Date;
498
+ createdAt: Date;
499
+ } | null;
500
+ member: null;
501
+ }>;
502
+ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => better_call0.StrictEndpoint<"/organization/cancel-invitation", {
503
+ method: "POST";
504
+ body: z.ZodObject<{
505
+ invitationId: z.ZodString;
506
+ }, z.core.$strip>;
507
+ requireHeaders: true;
508
+ use: (((inputContext: better_call0.MiddlewareInputContext<{
509
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
510
+ session: {
511
+ session: Record<string, any> & {
512
+ id: string;
513
+ createdAt: Date;
514
+ updatedAt: Date;
515
+ userId: string;
516
+ expiresAt: Date;
517
+ token: string;
518
+ ipAddress?: string | null | undefined;
519
+ userAgent?: string | null | undefined;
520
+ };
521
+ user: Record<string, any> & {
522
+ id: string;
523
+ createdAt: Date;
524
+ updatedAt: Date;
525
+ email: string;
526
+ emailVerified: boolean;
527
+ name: string;
528
+ image?: string | null | undefined;
529
+ };
530
+ };
531
+ }>)[];
532
+ }>) => Promise<{
533
+ session: {
534
+ session: {
535
+ id: string;
536
+ createdAt: Date;
537
+ updatedAt: Date;
538
+ userId: string;
539
+ expiresAt: Date;
540
+ token: string;
541
+ ipAddress?: string | null | undefined;
542
+ userAgent?: string | null | undefined;
543
+ } & {
544
+ activeTeamId?: string | undefined;
545
+ activeOrganizationId?: string | undefined;
546
+ };
547
+ user: {
548
+ id: string;
549
+ createdAt: Date;
550
+ updatedAt: Date;
551
+ email: string;
552
+ emailVerified: boolean;
553
+ name: string;
554
+ image?: string | null | undefined;
555
+ };
556
+ };
557
+ }>) | ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
558
+ orgOptions: OrganizationOptions;
559
+ roles: typeof defaultRoles & {
560
+ [key: string]: Role<{}>;
561
+ };
562
+ getSession: (context: _better_auth_core0.GenericEndpointContext) => Promise<{
563
+ session: {
564
+ id: string;
565
+ createdAt: Date;
566
+ updatedAt: Date;
567
+ userId: string;
568
+ expiresAt: Date;
569
+ token: string;
570
+ ipAddress?: string | null | undefined;
571
+ userAgent?: string | null | undefined;
572
+ } & {
573
+ activeTeamId?: string | undefined;
574
+ activeOrganizationId?: string | undefined;
575
+ };
576
+ user: {
577
+ id: string;
578
+ createdAt: Date;
579
+ updatedAt: Date;
580
+ email: string;
581
+ emailVerified: boolean;
582
+ name: string;
583
+ image?: string | null | undefined;
584
+ };
585
+ }>;
586
+ }>))[];
587
+ openapi: {
588
+ operationId: string;
589
+ description: string;
590
+ responses: {
591
+ "200": {
592
+ description: string;
593
+ content: {
594
+ "application/json": {
595
+ schema: {
596
+ type: string;
597
+ properties: {
598
+ invitation: {
599
+ type: string;
600
+ };
601
+ };
602
+ };
603
+ };
604
+ };
605
+ };
606
+ };
607
+ };
608
+ }, ((O["teams"] extends {
609
+ enabled: true;
610
+ } ? {
611
+ id: string;
612
+ organizationId: string;
613
+ email: string;
614
+ role: InferOrganizationRolesFromOption<O>;
615
+ status: InvitationStatus;
616
+ inviterId: string;
617
+ expiresAt: Date;
618
+ createdAt: Date;
619
+ teamId?: string | undefined;
620
+ } : {
621
+ id: string;
622
+ organizationId: string;
623
+ email: string;
624
+ role: InferOrganizationRolesFromOption<O>;
625
+ status: InvitationStatus;
626
+ inviterId: string;
627
+ expiresAt: Date;
628
+ createdAt: Date;
629
+ }) & (O["schema"] extends {
630
+ invitation?: {
631
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
632
+ } | undefined;
633
+ } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
634
+ declare const getInvitation: <O extends OrganizationOptions>(options: O) => better_call0.StrictEndpoint<"/organization/get-invitation", {
635
+ method: "GET";
636
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
637
+ orgOptions: OrganizationOptions;
638
+ roles: typeof defaultRoles & {
639
+ [key: string]: Role<{}>;
640
+ };
641
+ getSession: (context: _better_auth_core0.GenericEndpointContext) => Promise<{
642
+ session: {
643
+ id: string;
644
+ createdAt: Date;
645
+ updatedAt: Date;
646
+ userId: string;
647
+ expiresAt: Date;
648
+ token: string;
649
+ ipAddress?: string | null | undefined;
650
+ userAgent?: string | null | undefined;
651
+ } & {
652
+ activeTeamId?: string | undefined;
653
+ activeOrganizationId?: string | undefined;
654
+ };
655
+ user: {
656
+ id: string;
657
+ createdAt: Date;
658
+ updatedAt: Date;
659
+ email: string;
660
+ emailVerified: boolean;
661
+ name: string;
662
+ image?: string | null | undefined;
663
+ };
664
+ }>;
665
+ }>)[];
666
+ requireHeaders: true;
667
+ query: z.ZodObject<{
668
+ id: z.ZodString;
669
+ }, z.core.$strip>;
670
+ metadata: {
671
+ openapi: {
672
+ description: string;
673
+ responses: {
674
+ "200": {
675
+ description: string;
676
+ content: {
677
+ "application/json": {
678
+ schema: {
679
+ type: "object";
680
+ properties: {
681
+ id: {
682
+ type: string;
683
+ };
684
+ email: {
685
+ type: string;
686
+ };
687
+ role: {
688
+ type: string;
689
+ };
690
+ organizationId: {
691
+ type: string;
692
+ };
693
+ inviterId: {
694
+ type: string;
695
+ };
696
+ status: {
697
+ type: string;
698
+ };
699
+ expiresAt: {
700
+ type: string;
701
+ };
702
+ organizationName: {
703
+ type: string;
704
+ };
705
+ organizationSlug: {
706
+ type: string;
707
+ };
708
+ inviterEmail: {
709
+ type: string;
710
+ };
711
+ };
712
+ required: string[];
713
+ };
714
+ };
715
+ };
716
+ };
717
+ };
718
+ };
719
+ };
720
+ }, ((O["teams"] extends {
721
+ enabled: true;
722
+ } ? {
723
+ id: string;
724
+ organizationId: string;
725
+ email: string;
726
+ role: InferOrganizationRolesFromOption<O>;
727
+ status: InvitationStatus;
728
+ inviterId: string;
729
+ expiresAt: Date;
730
+ createdAt: Date;
731
+ teamId?: string | undefined;
732
+ } : {
733
+ id: string;
734
+ organizationId: string;
735
+ email: string;
736
+ role: InferOrganizationRolesFromOption<O>;
737
+ status: InvitationStatus;
738
+ inviterId: string;
739
+ expiresAt: Date;
740
+ createdAt: Date;
741
+ }) & (O["schema"] extends {
742
+ invitation?: {
743
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
744
+ } | undefined;
745
+ } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
746
+ organizationName: ({
747
+ id: string;
748
+ name: string;
749
+ slug: string;
750
+ createdAt: Date;
751
+ logo?: string | null | undefined;
752
+ metadata?: any;
753
+ } & (O["schema"] extends {
754
+ organization?: {
755
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
756
+ } | undefined;
757
+ } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}))["name"];
758
+ organizationSlug: ({
759
+ id: string;
760
+ name: string;
761
+ slug: string;
762
+ createdAt: Date;
763
+ logo?: string | null | undefined;
764
+ metadata?: any;
765
+ } & (O["schema"] extends {
766
+ organization?: {
767
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
768
+ } | undefined;
769
+ } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}))["slug"];
770
+ inviterEmail: string;
771
+ }>;
772
+ declare const listInvitations: <O extends OrganizationOptions>(options: O) => better_call0.StrictEndpoint<"/organization/list-invitations", {
773
+ method: "GET";
774
+ requireHeaders: true;
775
+ use: (((inputContext: better_call0.MiddlewareInputContext<{
776
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
777
+ session: {
778
+ session: Record<string, any> & {
779
+ id: string;
780
+ createdAt: Date;
781
+ updatedAt: Date;
782
+ userId: string;
783
+ expiresAt: Date;
784
+ token: string;
785
+ ipAddress?: string | null | undefined;
786
+ userAgent?: string | null | undefined;
787
+ };
788
+ user: Record<string, any> & {
789
+ id: string;
790
+ createdAt: Date;
791
+ updatedAt: Date;
792
+ email: string;
793
+ emailVerified: boolean;
794
+ name: string;
795
+ image?: string | null | undefined;
796
+ };
797
+ };
798
+ }>)[];
799
+ }>) => Promise<{
800
+ session: {
801
+ session: {
802
+ id: string;
803
+ createdAt: Date;
804
+ updatedAt: Date;
805
+ userId: string;
806
+ expiresAt: Date;
807
+ token: string;
808
+ ipAddress?: string | null | undefined;
809
+ userAgent?: string | null | undefined;
810
+ } & {
811
+ activeTeamId?: string | undefined;
812
+ activeOrganizationId?: string | undefined;
813
+ };
814
+ user: {
815
+ id: string;
816
+ createdAt: Date;
817
+ updatedAt: Date;
818
+ email: string;
819
+ emailVerified: boolean;
820
+ name: string;
821
+ image?: string | null | undefined;
822
+ };
823
+ };
824
+ }>) | ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
825
+ orgOptions: OrganizationOptions;
826
+ roles: typeof defaultRoles & {
827
+ [key: string]: Role<{}>;
828
+ };
829
+ getSession: (context: _better_auth_core0.GenericEndpointContext) => Promise<{
830
+ session: {
831
+ id: string;
832
+ createdAt: Date;
833
+ updatedAt: Date;
834
+ userId: string;
835
+ expiresAt: Date;
836
+ token: string;
837
+ ipAddress?: string | null | undefined;
838
+ userAgent?: string | null | undefined;
839
+ } & {
840
+ activeTeamId?: string | undefined;
841
+ activeOrganizationId?: string | undefined;
842
+ };
843
+ user: {
844
+ id: string;
845
+ createdAt: Date;
846
+ updatedAt: Date;
847
+ email: string;
848
+ emailVerified: boolean;
849
+ name: string;
850
+ image?: string | null | undefined;
851
+ };
852
+ }>;
853
+ }>))[];
854
+ query: z.ZodOptional<z.ZodObject<{
855
+ organizationId: z.ZodOptional<z.ZodString>;
856
+ }, z.core.$strip>>;
857
+ }, ((O["teams"] extends {
858
+ enabled: true;
859
+ } ? {
860
+ id: string;
861
+ organizationId: string;
862
+ email: string;
863
+ role: InferOrganizationRolesFromOption<O>;
864
+ status: InvitationStatus;
865
+ inviterId: string;
866
+ expiresAt: Date;
867
+ createdAt: Date;
868
+ teamId?: string | undefined;
869
+ } : {
870
+ id: string;
871
+ organizationId: string;
872
+ email: string;
873
+ role: InferOrganizationRolesFromOption<O>;
874
+ status: InvitationStatus;
875
+ inviterId: string;
876
+ expiresAt: Date;
877
+ createdAt: Date;
878
+ }) & (O["schema"] extends {
879
+ invitation?: {
880
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
881
+ } | undefined;
882
+ } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
883
+ /**
884
+ * List all invitations a user has received
885
+ */
886
+ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) => better_call0.StrictEndpoint<"/organization/list-user-invitations", {
887
+ method: "GET";
888
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
889
+ orgOptions: OrganizationOptions;
890
+ roles: typeof defaultRoles & {
891
+ [key: string]: Role<{}>;
892
+ };
893
+ getSession: (context: _better_auth_core0.GenericEndpointContext) => Promise<{
894
+ session: {
895
+ id: string;
896
+ createdAt: Date;
897
+ updatedAt: Date;
898
+ userId: string;
899
+ expiresAt: Date;
900
+ token: string;
901
+ ipAddress?: string | null | undefined;
902
+ userAgent?: string | null | undefined;
903
+ } & {
904
+ activeTeamId?: string | undefined;
905
+ activeOrganizationId?: string | undefined;
906
+ };
907
+ user: {
908
+ id: string;
909
+ createdAt: Date;
910
+ updatedAt: Date;
911
+ email: string;
912
+ emailVerified: boolean;
913
+ name: string;
914
+ image?: string | null | undefined;
915
+ };
916
+ }>;
917
+ }>)[];
918
+ query: z.ZodOptional<z.ZodObject<{
919
+ email: z.ZodOptional<z.ZodString>;
920
+ }, z.core.$strip>>;
921
+ metadata: {
922
+ openapi: {
923
+ description: string;
924
+ responses: {
925
+ "200": {
926
+ description: string;
927
+ content: {
928
+ "application/json": {
929
+ schema: {
930
+ type: "array";
931
+ items: {
932
+ type: string;
933
+ properties: {
934
+ id: {
935
+ type: string;
936
+ };
937
+ email: {
938
+ type: string;
939
+ };
940
+ role: {
941
+ type: string;
942
+ };
943
+ organizationId: {
944
+ type: string;
945
+ };
946
+ organizationName: {
947
+ type: string;
948
+ };
949
+ inviterId: {
950
+ type: string;
951
+ description: string;
952
+ };
953
+ teamId: {
954
+ type: string;
955
+ description: string;
956
+ nullable: boolean;
957
+ };
958
+ status: {
959
+ type: string;
960
+ };
961
+ expiresAt: {
962
+ type: string;
963
+ };
964
+ createdAt: {
965
+ type: string;
966
+ };
967
+ };
968
+ required: string[];
969
+ };
970
+ };
971
+ };
972
+ };
973
+ };
974
+ };
975
+ };
976
+ };
977
+ }, (Omit<((O["teams"] extends {
978
+ enabled: true;
979
+ } ? {
980
+ id: string;
981
+ organizationId: string;
982
+ email: string;
983
+ role: InferOrganizationRolesFromOption<O>;
984
+ status: InvitationStatus;
985
+ inviterId: string;
986
+ expiresAt: Date;
987
+ createdAt: Date;
988
+ teamId?: string | undefined;
989
+ } : {
990
+ id: string;
991
+ organizationId: string;
992
+ email: string;
993
+ role: InferOrganizationRolesFromOption<O>;
994
+ status: InvitationStatus;
995
+ inviterId: string;
996
+ expiresAt: Date;
997
+ createdAt: Date;
998
+ }) & (O["schema"] extends {
999
+ invitation?: {
1000
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
1001
+ } | undefined;
1002
+ } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
1003
+ organization: {
1004
+ id: string;
1005
+ name: string;
1006
+ slug: string;
1007
+ createdAt: Date;
1008
+ logo?: string | null | undefined;
1009
+ metadata?: any;
1010
+ } & (O["schema"] extends {
1011
+ organization?: {
1012
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
1013
+ } | undefined;
1014
+ } ? FieldAttributeToObject<Field> : {}) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never;
1015
+ }, "organization"> & {
1016
+ organizationName: ({
1017
+ id: string;
1018
+ name: string;
1019
+ slug: string;
1020
+ createdAt: Date;
1021
+ logo?: string | null | undefined;
1022
+ metadata?: any;
1023
+ } & (O["schema"] extends {
1024
+ organization?: {
1025
+ additionalFields: infer Field extends Record<string, _better_auth_core_db0.DBFieldAttribute>;
1026
+ } | undefined;
1027
+ } ? FieldAttributeToObject<Field> : {}))["name"];
1028
+ })[]>;
1029
+ //#endregion
1030
+ export { acceptInvitation, cancelInvitation, createInvitation, getInvitation, listInvitations, listUserInvitations, rejectInvitation };
1031
+ //# sourceMappingURL=crud-invites.d.mts.map