@gatwech/auth 1.0.0-beta.18

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 (422) hide show
  1. package/README.md +31 -0
  2. package/dist/access-BO2g7QVe.mjs +45 -0
  3. package/dist/access-C6O_osEz.mjs +79 -0
  4. package/dist/access-DT1f6l5k.mjs +51 -0
  5. package/dist/adapter-factory-BZ2Qiqpn.mjs +640 -0
  6. package/dist/adapters/drizzle-adapter/index.d.mts +47 -0
  7. package/dist/adapters/drizzle-adapter/index.mjs +208 -0
  8. package/dist/adapters/index.d.mts +132 -0
  9. package/dist/adapters/index.mjs +18 -0
  10. package/dist/adapters/kysely-adapter/index.d.mts +47 -0
  11. package/dist/adapters/kysely-adapter/index.mjs +11 -0
  12. package/dist/adapters/memory-adapter/index.d.mts +14 -0
  13. package/dist/adapters/memory-adapter/index.mjs +154 -0
  14. package/dist/adapters/mongodb-adapter/index.d.mts +35 -0
  15. package/dist/adapters/mongodb-adapter/index.mjs +315 -0
  16. package/dist/adapters/prisma-adapter/index.d.mts +34 -0
  17. package/dist/adapters/prisma-adapter/index.mjs +159 -0
  18. package/dist/adapters/test.d.mts +81 -0
  19. package/dist/adapters/test.mjs +793 -0
  20. package/dist/admin-Bcq53Nwj.mjs +743 -0
  21. package/dist/admin-DtfO1PLg.d.mts +1689 -0
  22. package/dist/anonymous-CRt1imBW.mjs +107 -0
  23. package/dist/api/index.d.mts +6 -0
  24. package/dist/api/index.mjs +17 -0
  25. package/dist/api-0pR_I-Nx.mjs +3139 -0
  26. package/dist/auth-CBUoBX6o.mjs +233 -0
  27. package/dist/bearer-Djf_awfo.mjs +63 -0
  28. package/dist/bun-sqlite-dialect-CeNvMaZz.mjs +155 -0
  29. package/dist/captcha-BqaMxlKC.mjs +178 -0
  30. package/dist/chunk-BK_LfMhE.mjs +40 -0
  31. package/dist/client/index.d.mts +186 -0
  32. package/dist/client/index.mjs +7 -0
  33. package/dist/client/plugins/index.d.mts +949 -0
  34. package/dist/client/plugins/index.mjs +539 -0
  35. package/dist/client/react/index.d.mts +179 -0
  36. package/dist/client/react/index.mjs +69 -0
  37. package/dist/client-BOX93C3d.d.mts +1250 -0
  38. package/dist/client-CNY0tn9g.d.mts +628 -0
  39. package/dist/client-CygJhqeB.mjs +29 -0
  40. package/dist/client-WiN43tAS.mjs +17 -0
  41. package/dist/client-aExCkfwm.mjs +30 -0
  42. package/dist/cookies/index.d.mts +7 -0
  43. package/dist/cookies/index.mjs +7 -0
  44. package/dist/cookies-cJObLwn1.mjs +597 -0
  45. package/dist/crypto/index.d.mts +44 -0
  46. package/dist/crypto/index.mjs +4 -0
  47. package/dist/crypto-Bb42eMrH.mjs +70 -0
  48. package/dist/custom-session-L3t7ecsd.mjs +67 -0
  49. package/dist/date-Cx2yCiC4.mjs +115 -0
  50. package/dist/db/index.d.mts +7 -0
  51. package/dist/db/index.mjs +15 -0
  52. package/dist/db-BrstmDhc.mjs +1124 -0
  53. package/dist/device-authorization-V4s3h4Mj.mjs +557 -0
  54. package/dist/dialect-CeddeGHf.mjs +72 -0
  55. package/dist/email-otp-BtDHSw14.mjs +592 -0
  56. package/dist/esm-C-QicDNz.mjs +4090 -0
  57. package/dist/generic-oauth-CL5X27ZI.mjs +445 -0
  58. package/dist/get-request-ip-DSjrEpGo.mjs +27 -0
  59. package/dist/get-tables-BQP7YW9c.mjs +249 -0
  60. package/dist/has-permission-BpAr7uCn.mjs +14 -0
  61. package/dist/haveibeenpwned-cMpJvmzI.mjs +43 -0
  62. package/dist/helper-tmxW3BHj.d.mts +21 -0
  63. package/dist/index-34ONrP8l.d.mts +503 -0
  64. package/dist/index-65G5U5DB-DSdjzreF.d.mts +2543 -0
  65. package/dist/index-B-XKqFvY.d.mts +30 -0
  66. package/dist/index-B3n8e37d.d.mts +165 -0
  67. package/dist/index-BBm8nQ9Q.d.mts +42 -0
  68. package/dist/index-BHoQlf7a.d.mts +7699 -0
  69. package/dist/index-BYMI9r_d.d.mts +257 -0
  70. package/dist/index-BqhKCbPH.d.mts +36 -0
  71. package/dist/index-Buhn3hkR.d.mts +433 -0
  72. package/dist/index-C-u1h_WX.d.mts +174 -0
  73. package/dist/index-C7fQuk-V.d.mts +41 -0
  74. package/dist/index-CM-CFWwr.d.mts +1919 -0
  75. package/dist/index-CuFzhoS6.d.mts +359 -0
  76. package/dist/index-Cxi7TbLE.d.mts +11347 -0
  77. package/dist/index-DB7t8whN.d.mts +1 -0
  78. package/dist/index-DKNNV1kb.d.mts +626 -0
  79. package/dist/index-DR0xXno9.d.mts +113 -0
  80. package/dist/index-D_k662QG.d.mts +833 -0
  81. package/dist/index-DaBcikv9.d.mts +118 -0
  82. package/dist/index-DlaMq1nb.d.mts +955 -0
  83. package/dist/index-DoXZYQpq.d.mts +290 -0
  84. package/dist/index-G6V0Z_Mn.d.mts +125 -0
  85. package/dist/index-z0KSvE5i.d.mts +246 -0
  86. package/dist/index-zjjNBRY2.d.mts +95 -0
  87. package/dist/index.d.mts +12 -0
  88. package/dist/index.mjs +33 -0
  89. package/dist/integrations/next-js.d.mts +21 -0
  90. package/dist/integrations/next-js.mjs +62 -0
  91. package/dist/integrations/node.d.mts +15 -0
  92. package/dist/integrations/node.mjs +15 -0
  93. package/dist/integrations/react-start.d.mts +15 -0
  94. package/dist/integrations/react-start.mjs +46 -0
  95. package/dist/json-D0TBLy4q.mjs +24 -0
  96. package/dist/jwt-CmxZAGe2.mjs +94 -0
  97. package/dist/jwt-lHV4QHpD.mjs +387 -0
  98. package/dist/kysely-adapter-DpzYO8Yf.mjs +181 -0
  99. package/dist/magic-link-Bk-ueorR.mjs +176 -0
  100. package/dist/misc-beA1w3XV.mjs +7 -0
  101. package/dist/multi-session-DRrLKrg9.mjs +144 -0
  102. package/dist/node-sqlite-dialect-BcKxBQnm.mjs +155 -0
  103. package/dist/oauth-proxy-D1sWh9B_.mjs +133 -0
  104. package/dist/oauth2/index.d.mts +60 -0
  105. package/dist/oauth2/index.mjs +19 -0
  106. package/dist/one-tap-DMswkTEc.mjs +113 -0
  107. package/dist/organization-BArHO_5v.mjs +3857 -0
  108. package/dist/parser-DcrIEuXE.mjs +73 -0
  109. package/dist/passkey-CcD4CnhM.mjs +558 -0
  110. package/dist/password-sVC4nePO.mjs +25 -0
  111. package/dist/permission-DLYUF3cW.mjs +15 -0
  112. package/dist/phone-number-rHDIlh-2.mjs +485 -0
  113. package/dist/plugin-helper-4L-lzsjZ.mjs +16 -0
  114. package/dist/plugins/access/index.d.mts +3 -0
  115. package/dist/plugins/access/index.mjs +3 -0
  116. package/dist/plugins/admin/access/index.d.mts +116 -0
  117. package/dist/plugins/admin/access/index.mjs +4 -0
  118. package/dist/plugins/admin/index.d.mts +9 -0
  119. package/dist/plugins/admin/index.mjs +22 -0
  120. package/dist/plugins/anonymous/index.d.mts +7 -0
  121. package/dist/plugins/anonymous/index.mjs +18 -0
  122. package/dist/plugins/bearer/index.d.mts +2 -0
  123. package/dist/plugins/bearer/index.mjs +8 -0
  124. package/dist/plugins/captcha/index.d.mts +2 -0
  125. package/dist/plugins/captcha/index.mjs +4 -0
  126. package/dist/plugins/custom-session/index.d.mts +7 -0
  127. package/dist/plugins/custom-session/index.mjs +19 -0
  128. package/dist/plugins/device-authorization/index.d.mts +4 -0
  129. package/dist/plugins/device-authorization/index.mjs +18 -0
  130. package/dist/plugins/email-otp/index.d.mts +3 -0
  131. package/dist/plugins/email-otp/index.mjs +19 -0
  132. package/dist/plugins/generic-oauth/index.d.mts +7 -0
  133. package/dist/plugins/generic-oauth/index.mjs +18 -0
  134. package/dist/plugins/haveibeenpwned/index.d.mts +2 -0
  135. package/dist/plugins/haveibeenpwned/index.mjs +18 -0
  136. package/dist/plugins/index.d.mts +139 -0
  137. package/dist/plugins/index.mjs +47 -0
  138. package/dist/plugins/jwt/index.d.mts +7 -0
  139. package/dist/plugins/jwt/index.mjs +18 -0
  140. package/dist/plugins/magic-link/index.d.mts +2 -0
  141. package/dist/plugins/magic-link/index.mjs +18 -0
  142. package/dist/plugins/multi-session/index.d.mts +3 -0
  143. package/dist/plugins/multi-session/index.mjs +18 -0
  144. package/dist/plugins/oauth-proxy/index.d.mts +2 -0
  145. package/dist/plugins/oauth-proxy/index.mjs +18 -0
  146. package/dist/plugins/one-tap/index.d.mts +2 -0
  147. package/dist/plugins/one-tap/index.mjs +18 -0
  148. package/dist/plugins/one-time-token/index.d.mts +7 -0
  149. package/dist/plugins/one-time-token/index.mjs +47 -0
  150. package/dist/plugins/organization/access/index.d.mts +4 -0
  151. package/dist/plugins/organization/access/index.mjs +4 -0
  152. package/dist/plugins/organization/index.d.mts +9 -0
  153. package/dist/plugins/organization/index.mjs +22 -0
  154. package/dist/plugins/passkey/index.d.mts +7 -0
  155. package/dist/plugins/passkey/index.mjs +18 -0
  156. package/dist/plugins/phone-number/index.d.mts +7 -0
  157. package/dist/plugins/phone-number/index.mjs +18 -0
  158. package/dist/plugins/two-factor/index.d.mts +7 -0
  159. package/dist/plugins/two-factor/index.mjs +20 -0
  160. package/dist/plugins/username/index.d.mts +4 -0
  161. package/dist/plugins/username/index.mjs +18 -0
  162. package/dist/plugins-3jfNste3.mjs +1544 -0
  163. package/dist/plugins-hFZT3hmK.d.mts +14 -0
  164. package/dist/promise-8rrEHRXd.mjs +23154 -0
  165. package/dist/proxy-CL9PZXJA.mjs +441 -0
  166. package/dist/session-Dgp133Yt.mjs +413 -0
  167. package/dist/social-providers/index.d.mts +1 -0
  168. package/dist/social-providers/index.mjs +3 -0
  169. package/dist/src/adapters/adapter-factory/index.d.ts +10 -0
  170. package/dist/src/adapters/adapter-factory/types.d.ts +124 -0
  171. package/dist/src/adapters/create-test-suite.d.ts +97 -0
  172. package/dist/src/adapters/drizzle-adapter/drizzle-adapter.d.ts +43 -0
  173. package/dist/src/adapters/drizzle-adapter/index.d.ts +1 -0
  174. package/dist/src/adapters/drizzle-adapter/test/generate-schema.d.ts +12 -0
  175. package/dist/src/adapters/index.d.ts +21 -0
  176. package/dist/src/adapters/kysely-adapter/bun-sqlite-dialect.d.ts +58 -0
  177. package/dist/src/adapters/kysely-adapter/dialect.d.ts +13 -0
  178. package/dist/src/adapters/kysely-adapter/index.d.ts +3 -0
  179. package/dist/src/adapters/kysely-adapter/kysely-adapter.d.ts +32 -0
  180. package/dist/src/adapters/kysely-adapter/node-sqlite-dialect.d.ts +58 -0
  181. package/dist/src/adapters/kysely-adapter/types.d.ts +1 -0
  182. package/dist/src/adapters/memory-adapter/index.d.ts +1 -0
  183. package/dist/src/adapters/memory-adapter/memory-adapter.d.ts +9 -0
  184. package/dist/src/adapters/mongodb-adapter/index.d.ts +1 -0
  185. package/dist/src/adapters/mongodb-adapter/mongodb-adapter.d.ts +31 -0
  186. package/dist/src/adapters/prisma-adapter/index.d.ts +1 -0
  187. package/dist/src/adapters/prisma-adapter/prisma-adapter.d.ts +32 -0
  188. package/dist/src/adapters/prisma-adapter/test/auth.d.ts +3 -0
  189. package/dist/src/adapters/prisma-adapter/test/generate-auth-config.d.ts +2 -0
  190. package/dist/src/adapters/prisma-adapter/test/generate-prisma-schema.d.ts +3 -0
  191. package/dist/src/adapters/prisma-adapter/test/get-prisma-client.d.ts +7 -0
  192. package/dist/src/adapters/prisma-adapter/test/push-prisma-schema.d.ts +1 -0
  193. package/dist/src/adapters/test-adapter.d.ts +61 -0
  194. package/dist/src/adapters/test.d.ts +78 -0
  195. package/dist/src/adapters/tests/auth-flow.d.ts +22 -0
  196. package/dist/src/adapters/tests/index.d.ts +5 -0
  197. package/dist/src/adapters/tests/normal.d.ts +87 -0
  198. package/dist/src/adapters/tests/number-id.d.ts +17 -0
  199. package/dist/src/adapters/tests/performance.d.ts +24 -0
  200. package/dist/src/adapters/tests/transactions.d.ts +20 -0
  201. package/dist/src/adapters/utils.d.ts +3 -0
  202. package/dist/src/api/index.d.ts +7150 -0
  203. package/dist/src/api/middlewares/index.d.ts +2 -0
  204. package/dist/src/api/middlewares/oauth.d.ts +15 -0
  205. package/dist/src/api/middlewares/origin-check.d.ts +8 -0
  206. package/dist/src/api/rate-limiter/index.d.ts +13 -0
  207. package/dist/src/api/routes/account.d.ts +623 -0
  208. package/dist/src/api/routes/callback.d.ts +68 -0
  209. package/dist/src/api/routes/email-verification.d.ts +266 -0
  210. package/dist/src/api/routes/error.d.ts +51 -0
  211. package/dist/src/api/routes/index.d.ts +11 -0
  212. package/dist/src/api/routes/ok.d.ts +61 -0
  213. package/dist/src/api/routes/reset-password.d.ts +203 -0
  214. package/dist/src/api/routes/session.d.ts +586 -0
  215. package/dist/src/api/routes/sign-in.d.ts +298 -0
  216. package/dist/src/api/routes/sign-out.d.ts +59 -0
  217. package/dist/src/api/routes/sign-up.d.ts +625 -0
  218. package/dist/src/api/routes/update-user.d.ts +862 -0
  219. package/dist/src/api/to-auth-endpoints.d.ts +3 -0
  220. package/dist/src/auth.d.ts +25 -0
  221. package/dist/src/client/broadcast-channel.d.ts +12 -0
  222. package/dist/src/client/config.d.ts +85 -0
  223. package/dist/src/client/fetch-plugins.d.ts +14 -0
  224. package/dist/src/client/index.d.ts +15 -0
  225. package/dist/src/client/parser.d.ts +12 -0
  226. package/dist/src/client/path-to-object.d.ts +63 -0
  227. package/dist/src/client/plugins/index.d.ts +21 -0
  228. package/dist/src/client/plugins/infer-plugin.d.ts +11 -0
  229. package/dist/src/client/proxy.d.ts +8 -0
  230. package/dist/src/client/query.d.ts +16 -0
  231. package/dist/src/client/react/index.d.ts +130 -0
  232. package/dist/src/client/react/react-store.d.ts +43 -0
  233. package/dist/src/client/session-atom.d.ts +18 -0
  234. package/dist/src/client/session-refresh.d.ts +17 -0
  235. package/dist/src/client/test-plugin.d.ts +147 -0
  236. package/dist/src/client/types.d.ts +49 -0
  237. package/dist/src/client/vanilla.d.ts +124 -0
  238. package/dist/src/cookies/check-cookies.d.ts +4 -0
  239. package/dist/src/cookies/cookie-utils.d.ts +16 -0
  240. package/dist/src/cookies/index.d.ts +56 -0
  241. package/dist/src/cookies/session-store.d.ts +43 -0
  242. package/dist/src/crypto/buffer.d.ts +4 -0
  243. package/dist/src/crypto/index.d.ts +14 -0
  244. package/dist/src/crypto/jwt.d.ts +4 -0
  245. package/dist/src/crypto/password.d.ts +5 -0
  246. package/dist/src/crypto/random.d.ts +1 -0
  247. package/dist/src/db/field.d.ts +97 -0
  248. package/dist/src/db/get-migration.d.ts +18 -0
  249. package/dist/src/db/get-schema.d.ts +6 -0
  250. package/dist/src/db/get-tables.d.ts +3 -0
  251. package/dist/src/db/index.d.ts +10 -0
  252. package/dist/src/db/internal-adapter.d.ts +9 -0
  253. package/dist/src/db/schema.d.ts +76 -0
  254. package/dist/src/db/to-zod.d.ts +31 -0
  255. package/dist/src/db/utils.d.ts +6 -0
  256. package/dist/src/db/with-hooks.d.ts +27 -0
  257. package/dist/src/index.d.ts +14 -0
  258. package/dist/src/init.d.ts +2 -0
  259. package/dist/src/integrations/next-js.d.ts +15 -0
  260. package/dist/src/integrations/node.d.ts +6 -0
  261. package/dist/src/integrations/react-start.d.ts +9 -0
  262. package/dist/src/oauth2/index.d.ts +4 -0
  263. package/dist/src/oauth2/link-account.d.ts +41 -0
  264. package/dist/src/oauth2/state.d.ts +21 -0
  265. package/dist/src/oauth2/utils.d.ts +3 -0
  266. package/dist/src/plugins/access/access.d.ts +25 -0
  267. package/dist/src/plugins/access/index.d.ts +2 -0
  268. package/dist/src/plugins/access/types.d.ts +14 -0
  269. package/dist/src/plugins/additional-fields/client.d.ts +91 -0
  270. package/dist/src/plugins/admin/access/index.d.ts +1 -0
  271. package/dist/src/plugins/admin/access/statement.d.ts +110 -0
  272. package/dist/src/plugins/admin/admin.d.ts +1570 -0
  273. package/dist/src/plugins/admin/client.d.ts +62 -0
  274. package/dist/src/plugins/admin/error-codes.d.ts +21 -0
  275. package/dist/src/plugins/admin/has-permission.d.ts +21 -0
  276. package/dist/src/plugins/admin/index.d.ts +2 -0
  277. package/dist/src/plugins/admin/schema.d.ts +36 -0
  278. package/dist/src/plugins/admin/types.d.ts +77 -0
  279. package/dist/src/plugins/anonymous/client.d.ts +8 -0
  280. package/dist/src/plugins/anonymous/index.d.ts +159 -0
  281. package/dist/src/plugins/api-key/client.d.ts +11 -0
  282. package/dist/src/plugins/api-key/index.d.ts +1431 -0
  283. package/dist/src/plugins/api-key/rate-limit.d.ts +20 -0
  284. package/dist/src/plugins/api-key/routes/create-api-key.d.ts +244 -0
  285. package/dist/src/plugins/api-key/routes/delete-all-expired-api-keys.d.ts +45 -0
  286. package/dist/src/plugins/api-key/routes/delete-api-key.d.ts +112 -0
  287. package/dist/src/plugins/api-key/routes/get-api-key.d.ts +234 -0
  288. package/dist/src/plugins/api-key/routes/index.d.ts +1136 -0
  289. package/dist/src/plugins/api-key/routes/list-api-keys.d.ts +231 -0
  290. package/dist/src/plugins/api-key/routes/update-api-key.d.ts +235 -0
  291. package/dist/src/plugins/api-key/routes/verify-api-key.d.ts +80 -0
  292. package/dist/src/plugins/api-key/schema.d.ts +188 -0
  293. package/dist/src/plugins/api-key/types.d.ts +285 -0
  294. package/dist/src/plugins/bearer/index.d.ts +31 -0
  295. package/dist/src/plugins/captcha/constants.d.ts +9 -0
  296. package/dist/src/plugins/captcha/error-codes.d.ts +9 -0
  297. package/dist/src/plugins/captcha/index.d.ts +7 -0
  298. package/dist/src/plugins/captcha/types.d.ts +23 -0
  299. package/dist/src/plugins/captcha/utils.d.ts +1 -0
  300. package/dist/src/plugins/captcha/verify-handlers/captchafox.d.ts +11 -0
  301. package/dist/src/plugins/captcha/verify-handlers/cloudflare-turnstile.d.ts +10 -0
  302. package/dist/src/plugins/captcha/verify-handlers/google-recaptcha.d.ts +11 -0
  303. package/dist/src/plugins/captcha/verify-handlers/h-captcha.d.ts +11 -0
  304. package/dist/src/plugins/captcha/verify-handlers/index.d.ts +4 -0
  305. package/dist/src/plugins/custom-session/client.d.ts +12 -0
  306. package/dist/src/plugins/custom-session/index.d.ts +89 -0
  307. package/dist/src/plugins/device-authorization/client.d.ts +12 -0
  308. package/dist/src/plugins/device-authorization/index.d.ts +568 -0
  309. package/dist/src/plugins/device-authorization/schema.d.ts +56 -0
  310. package/dist/src/plugins/email-otp/client.d.ts +9 -0
  311. package/dist/src/plugins/email-otp/index.d.ts +826 -0
  312. package/dist/src/plugins/email-otp/utils.d.ts +2 -0
  313. package/dist/src/plugins/generic-oauth/client.d.ts +5 -0
  314. package/dist/src/plugins/generic-oauth/index.d.ts +428 -0
  315. package/dist/src/plugins/haveibeenpwned/index.d.ts +25 -0
  316. package/dist/src/plugins/index.d.ts +28 -0
  317. package/dist/src/plugins/jwt/adapter.d.ts +8 -0
  318. package/dist/src/plugins/jwt/client.d.ts +5 -0
  319. package/dist/src/plugins/jwt/index.d.ts +276 -0
  320. package/dist/src/plugins/jwt/schema.d.ts +18 -0
  321. package/dist/src/plugins/jwt/sign.d.ts +8 -0
  322. package/dist/src/plugins/jwt/types.d.ts +175 -0
  323. package/dist/src/plugins/jwt/utils.d.ts +46 -0
  324. package/dist/src/plugins/last-login-method/client.d.ts +34 -0
  325. package/dist/src/plugins/last-login-method/index.d.ts +103 -0
  326. package/dist/src/plugins/magic-link/client.d.ts +5 -0
  327. package/dist/src/plugins/magic-link/index.d.ts +253 -0
  328. package/dist/src/plugins/magic-link/utils.d.ts +1 -0
  329. package/dist/src/plugins/multi-session/client.d.ts +9 -0
  330. package/dist/src/plugins/multi-session/index.d.ts +284 -0
  331. package/dist/src/plugins/oauth-proxy/index.d.ts +119 -0
  332. package/dist/src/plugins/one-tap/client.d.ts +81 -0
  333. package/dist/src/plugins/one-tap/index.d.ts +114 -0
  334. package/dist/src/plugins/one-time-token/client.d.ts +5 -0
  335. package/dist/src/plugins/one-time-token/index.d.ts +170 -0
  336. package/dist/src/plugins/one-time-token/utils.d.ts +1 -0
  337. package/dist/src/plugins/organization/access/index.d.ts +1 -0
  338. package/dist/src/plugins/organization/access/statement.d.ts +241 -0
  339. package/dist/src/plugins/organization/adapter.d.ts +685 -0
  340. package/dist/src/plugins/organization/call.d.ts +55 -0
  341. package/dist/src/plugins/organization/client.d.ts +344 -0
  342. package/dist/src/plugins/organization/error-codes.d.ts +58 -0
  343. package/dist/src/plugins/organization/has-permission.d.ts +13 -0
  344. package/dist/src/plugins/organization/index.d.ts +4 -0
  345. package/dist/src/plugins/organization/organization.d.ts +412 -0
  346. package/dist/src/plugins/organization/permission.d.ts +27 -0
  347. package/dist/src/plugins/organization/routes/crud-access-control.d.ts +701 -0
  348. package/dist/src/plugins/organization/routes/crud-invites.d.ts +1522 -0
  349. package/dist/src/plugins/organization/routes/crud-members.d.ts +1220 -0
  350. package/dist/src/plugins/organization/routes/crud-org.d.ts +1399 -0
  351. package/dist/src/plugins/organization/routes/crud-team.d.ts +1323 -0
  352. package/dist/src/plugins/organization/schema.d.ts +366 -0
  353. package/dist/src/plugins/organization/types.d.ts +737 -0
  354. package/dist/src/plugins/passkey/client.d.ts +190 -0
  355. package/dist/src/plugins/passkey/error-codes.d.ts +9 -0
  356. package/dist/src/plugins/passkey/index.d.ts +838 -0
  357. package/dist/src/plugins/passkey/schema.d.ts +50 -0
  358. package/dist/src/plugins/passkey/types.d.ts +69 -0
  359. package/dist/src/plugins/passkey/utils.d.ts +2 -0
  360. package/dist/src/plugins/phone-number/client.d.ts +9 -0
  361. package/dist/src/plugins/phone-number/index.d.ts +622 -0
  362. package/dist/src/plugins/phone-number/phone-number-error.d.ts +10 -0
  363. package/dist/src/plugins/two-factor/backup-codes/index.d.ts +387 -0
  364. package/dist/src/plugins/two-factor/client.d.ts +28 -0
  365. package/dist/src/plugins/two-factor/constant.d.ts +2 -0
  366. package/dist/src/plugins/two-factor/error-code.d.ts +11 -0
  367. package/dist/src/plugins/two-factor/index.d.ts +1014 -0
  368. package/dist/src/plugins/two-factor/otp/index.d.ts +282 -0
  369. package/dist/src/plugins/two-factor/schema.d.ts +35 -0
  370. package/dist/src/plugins/two-factor/totp/index.d.ts +298 -0
  371. package/dist/src/plugins/two-factor/types.d.ts +50 -0
  372. package/dist/src/plugins/two-factor/utils.d.ts +1 -0
  373. package/dist/src/plugins/two-factor/verify-two-factor.d.ts +59 -0
  374. package/dist/src/plugins/username/client.d.ts +5 -0
  375. package/dist/src/plugins/username/error-codes.d.ts +10 -0
  376. package/dist/src/plugins/username/index.d.ts +313 -0
  377. package/dist/src/plugins/username/schema.d.ts +27 -0
  378. package/dist/src/social-providers/index.d.ts +1 -0
  379. package/dist/src/test-utils/headers.d.ts +5 -0
  380. package/dist/src/test-utils/index.d.ts +2 -0
  381. package/dist/src/test-utils/test-instance.d.ts +17849 -0
  382. package/dist/src/types/adapter.d.ts +21 -0
  383. package/dist/src/types/api.d.ts +29 -0
  384. package/dist/src/types/helper.d.ts +32 -0
  385. package/dist/src/types/index.d.ts +7 -0
  386. package/dist/src/types/models.d.ts +13 -0
  387. package/dist/src/types/plugins.d.ts +14 -0
  388. package/dist/src/utils/await-object.d.ts +3 -0
  389. package/dist/src/utils/boolean.d.ts +1 -0
  390. package/dist/src/utils/clone.d.ts +1 -0
  391. package/dist/src/utils/constants.d.ts +1 -0
  392. package/dist/src/utils/date.d.ts +1 -0
  393. package/dist/src/utils/ensure-utc.d.ts +1 -0
  394. package/dist/src/utils/get-request-ip.d.ts +2 -0
  395. package/dist/src/utils/hashing.d.ts +6 -0
  396. package/dist/src/utils/hide-metadata.d.ts +3 -0
  397. package/dist/src/utils/id.d.ts +1 -0
  398. package/dist/src/utils/import-util.d.ts +1 -0
  399. package/dist/src/utils/index.d.ts +5 -0
  400. package/dist/src/utils/is-atom.d.ts +2 -0
  401. package/dist/src/utils/is-promise.d.ts +1 -0
  402. package/dist/src/utils/json.d.ts +1 -0
  403. package/dist/src/utils/merger.d.ts +1 -0
  404. package/dist/src/utils/middleware-response.d.ts +8 -0
  405. package/dist/src/utils/misc.d.ts +1 -0
  406. package/dist/src/utils/password.d.ts +6 -0
  407. package/dist/src/utils/plugin-helper.d.ts +5 -0
  408. package/dist/src/utils/shim.d.ts +3 -0
  409. package/dist/src/utils/time.d.ts +4 -0
  410. package/dist/src/utils/url.d.ts +4 -0
  411. package/dist/src/utils/wildcard.d.ts +45 -0
  412. package/dist/test-utils/index.d.mts +17870 -0
  413. package/dist/test-utils/index.mjs +272 -0
  414. package/dist/two-factor-ClUXxom2.mjs +914 -0
  415. package/dist/types/index.d.mts +6 -0
  416. package/dist/types/index.mjs +3 -0
  417. package/dist/types-B1OL7hyf.d.mts +4 -0
  418. package/dist/types-Bjn15Uy6.mjs +1 -0
  419. package/dist/url-VB2gAbTI.mjs +59 -0
  420. package/dist/username-DiGklOGl.mjs +278 -0
  421. package/dist/utils-SOMB4Px5.mjs +132 -0
  422. package/package.json +447 -0
@@ -0,0 +1,1431 @@
1
+ import type { ApiKeyOptions } from "./types";
2
+ export declare const defaultKeyHasher: (key: string) => Promise<string>;
3
+ export declare const ERROR_CODES: {
4
+ readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
5
+ readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
6
+ readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
7
+ readonly USER_BANNED: "User is banned";
8
+ readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
9
+ readonly KEY_NOT_FOUND: "API Key not found";
10
+ readonly KEY_DISABLED: "API Key is disabled";
11
+ readonly KEY_EXPIRED: "API Key has expired";
12
+ readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
13
+ readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
14
+ readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
15
+ readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
16
+ readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
17
+ readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
18
+ readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
19
+ readonly METADATA_DISABLED: "Metadata is disabled.";
20
+ readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
21
+ readonly NO_VALUES_TO_UPDATE: "No values to update.";
22
+ readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
23
+ readonly INVALID_API_KEY: "Invalid API key.";
24
+ readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
25
+ readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
26
+ readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
27
+ readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
28
+ readonly NAME_REQUIRED: "API Key name is required.";
29
+ };
30
+ export declare const API_KEY_TABLE_NAME = "apikey";
31
+ export declare const apiKey: (options?: ApiKeyOptions | undefined) => {
32
+ id: "api-key";
33
+ $ERROR_CODES: {
34
+ readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
35
+ readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
36
+ readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
37
+ readonly USER_BANNED: "User is banned";
38
+ readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
39
+ readonly KEY_NOT_FOUND: "API Key not found";
40
+ readonly KEY_DISABLED: "API Key is disabled";
41
+ readonly KEY_EXPIRED: "API Key has expired";
42
+ readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
43
+ readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
44
+ readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
45
+ readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
46
+ readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
47
+ readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
48
+ readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
49
+ readonly METADATA_DISABLED: "Metadata is disabled.";
50
+ readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
51
+ readonly NO_VALUES_TO_UPDATE: "No values to update.";
52
+ readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
53
+ readonly INVALID_API_KEY: "Invalid API key.";
54
+ readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
55
+ readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
56
+ readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
57
+ readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
58
+ readonly NAME_REQUIRED: "API Key name is required.";
59
+ };
60
+ hooks: {
61
+ before: {
62
+ matcher: (ctx: import("@gatwech/core").HookEndpointContext) => boolean;
63
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
64
+ user: {
65
+ id: string;
66
+ createdAt: Date;
67
+ updatedAt: Date;
68
+ email: string;
69
+ emailVerified: boolean;
70
+ name: string;
71
+ image?: string | null | undefined;
72
+ };
73
+ session: {
74
+ id: string;
75
+ token: string;
76
+ userId: string;
77
+ userAgent: string | null;
78
+ ipAddress: string | null;
79
+ createdAt: Date;
80
+ updatedAt: Date;
81
+ expiresAt: Date;
82
+ };
83
+ } | {
84
+ context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("@gatwech/core").AuthContext<import("@gatwech/core").PayvoAuthOptions> & {
85
+ returned?: unknown | undefined;
86
+ responseHeaders?: Headers | undefined;
87
+ }>;
88
+ }>;
89
+ }[];
90
+ };
91
+ endpoints: {
92
+ /**
93
+ * ### Endpoint
94
+ *
95
+ * POST `/api-key/create`
96
+ *
97
+ * ### API Methods
98
+ *
99
+ * **server:**
100
+ * `auth.api.createApiKey`
101
+ *
102
+ * **client:**
103
+ * `authClient.apiKey.create`
104
+ *
105
+ * @see [Read our docs to learn more.](https://payvopayvo.com/docs/plugins/api-key#api-method-api-key-create)
106
+ */
107
+ createApiKey: {
108
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
109
+ body: {
110
+ name?: string | undefined;
111
+ expiresIn?: number | null | undefined;
112
+ userId?: unknown;
113
+ prefix?: string | undefined;
114
+ remaining?: number | null | undefined;
115
+ metadata?: any;
116
+ refillAmount?: number | undefined;
117
+ refillInterval?: number | undefined;
118
+ rateLimitTimeWindow?: number | undefined;
119
+ rateLimitMax?: number | undefined;
120
+ rateLimitEnabled?: boolean | undefined;
121
+ permissions?: Record<string, string[]> | undefined;
122
+ };
123
+ } & {
124
+ method?: "POST" | undefined;
125
+ } & {
126
+ query?: Record<string, any> | undefined;
127
+ } & {
128
+ params?: Record<string, any>;
129
+ } & {
130
+ request?: Request;
131
+ } & {
132
+ headers?: HeadersInit;
133
+ } & {
134
+ asResponse?: boolean;
135
+ returnHeaders?: boolean;
136
+ use?: import("better-call").Middleware[];
137
+ path?: string;
138
+ } & {
139
+ asResponse?: AsResponse | undefined;
140
+ returnHeaders?: ReturnHeaders | undefined;
141
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
142
+ headers: Headers;
143
+ response: {
144
+ key: string;
145
+ metadata: any;
146
+ permissions: any;
147
+ id: string;
148
+ name: string | null;
149
+ start: string | null;
150
+ prefix: string | null;
151
+ userId: string;
152
+ refillInterval: number | null;
153
+ refillAmount: number | null;
154
+ lastRefillAt: Date | null;
155
+ enabled: boolean;
156
+ rateLimitEnabled: boolean;
157
+ rateLimitTimeWindow: number | null;
158
+ rateLimitMax: number | null;
159
+ requestCount: number;
160
+ remaining: number | null;
161
+ lastRequest: Date | null;
162
+ expiresAt: Date | null;
163
+ createdAt: Date;
164
+ updatedAt: Date;
165
+ };
166
+ } : {
167
+ key: string;
168
+ metadata: any;
169
+ permissions: any;
170
+ id: string;
171
+ name: string | null;
172
+ start: string | null;
173
+ prefix: string | null;
174
+ userId: string;
175
+ refillInterval: number | null;
176
+ refillAmount: number | null;
177
+ lastRefillAt: Date | null;
178
+ enabled: boolean;
179
+ rateLimitEnabled: boolean;
180
+ rateLimitTimeWindow: number | null;
181
+ rateLimitMax: number | null;
182
+ requestCount: number;
183
+ remaining: number | null;
184
+ lastRequest: Date | null;
185
+ expiresAt: Date | null;
186
+ createdAt: Date;
187
+ updatedAt: Date;
188
+ }>;
189
+ options: {
190
+ method: "POST";
191
+ body: import("zod").ZodObject<{
192
+ name: import("zod").ZodOptional<import("zod").ZodString>;
193
+ expiresIn: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
194
+ userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
195
+ prefix: import("zod").ZodOptional<import("zod").ZodString>;
196
+ remaining: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
197
+ metadata: import("zod").ZodOptional<import("zod").ZodAny>;
198
+ refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
199
+ refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
200
+ rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
201
+ rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
202
+ rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
203
+ permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
204
+ }, import("zod/v4/core").$strip>;
205
+ metadata: {
206
+ openapi: {
207
+ description: string;
208
+ responses: {
209
+ "200": {
210
+ description: string;
211
+ content: {
212
+ "application/json": {
213
+ schema: {
214
+ type: "object";
215
+ properties: {
216
+ id: {
217
+ type: string;
218
+ description: string;
219
+ };
220
+ createdAt: {
221
+ type: string;
222
+ format: string;
223
+ description: string;
224
+ };
225
+ updatedAt: {
226
+ type: string;
227
+ format: string;
228
+ description: string;
229
+ };
230
+ name: {
231
+ type: string;
232
+ nullable: boolean;
233
+ description: string;
234
+ };
235
+ prefix: {
236
+ type: string;
237
+ nullable: boolean;
238
+ description: string;
239
+ };
240
+ start: {
241
+ type: string;
242
+ nullable: boolean;
243
+ description: string;
244
+ };
245
+ key: {
246
+ type: string;
247
+ description: string;
248
+ };
249
+ enabled: {
250
+ type: string;
251
+ description: string;
252
+ };
253
+ expiresAt: {
254
+ type: string;
255
+ format: string;
256
+ nullable: boolean;
257
+ description: string;
258
+ };
259
+ userId: {
260
+ type: string;
261
+ description: string;
262
+ };
263
+ lastRefillAt: {
264
+ type: string;
265
+ format: string;
266
+ nullable: boolean;
267
+ description: string;
268
+ };
269
+ lastRequest: {
270
+ type: string;
271
+ format: string;
272
+ nullable: boolean;
273
+ description: string;
274
+ };
275
+ metadata: {
276
+ type: string;
277
+ nullable: boolean;
278
+ additionalProperties: boolean;
279
+ description: string;
280
+ };
281
+ rateLimitMax: {
282
+ type: string;
283
+ nullable: boolean;
284
+ description: string;
285
+ };
286
+ rateLimitTimeWindow: {
287
+ type: string;
288
+ nullable: boolean;
289
+ description: string;
290
+ };
291
+ remaining: {
292
+ type: string;
293
+ nullable: boolean;
294
+ description: string;
295
+ };
296
+ refillAmount: {
297
+ type: string;
298
+ nullable: boolean;
299
+ description: string;
300
+ };
301
+ refillInterval: {
302
+ type: string;
303
+ nullable: boolean;
304
+ description: string;
305
+ };
306
+ rateLimitEnabled: {
307
+ type: string;
308
+ description: string;
309
+ };
310
+ requestCount: {
311
+ type: string;
312
+ description: string;
313
+ };
314
+ permissions: {
315
+ type: string;
316
+ nullable: boolean;
317
+ additionalProperties: {
318
+ type: string;
319
+ items: {
320
+ type: string;
321
+ };
322
+ };
323
+ description: string;
324
+ };
325
+ };
326
+ required: string[];
327
+ };
328
+ };
329
+ };
330
+ };
331
+ };
332
+ };
333
+ };
334
+ } & {
335
+ use: any[];
336
+ };
337
+ path: "/api-key/create";
338
+ };
339
+ /**
340
+ * ### Endpoint
341
+ *
342
+ * POST `/api-key/verify`
343
+ *
344
+ * ### API Methods
345
+ *
346
+ * **server:**
347
+ * `auth.api.verifyApiKey`
348
+ *
349
+ * @see [Read our docs to learn more.](https://payvopayvo.com/docs/plugins/api-key#api-method-api-key-verify)
350
+ */
351
+ verifyApiKey: {
352
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
353
+ body: {
354
+ key: string;
355
+ permissions?: Record<string, string[]> | undefined;
356
+ };
357
+ } & {
358
+ method?: "POST" | undefined;
359
+ } & {
360
+ query?: Record<string, any> | undefined;
361
+ } & {
362
+ params?: Record<string, any>;
363
+ } & {
364
+ request?: Request;
365
+ } & {
366
+ headers?: HeadersInit;
367
+ } & {
368
+ asResponse?: boolean;
369
+ returnHeaders?: boolean;
370
+ use?: import("better-call").Middleware[];
371
+ path?: string;
372
+ } & {
373
+ asResponse?: AsResponse | undefined;
374
+ returnHeaders?: ReturnHeaders | undefined;
375
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
376
+ headers: Headers;
377
+ response: {
378
+ valid: boolean;
379
+ error: {
380
+ message: string | undefined;
381
+ code: string;
382
+ };
383
+ key: null;
384
+ } | {
385
+ valid: boolean;
386
+ error: null;
387
+ key: Omit<import("./types").ApiKey, "key"> | null;
388
+ };
389
+ } : {
390
+ valid: boolean;
391
+ error: {
392
+ message: string | undefined;
393
+ code: string;
394
+ };
395
+ key: null;
396
+ } | {
397
+ valid: boolean;
398
+ error: null;
399
+ key: Omit<import("./types").ApiKey, "key"> | null;
400
+ }>;
401
+ options: {
402
+ method: "POST";
403
+ body: import("zod").ZodObject<{
404
+ key: import("zod").ZodString;
405
+ permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
406
+ }, import("zod/v4/core").$strip>;
407
+ metadata: {
408
+ SERVER_ONLY: true;
409
+ };
410
+ } & {
411
+ use: any[];
412
+ };
413
+ path: "/api-key/verify";
414
+ };
415
+ /**
416
+ * ### Endpoint
417
+ *
418
+ * GET `/api-key/get`
419
+ *
420
+ * ### API Methods
421
+ *
422
+ * **server:**
423
+ * `auth.api.getApiKey`
424
+ *
425
+ * **client:**
426
+ * `authClient.apiKey.get`
427
+ *
428
+ * @see [Read our docs to learn more.](https://payvopayvo.com/docs/plugins/api-key#api-method-api-key-get)
429
+ */
430
+ getApiKey: {
431
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
432
+ body?: undefined;
433
+ } & {
434
+ method?: "GET" | undefined;
435
+ } & {
436
+ query: {
437
+ id: string;
438
+ };
439
+ } & {
440
+ params?: Record<string, any>;
441
+ } & {
442
+ request?: Request;
443
+ } & {
444
+ headers?: HeadersInit;
445
+ } & {
446
+ asResponse?: boolean;
447
+ returnHeaders?: boolean;
448
+ use?: import("better-call").Middleware[];
449
+ path?: string;
450
+ } & {
451
+ asResponse?: AsResponse | undefined;
452
+ returnHeaders?: ReturnHeaders | undefined;
453
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
454
+ headers: Headers;
455
+ response: {
456
+ permissions: {
457
+ [key: string]: string[];
458
+ } | null;
459
+ id: string;
460
+ name: string | null;
461
+ start: string | null;
462
+ prefix: string | null;
463
+ userId: string;
464
+ refillInterval: number | null;
465
+ refillAmount: number | null;
466
+ lastRefillAt: Date | null;
467
+ enabled: boolean;
468
+ rateLimitEnabled: boolean;
469
+ rateLimitTimeWindow: number | null;
470
+ rateLimitMax: number | null;
471
+ requestCount: number;
472
+ remaining: number | null;
473
+ lastRequest: Date | null;
474
+ expiresAt: Date | null;
475
+ createdAt: Date;
476
+ updatedAt: Date;
477
+ metadata: Record<string, any> | null;
478
+ };
479
+ } : {
480
+ permissions: {
481
+ [key: string]: string[];
482
+ } | null;
483
+ id: string;
484
+ name: string | null;
485
+ start: string | null;
486
+ prefix: string | null;
487
+ userId: string;
488
+ refillInterval: number | null;
489
+ refillAmount: number | null;
490
+ lastRefillAt: Date | null;
491
+ enabled: boolean;
492
+ rateLimitEnabled: boolean;
493
+ rateLimitTimeWindow: number | null;
494
+ rateLimitMax: number | null;
495
+ requestCount: number;
496
+ remaining: number | null;
497
+ lastRequest: Date | null;
498
+ expiresAt: Date | null;
499
+ createdAt: Date;
500
+ updatedAt: Date;
501
+ metadata: Record<string, any> | null;
502
+ }>;
503
+ options: {
504
+ method: "GET";
505
+ query: import("zod").ZodObject<{
506
+ id: import("zod").ZodString;
507
+ }, import("zod/v4/core").$strip>;
508
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
509
+ session: {
510
+ session: Record<string, any> & {
511
+ id: string;
512
+ createdAt: Date;
513
+ updatedAt: Date;
514
+ userId: string;
515
+ expiresAt: Date;
516
+ token: string;
517
+ ipAddress?: string | null | undefined;
518
+ userAgent?: string | null | undefined;
519
+ };
520
+ user: Record<string, any> & {
521
+ id: string;
522
+ createdAt: Date;
523
+ updatedAt: Date;
524
+ email: string;
525
+ emailVerified: boolean;
526
+ name: string;
527
+ image?: string | null | undefined;
528
+ };
529
+ };
530
+ }>)[];
531
+ metadata: {
532
+ openapi: {
533
+ description: string;
534
+ responses: {
535
+ "200": {
536
+ description: string;
537
+ content: {
538
+ "application/json": {
539
+ schema: {
540
+ type: "object";
541
+ properties: {
542
+ id: {
543
+ type: string;
544
+ description: string;
545
+ };
546
+ name: {
547
+ type: string;
548
+ nullable: boolean;
549
+ description: string;
550
+ };
551
+ start: {
552
+ type: string;
553
+ nullable: boolean;
554
+ description: string;
555
+ };
556
+ prefix: {
557
+ type: string;
558
+ nullable: boolean;
559
+ description: string;
560
+ };
561
+ userId: {
562
+ type: string;
563
+ description: string;
564
+ };
565
+ refillInterval: {
566
+ type: string;
567
+ nullable: boolean;
568
+ description: string;
569
+ };
570
+ refillAmount: {
571
+ type: string;
572
+ nullable: boolean;
573
+ description: string;
574
+ };
575
+ lastRefillAt: {
576
+ type: string;
577
+ format: string;
578
+ nullable: boolean;
579
+ description: string;
580
+ };
581
+ enabled: {
582
+ type: string;
583
+ description: string;
584
+ default: boolean;
585
+ };
586
+ rateLimitEnabled: {
587
+ type: string;
588
+ description: string;
589
+ };
590
+ rateLimitTimeWindow: {
591
+ type: string;
592
+ nullable: boolean;
593
+ description: string;
594
+ };
595
+ rateLimitMax: {
596
+ type: string;
597
+ nullable: boolean;
598
+ description: string;
599
+ };
600
+ requestCount: {
601
+ type: string;
602
+ description: string;
603
+ };
604
+ remaining: {
605
+ type: string;
606
+ nullable: boolean;
607
+ description: string;
608
+ };
609
+ lastRequest: {
610
+ type: string;
611
+ format: string;
612
+ nullable: boolean;
613
+ description: string;
614
+ };
615
+ expiresAt: {
616
+ type: string;
617
+ format: string;
618
+ nullable: boolean;
619
+ description: string;
620
+ };
621
+ createdAt: {
622
+ type: string;
623
+ format: string;
624
+ description: string;
625
+ };
626
+ updatedAt: {
627
+ type: string;
628
+ format: string;
629
+ description: string;
630
+ };
631
+ metadata: {
632
+ type: string;
633
+ nullable: boolean;
634
+ additionalProperties: boolean;
635
+ description: string;
636
+ };
637
+ permissions: {
638
+ type: string;
639
+ nullable: boolean;
640
+ description: string;
641
+ };
642
+ };
643
+ required: string[];
644
+ };
645
+ };
646
+ };
647
+ };
648
+ };
649
+ };
650
+ };
651
+ } & {
652
+ use: any[];
653
+ };
654
+ path: "/api-key/get";
655
+ };
656
+ /**
657
+ * ### Endpoint
658
+ *
659
+ * POST `/api-key/update`
660
+ *
661
+ * ### API Methods
662
+ *
663
+ * **server:**
664
+ * `auth.api.updateApiKey`
665
+ *
666
+ * **client:**
667
+ * `authClient.apiKey.update`
668
+ *
669
+ * @see [Read our docs to learn more.](https://payvopayvo.com/docs/plugins/api-key#api-method-api-key-update)
670
+ */
671
+ updateApiKey: {
672
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
673
+ body: {
674
+ keyId: string;
675
+ userId?: unknown;
676
+ name?: string | undefined;
677
+ enabled?: boolean | undefined;
678
+ remaining?: number | undefined;
679
+ refillAmount?: number | undefined;
680
+ refillInterval?: number | undefined;
681
+ metadata?: any;
682
+ expiresIn?: number | null | undefined;
683
+ rateLimitEnabled?: boolean | undefined;
684
+ rateLimitTimeWindow?: number | undefined;
685
+ rateLimitMax?: number | undefined;
686
+ permissions?: Record<string, string[]> | null | undefined;
687
+ };
688
+ } & {
689
+ method?: "POST" | undefined;
690
+ } & {
691
+ query?: Record<string, any> | undefined;
692
+ } & {
693
+ params?: Record<string, any>;
694
+ } & {
695
+ request?: Request;
696
+ } & {
697
+ headers?: HeadersInit;
698
+ } & {
699
+ asResponse?: boolean;
700
+ returnHeaders?: boolean;
701
+ use?: import("better-call").Middleware[];
702
+ path?: string;
703
+ } & {
704
+ asResponse?: AsResponse | undefined;
705
+ returnHeaders?: ReturnHeaders | undefined;
706
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
707
+ headers: Headers;
708
+ response: {
709
+ permissions: {
710
+ [key: string]: string[];
711
+ } | null;
712
+ id: string;
713
+ name: string | null;
714
+ start: string | null;
715
+ prefix: string | null;
716
+ userId: string;
717
+ refillInterval: number | null;
718
+ refillAmount: number | null;
719
+ lastRefillAt: Date | null;
720
+ enabled: boolean;
721
+ rateLimitEnabled: boolean;
722
+ rateLimitTimeWindow: number | null;
723
+ rateLimitMax: number | null;
724
+ requestCount: number;
725
+ remaining: number | null;
726
+ lastRequest: Date | null;
727
+ expiresAt: Date | null;
728
+ createdAt: Date;
729
+ updatedAt: Date;
730
+ metadata: Record<string, any> | null;
731
+ };
732
+ } : {
733
+ permissions: {
734
+ [key: string]: string[];
735
+ } | null;
736
+ id: string;
737
+ name: string | null;
738
+ start: string | null;
739
+ prefix: string | null;
740
+ userId: string;
741
+ refillInterval: number | null;
742
+ refillAmount: number | null;
743
+ lastRefillAt: Date | null;
744
+ enabled: boolean;
745
+ rateLimitEnabled: boolean;
746
+ rateLimitTimeWindow: number | null;
747
+ rateLimitMax: number | null;
748
+ requestCount: number;
749
+ remaining: number | null;
750
+ lastRequest: Date | null;
751
+ expiresAt: Date | null;
752
+ createdAt: Date;
753
+ updatedAt: Date;
754
+ metadata: Record<string, any> | null;
755
+ }>;
756
+ options: {
757
+ method: "POST";
758
+ body: import("zod").ZodObject<{
759
+ keyId: import("zod").ZodString;
760
+ userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
761
+ name: import("zod").ZodOptional<import("zod").ZodString>;
762
+ enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
763
+ remaining: import("zod").ZodOptional<import("zod").ZodNumber>;
764
+ refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
765
+ refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
766
+ metadata: import("zod").ZodOptional<import("zod").ZodAny>;
767
+ expiresIn: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
768
+ rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
769
+ rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
770
+ rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
771
+ permissions: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>>;
772
+ }, import("zod/v4/core").$strip>;
773
+ metadata: {
774
+ openapi: {
775
+ description: string;
776
+ responses: {
777
+ "200": {
778
+ description: string;
779
+ content: {
780
+ "application/json": {
781
+ schema: {
782
+ type: "object";
783
+ properties: {
784
+ id: {
785
+ type: string;
786
+ description: string;
787
+ };
788
+ name: {
789
+ type: string;
790
+ nullable: boolean;
791
+ description: string;
792
+ };
793
+ start: {
794
+ type: string;
795
+ nullable: boolean;
796
+ description: string;
797
+ };
798
+ prefix: {
799
+ type: string;
800
+ nullable: boolean;
801
+ description: string;
802
+ };
803
+ userId: {
804
+ type: string;
805
+ description: string;
806
+ };
807
+ refillInterval: {
808
+ type: string;
809
+ nullable: boolean;
810
+ description: string;
811
+ };
812
+ refillAmount: {
813
+ type: string;
814
+ nullable: boolean;
815
+ description: string;
816
+ };
817
+ lastRefillAt: {
818
+ type: string;
819
+ format: string;
820
+ nullable: boolean;
821
+ description: string;
822
+ };
823
+ enabled: {
824
+ type: string;
825
+ description: string;
826
+ default: boolean;
827
+ };
828
+ rateLimitEnabled: {
829
+ type: string;
830
+ description: string;
831
+ };
832
+ rateLimitTimeWindow: {
833
+ type: string;
834
+ nullable: boolean;
835
+ description: string;
836
+ };
837
+ rateLimitMax: {
838
+ type: string;
839
+ nullable: boolean;
840
+ description: string;
841
+ };
842
+ requestCount: {
843
+ type: string;
844
+ description: string;
845
+ };
846
+ remaining: {
847
+ type: string;
848
+ nullable: boolean;
849
+ description: string;
850
+ };
851
+ lastRequest: {
852
+ type: string;
853
+ format: string;
854
+ nullable: boolean;
855
+ description: string;
856
+ };
857
+ expiresAt: {
858
+ type: string;
859
+ format: string;
860
+ nullable: boolean;
861
+ description: string;
862
+ };
863
+ createdAt: {
864
+ type: string;
865
+ format: string;
866
+ description: string;
867
+ };
868
+ updatedAt: {
869
+ type: string;
870
+ format: string;
871
+ description: string;
872
+ };
873
+ metadata: {
874
+ type: string;
875
+ nullable: boolean;
876
+ additionalProperties: boolean;
877
+ description: string;
878
+ };
879
+ permissions: {
880
+ type: string;
881
+ nullable: boolean;
882
+ description: string;
883
+ };
884
+ };
885
+ required: string[];
886
+ };
887
+ };
888
+ };
889
+ };
890
+ };
891
+ };
892
+ };
893
+ } & {
894
+ use: any[];
895
+ };
896
+ path: "/api-key/update";
897
+ };
898
+ /**
899
+ * ### Endpoint
900
+ *
901
+ * POST `/api-key/delete`
902
+ *
903
+ * ### API Methods
904
+ *
905
+ * **server:**
906
+ * `auth.api.deleteApiKey`
907
+ *
908
+ * **client:**
909
+ * `authClient.apiKey.delete`
910
+ *
911
+ * @see [Read our docs to learn more.](https://payvopayvo.com/docs/plugins/api-key#api-method-api-key-delete)
912
+ */
913
+ deleteApiKey: {
914
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
915
+ body: {
916
+ keyId: string;
917
+ };
918
+ } & {
919
+ method?: "POST" | undefined;
920
+ } & {
921
+ query?: Record<string, any> | undefined;
922
+ } & {
923
+ params?: Record<string, any>;
924
+ } & {
925
+ request?: Request;
926
+ } & {
927
+ headers?: HeadersInit;
928
+ } & {
929
+ asResponse?: boolean;
930
+ returnHeaders?: boolean;
931
+ use?: import("better-call").Middleware[];
932
+ path?: string;
933
+ } & {
934
+ asResponse?: AsResponse | undefined;
935
+ returnHeaders?: ReturnHeaders | undefined;
936
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
937
+ headers: Headers;
938
+ response: {
939
+ success: boolean;
940
+ };
941
+ } : {
942
+ success: boolean;
943
+ }>;
944
+ options: {
945
+ method: "POST";
946
+ body: import("zod").ZodObject<{
947
+ keyId: import("zod").ZodString;
948
+ }, import("zod/v4/core").$strip>;
949
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
950
+ session: {
951
+ session: Record<string, any> & {
952
+ id: string;
953
+ createdAt: Date;
954
+ updatedAt: Date;
955
+ userId: string;
956
+ expiresAt: Date;
957
+ token: string;
958
+ ipAddress?: string | null | undefined;
959
+ userAgent?: string | null | undefined;
960
+ };
961
+ user: Record<string, any> & {
962
+ id: string;
963
+ createdAt: Date;
964
+ updatedAt: Date;
965
+ email: string;
966
+ emailVerified: boolean;
967
+ name: string;
968
+ image?: string | null | undefined;
969
+ };
970
+ };
971
+ }>)[];
972
+ metadata: {
973
+ openapi: {
974
+ description: string;
975
+ requestBody: {
976
+ content: {
977
+ "application/json": {
978
+ schema: {
979
+ type: "object";
980
+ properties: {
981
+ keyId: {
982
+ type: string;
983
+ description: string;
984
+ };
985
+ };
986
+ required: string[];
987
+ };
988
+ };
989
+ };
990
+ };
991
+ responses: {
992
+ "200": {
993
+ description: string;
994
+ content: {
995
+ "application/json": {
996
+ schema: {
997
+ type: "object";
998
+ properties: {
999
+ success: {
1000
+ type: string;
1001
+ description: string;
1002
+ };
1003
+ };
1004
+ required: string[];
1005
+ };
1006
+ };
1007
+ };
1008
+ };
1009
+ };
1010
+ };
1011
+ };
1012
+ } & {
1013
+ use: any[];
1014
+ };
1015
+ path: "/api-key/delete";
1016
+ };
1017
+ /**
1018
+ * ### Endpoint
1019
+ *
1020
+ * GET `/api-key/list`
1021
+ *
1022
+ * ### API Methods
1023
+ *
1024
+ * **server:**
1025
+ * `auth.api.listApiKeys`
1026
+ *
1027
+ * **client:**
1028
+ * `authClient.apiKey.list`
1029
+ *
1030
+ * @see [Read our docs to learn more.](https://payvopayvo.com/docs/plugins/api-key#api-method-api-key-list)
1031
+ */
1032
+ listApiKeys: {
1033
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
1034
+ body?: undefined;
1035
+ } & {
1036
+ method?: "GET" | undefined;
1037
+ } & {
1038
+ query?: Record<string, any> | undefined;
1039
+ } & {
1040
+ params?: Record<string, any>;
1041
+ } & {
1042
+ request?: Request;
1043
+ } & {
1044
+ headers?: HeadersInit;
1045
+ } & {
1046
+ asResponse?: boolean;
1047
+ returnHeaders?: boolean;
1048
+ use?: import("better-call").Middleware[];
1049
+ path?: string;
1050
+ } & {
1051
+ asResponse?: AsResponse | undefined;
1052
+ returnHeaders?: ReturnHeaders | undefined;
1053
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1054
+ headers: Headers;
1055
+ response: {
1056
+ permissions: {
1057
+ [key: string]: string[];
1058
+ } | null;
1059
+ id: string;
1060
+ name: string | null;
1061
+ start: string | null;
1062
+ prefix: string | null;
1063
+ userId: string;
1064
+ refillInterval: number | null;
1065
+ refillAmount: number | null;
1066
+ lastRefillAt: Date | null;
1067
+ enabled: boolean;
1068
+ rateLimitEnabled: boolean;
1069
+ rateLimitTimeWindow: number | null;
1070
+ rateLimitMax: number | null;
1071
+ requestCount: number;
1072
+ remaining: number | null;
1073
+ lastRequest: Date | null;
1074
+ expiresAt: Date | null;
1075
+ createdAt: Date;
1076
+ updatedAt: Date;
1077
+ metadata: Record<string, any> | null;
1078
+ }[];
1079
+ } : {
1080
+ permissions: {
1081
+ [key: string]: string[];
1082
+ } | null;
1083
+ id: string;
1084
+ name: string | null;
1085
+ start: string | null;
1086
+ prefix: string | null;
1087
+ userId: string;
1088
+ refillInterval: number | null;
1089
+ refillAmount: number | null;
1090
+ lastRefillAt: Date | null;
1091
+ enabled: boolean;
1092
+ rateLimitEnabled: boolean;
1093
+ rateLimitTimeWindow: number | null;
1094
+ rateLimitMax: number | null;
1095
+ requestCount: number;
1096
+ remaining: number | null;
1097
+ lastRequest: Date | null;
1098
+ expiresAt: Date | null;
1099
+ createdAt: Date;
1100
+ updatedAt: Date;
1101
+ metadata: Record<string, any> | null;
1102
+ }[]>;
1103
+ options: {
1104
+ method: "GET";
1105
+ use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1106
+ session: {
1107
+ session: Record<string, any> & {
1108
+ id: string;
1109
+ createdAt: Date;
1110
+ updatedAt: Date;
1111
+ userId: string;
1112
+ expiresAt: Date;
1113
+ token: string;
1114
+ ipAddress?: string | null | undefined;
1115
+ userAgent?: string | null | undefined;
1116
+ };
1117
+ user: Record<string, any> & {
1118
+ id: string;
1119
+ createdAt: Date;
1120
+ updatedAt: Date;
1121
+ email: string;
1122
+ emailVerified: boolean;
1123
+ name: string;
1124
+ image?: string | null | undefined;
1125
+ };
1126
+ };
1127
+ }>)[];
1128
+ metadata: {
1129
+ openapi: {
1130
+ description: string;
1131
+ responses: {
1132
+ "200": {
1133
+ description: string;
1134
+ content: {
1135
+ "application/json": {
1136
+ schema: {
1137
+ type: "array";
1138
+ items: {
1139
+ type: string;
1140
+ properties: {
1141
+ id: {
1142
+ type: string;
1143
+ description: string;
1144
+ };
1145
+ name: {
1146
+ type: string;
1147
+ nullable: boolean;
1148
+ description: string;
1149
+ };
1150
+ start: {
1151
+ type: string;
1152
+ nullable: boolean;
1153
+ description: string;
1154
+ };
1155
+ prefix: {
1156
+ type: string;
1157
+ nullable: boolean;
1158
+ description: string;
1159
+ };
1160
+ userId: {
1161
+ type: string;
1162
+ description: string;
1163
+ };
1164
+ refillInterval: {
1165
+ type: string;
1166
+ nullable: boolean;
1167
+ description: string;
1168
+ };
1169
+ refillAmount: {
1170
+ type: string;
1171
+ nullable: boolean;
1172
+ description: string;
1173
+ };
1174
+ lastRefillAt: {
1175
+ type: string;
1176
+ format: string;
1177
+ nullable: boolean;
1178
+ description: string;
1179
+ };
1180
+ enabled: {
1181
+ type: string;
1182
+ description: string;
1183
+ default: boolean;
1184
+ };
1185
+ rateLimitEnabled: {
1186
+ type: string;
1187
+ description: string;
1188
+ };
1189
+ rateLimitTimeWindow: {
1190
+ type: string;
1191
+ nullable: boolean;
1192
+ description: string;
1193
+ };
1194
+ rateLimitMax: {
1195
+ type: string;
1196
+ nullable: boolean;
1197
+ description: string;
1198
+ };
1199
+ requestCount: {
1200
+ type: string;
1201
+ description: string;
1202
+ };
1203
+ remaining: {
1204
+ type: string;
1205
+ nullable: boolean;
1206
+ description: string;
1207
+ };
1208
+ lastRequest: {
1209
+ type: string;
1210
+ format: string;
1211
+ nullable: boolean;
1212
+ description: string;
1213
+ };
1214
+ expiresAt: {
1215
+ type: string;
1216
+ format: string;
1217
+ nullable: boolean;
1218
+ description: string;
1219
+ };
1220
+ createdAt: {
1221
+ type: string;
1222
+ format: string;
1223
+ description: string;
1224
+ };
1225
+ updatedAt: {
1226
+ type: string;
1227
+ format: string;
1228
+ description: string;
1229
+ };
1230
+ metadata: {
1231
+ type: string;
1232
+ nullable: boolean;
1233
+ additionalProperties: boolean;
1234
+ description: string;
1235
+ };
1236
+ permissions: {
1237
+ type: string;
1238
+ nullable: boolean;
1239
+ description: string;
1240
+ };
1241
+ };
1242
+ required: string[];
1243
+ };
1244
+ };
1245
+ };
1246
+ };
1247
+ };
1248
+ };
1249
+ };
1250
+ };
1251
+ } & {
1252
+ use: any[];
1253
+ };
1254
+ path: "/api-key/list";
1255
+ };
1256
+ /**
1257
+ * ### Endpoint
1258
+ *
1259
+ * POST `/api-key/delete-all-expired-api-keys`
1260
+ *
1261
+ * ### API Methods
1262
+ *
1263
+ * **server:**
1264
+ * `auth.api.deleteAllExpiredApiKeys`
1265
+ *
1266
+ * @see [Read our docs to learn more.](https://payvopayvo.com/docs/plugins/api-key#api-method-api-key-delete-all-expired-api-keys)
1267
+ */
1268
+ deleteAllExpiredApiKeys: {
1269
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
1270
+ body?: undefined;
1271
+ } & {
1272
+ method?: "POST" | undefined;
1273
+ } & {
1274
+ query?: Record<string, any> | undefined;
1275
+ } & {
1276
+ params?: Record<string, any>;
1277
+ } & {
1278
+ request?: Request;
1279
+ } & {
1280
+ headers?: HeadersInit;
1281
+ } & {
1282
+ asResponse?: boolean;
1283
+ returnHeaders?: boolean;
1284
+ use?: import("better-call").Middleware[];
1285
+ path?: string;
1286
+ } & {
1287
+ asResponse?: AsResponse | undefined;
1288
+ returnHeaders?: ReturnHeaders | undefined;
1289
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
1290
+ headers: Headers;
1291
+ response: {
1292
+ success: boolean;
1293
+ error: unknown;
1294
+ };
1295
+ } : {
1296
+ success: boolean;
1297
+ error: unknown;
1298
+ }>;
1299
+ options: {
1300
+ method: "POST";
1301
+ metadata: {
1302
+ SERVER_ONLY: true;
1303
+ client: boolean;
1304
+ };
1305
+ } & {
1306
+ use: any[];
1307
+ };
1308
+ path: "/api-key/delete-all-expired-api-keys";
1309
+ };
1310
+ };
1311
+ schema: {
1312
+ apikey: {
1313
+ fields: {
1314
+ name: {
1315
+ type: "string";
1316
+ required: false;
1317
+ input: false;
1318
+ };
1319
+ start: {
1320
+ type: "string";
1321
+ required: false;
1322
+ input: false;
1323
+ };
1324
+ prefix: {
1325
+ type: "string";
1326
+ required: false;
1327
+ input: false;
1328
+ };
1329
+ key: {
1330
+ type: "string";
1331
+ required: true;
1332
+ input: false;
1333
+ };
1334
+ userId: {
1335
+ type: "string";
1336
+ references: {
1337
+ model: string;
1338
+ field: string;
1339
+ onDelete: "cascade";
1340
+ };
1341
+ required: true;
1342
+ input: false;
1343
+ };
1344
+ refillInterval: {
1345
+ type: "number";
1346
+ required: false;
1347
+ input: false;
1348
+ };
1349
+ refillAmount: {
1350
+ type: "number";
1351
+ required: false;
1352
+ input: false;
1353
+ };
1354
+ lastRefillAt: {
1355
+ type: "date";
1356
+ required: false;
1357
+ input: false;
1358
+ };
1359
+ enabled: {
1360
+ type: "boolean";
1361
+ required: false;
1362
+ input: false;
1363
+ defaultValue: true;
1364
+ };
1365
+ rateLimitEnabled: {
1366
+ type: "boolean";
1367
+ required: false;
1368
+ input: false;
1369
+ defaultValue: true;
1370
+ };
1371
+ rateLimitTimeWindow: {
1372
+ type: "number";
1373
+ required: false;
1374
+ input: false;
1375
+ defaultValue: number;
1376
+ };
1377
+ rateLimitMax: {
1378
+ type: "number";
1379
+ required: false;
1380
+ input: false;
1381
+ defaultValue: number;
1382
+ };
1383
+ requestCount: {
1384
+ type: "number";
1385
+ required: false;
1386
+ input: false;
1387
+ defaultValue: number;
1388
+ };
1389
+ remaining: {
1390
+ type: "number";
1391
+ required: false;
1392
+ input: false;
1393
+ };
1394
+ lastRequest: {
1395
+ type: "date";
1396
+ required: false;
1397
+ input: false;
1398
+ };
1399
+ expiresAt: {
1400
+ type: "date";
1401
+ required: false;
1402
+ input: false;
1403
+ };
1404
+ createdAt: {
1405
+ type: "date";
1406
+ required: true;
1407
+ input: false;
1408
+ };
1409
+ updatedAt: {
1410
+ type: "date";
1411
+ required: true;
1412
+ input: false;
1413
+ };
1414
+ permissions: {
1415
+ type: "string";
1416
+ required: false;
1417
+ input: false;
1418
+ };
1419
+ metadata: {
1420
+ type: "string";
1421
+ required: false;
1422
+ input: true;
1423
+ transform: {
1424
+ input(value: import("packages/core/dist/index-65G5U5DB.mjs").jt): string;
1425
+ output(value: import("packages/core/dist/index-65G5U5DB.mjs").jt): any;
1426
+ };
1427
+ };
1428
+ };
1429
+ };
1430
+ };
1431
+ };