@softistx/janus 0.0.0-stage → 0.73.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 (911) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2928 -2
  3. package/dist/auth/api-keys/authenticate-key.d.ts +21 -0
  4. package/dist/auth/api-keys/authenticate-key.d.ts.map +1 -0
  5. package/dist/auth/api-keys/bound.d.ts +11 -0
  6. package/dist/auth/api-keys/bound.d.ts.map +1 -0
  7. package/dist/auth/api-keys/count.d.ts +8 -0
  8. package/dist/auth/api-keys/count.d.ts.map +1 -0
  9. package/dist/auth/api-keys/create/checks.d.ts +42 -0
  10. package/dist/auth/api-keys/create/checks.d.ts.map +1 -0
  11. package/dist/auth/api-keys/create/index.d.ts +10 -0
  12. package/dist/auth/api-keys/create/index.d.ts.map +1 -0
  13. package/dist/auth/api-keys/events.d.ts +22 -0
  14. package/dist/auth/api-keys/events.d.ts.map +1 -0
  15. package/dist/auth/api-keys/expiry.d.ts +11 -0
  16. package/dist/auth/api-keys/expiry.d.ts.map +1 -0
  17. package/dist/auth/api-keys/flows.d.ts +13 -0
  18. package/dist/auth/api-keys/flows.d.ts.map +1 -0
  19. package/dist/auth/api-keys/index.d.ts +11 -0
  20. package/dist/auth/api-keys/index.d.ts.map +1 -0
  21. package/dist/auth/api-keys/read.d.ts +10 -0
  22. package/dist/auth/api-keys/read.d.ts.map +1 -0
  23. package/dist/auth/api-keys/shape.d.ts +24 -0
  24. package/dist/auth/api-keys/shape.d.ts.map +1 -0
  25. package/dist/auth/api-keys/to-api-key.d.ts +8 -0
  26. package/dist/auth/api-keys/to-api-key.d.ts.map +1 -0
  27. package/dist/auth/api-keys/token.d.ts +23 -0
  28. package/dist/auth/api-keys/token.d.ts.map +1 -0
  29. package/dist/auth/api-keys/user-bound.d.ts +10 -0
  30. package/dist/auth/api-keys/user-bound.d.ts.map +1 -0
  31. package/dist/auth/at.d.ts +9 -0
  32. package/dist/auth/at.d.ts.map +1 -0
  33. package/dist/auth/avatar/any-type.d.ts +13 -0
  34. package/dist/auth/avatar/any-type.d.ts.map +1 -0
  35. package/dist/auth/avatar/flows.d.ts +7 -0
  36. package/dist/auth/avatar/flows.d.ts.map +1 -0
  37. package/dist/auth/avatar/id.d.ts +10 -0
  38. package/dist/auth/avatar/id.d.ts.map +1 -0
  39. package/dist/auth/avatar/index.d.ts +7 -0
  40. package/dist/auth/avatar/index.d.ts.map +1 -0
  41. package/dist/auth/avatar/remove.d.ts +10 -0
  42. package/dist/auth/avatar/remove.d.ts.map +1 -0
  43. package/dist/auth/avatar/set.d.ts +12 -0
  44. package/dist/auth/avatar/set.d.ts.map +1 -0
  45. package/dist/auth/concurrency-limit.d.ts +13 -0
  46. package/dist/auth/concurrency-limit.d.ts.map +1 -0
  47. package/dist/auth/config/api-keys-config.d.ts +33 -0
  48. package/dist/auth/config/api-keys-config.d.ts.map +1 -0
  49. package/dist/auth/config/hasher.d.ts +22 -0
  50. package/dist/auth/config/hasher.d.ts.map +1 -0
  51. package/dist/auth/config/index.d.ts +24 -0
  52. package/dist/auth/config/index.d.ts.map +1 -0
  53. package/dist/auth/config/invitations-config.d.ts +74 -0
  54. package/dist/auth/config/invitations-config.d.ts.map +1 -0
  55. package/dist/auth/config/janus-config.d.ts +233 -0
  56. package/dist/auth/config/janus-config.d.ts.map +1 -0
  57. package/dist/auth/config/magic-link-config.d.ts +6 -0
  58. package/dist/auth/config/magic-link-config.d.ts.map +1 -0
  59. package/dist/auth/config/names.d.ts +9 -0
  60. package/dist/auth/config/names.d.ts.map +1 -0
  61. package/dist/auth/config/normalize.d.ts +26 -0
  62. package/dist/auth/config/normalize.d.ts.map +1 -0
  63. package/dist/auth/config/passkeys-config.d.ts +49 -0
  64. package/dist/auth/config/passkeys-config.d.ts.map +1 -0
  65. package/dist/auth/config/password-config.d.ts +22 -0
  66. package/dist/auth/config/password-config.d.ts.map +1 -0
  67. package/dist/auth/config/reserved.d.ts +14 -0
  68. package/dist/auth/config/reserved.d.ts.map +1 -0
  69. package/dist/auth/config/resolve-api-keys.d.ts +5 -0
  70. package/dist/auth/config/resolve-api-keys.d.ts.map +1 -0
  71. package/dist/auth/config/resolve-config.d.ts +9 -0
  72. package/dist/auth/config/resolve-config.d.ts.map +1 -0
  73. package/dist/auth/config/resolve-cookie.d.ts +5 -0
  74. package/dist/auth/config/resolve-cookie.d.ts.map +1 -0
  75. package/dist/auth/config/resolve-devices.d.ts +5 -0
  76. package/dist/auth/config/resolve-devices.d.ts.map +1 -0
  77. package/dist/auth/config/resolve-invitation-types.d.ts +5 -0
  78. package/dist/auth/config/resolve-invitation-types.d.ts.map +1 -0
  79. package/dist/auth/config/resolve-invitations.d.ts +5 -0
  80. package/dist/auth/config/resolve-invitations.d.ts.map +1 -0
  81. package/dist/auth/config/resolve-magic-link.d.ts +4 -0
  82. package/dist/auth/config/resolve-magic-link.d.ts.map +1 -0
  83. package/dist/auth/config/resolve-passkeys.d.ts +5 -0
  84. package/dist/auth/config/resolve-passkeys.d.ts.map +1 -0
  85. package/dist/auth/config/resolve-second-factor.d.ts +5 -0
  86. package/dist/auth/config/resolve-second-factor.d.ts.map +1 -0
  87. package/dist/auth/config/resolve-social.d.ts +17 -0
  88. package/dist/auth/config/resolve-social.d.ts.map +1 -0
  89. package/dist/auth/config/resolve-throttle.d.ts +37 -0
  90. package/dist/auth/config/resolve-throttle.d.ts.map +1 -0
  91. package/dist/auth/config/resolve-type.d.ts +6 -0
  92. package/dist/auth/config/resolve-type.d.ts.map +1 -0
  93. package/dist/auth/config/resolved-config.d.ts +126 -0
  94. package/dist/auth/config/resolved-config.d.ts.map +1 -0
  95. package/dist/auth/config/social-config.d.ts +154 -0
  96. package/dist/auth/config/social-config.d.ts.map +1 -0
  97. package/dist/auth/config/user-type.d.ts +79 -0
  98. package/dist/auth/config/user-type.d.ts.map +1 -0
  99. package/dist/auth/config/warn-throttle-window.d.ts +14 -0
  100. package/dist/auth/config/warn-throttle-window.d.ts.map +1 -0
  101. package/dist/auth/context/create-context.d.ts +31 -0
  102. package/dist/auth/context/create-context.d.ts.map +1 -0
  103. package/dist/auth/context/index.d.ts +17 -0
  104. package/dist/auth/context/index.d.ts.map +1 -0
  105. package/dist/auth/context/logins.d.ts +28 -0
  106. package/dist/auth/context/logins.d.ts.map +1 -0
  107. package/dist/auth/context/password.d.ts +34 -0
  108. package/dist/auth/context/password.d.ts.map +1 -0
  109. package/dist/auth/context/records.d.ts +27 -0
  110. package/dist/auth/context/records.d.ts.map +1 -0
  111. package/dist/auth/context/user.d.ts +21 -0
  112. package/dist/auth/context/user.d.ts.map +1 -0
  113. package/dist/auth/context/validate-fields.d.ts +12 -0
  114. package/dist/auth/context/validate-fields.d.ts.map +1 -0
  115. package/dist/auth/counter-key.d.ts +20 -0
  116. package/dist/auth/counter-key.d.ts.map +1 -0
  117. package/dist/auth/derived-keys.d.ts +9 -0
  118. package/dist/auth/derived-keys.d.ts.map +1 -0
  119. package/dist/auth/devices/cookie.d.ts +56 -0
  120. package/dist/auth/devices/cookie.d.ts.map +1 -0
  121. package/dist/auth/devices/hint.d.ts +42 -0
  122. package/dist/auth/devices/hint.d.ts.map +1 -0
  123. package/dist/auth/devices/index.d.ts +11 -0
  124. package/dist/auth/devices/index.d.ts.map +1 -0
  125. package/dist/auth/devices/report.d.ts +11 -0
  126. package/dist/auth/devices/report.d.ts.map +1 -0
  127. package/dist/auth/devices/token.d.ts +13 -0
  128. package/dist/auth/devices/token.d.ts.map +1 -0
  129. package/dist/auth/email-flows/any-type-change-email.d.ts +18 -0
  130. package/dist/auth/email-flows/any-type-change-email.d.ts.map +1 -0
  131. package/dist/auth/email-flows/any-type-reset-password.d.ts +19 -0
  132. package/dist/auth/email-flows/any-type-reset-password.d.ts.map +1 -0
  133. package/dist/auth/email-flows/any-type-verify-email.d.ts +18 -0
  134. package/dist/auth/email-flows/any-type-verify-email.d.ts.map +1 -0
  135. package/dist/auth/email-flows/change-email-token.d.ts +47 -0
  136. package/dist/auth/email-flows/change-email-token.d.ts.map +1 -0
  137. package/dist/auth/email-flows/change-email.d.ts +17 -0
  138. package/dist/auth/email-flows/change-email.d.ts.map +1 -0
  139. package/dist/auth/email-flows/confirm-reset.d.ts +16 -0
  140. package/dist/auth/email-flows/confirm-reset.d.ts.map +1 -0
  141. package/dist/auth/email-flows/email-token.d.ts +30 -0
  142. package/dist/auth/email-flows/email-token.d.ts.map +1 -0
  143. package/dist/auth/email-flows/flows.d.ts +13 -0
  144. package/dist/auth/email-flows/flows.d.ts.map +1 -0
  145. package/dist/auth/email-flows/index.d.ts +10 -0
  146. package/dist/auth/email-flows/index.d.ts.map +1 -0
  147. package/dist/auth/email-flows/owner-of.d.ts +17 -0
  148. package/dist/auth/email-flows/owner-of.d.ts.map +1 -0
  149. package/dist/auth/email-flows/prove-first.d.ts +45 -0
  150. package/dist/auth/email-flows/prove-first.d.ts.map +1 -0
  151. package/dist/auth/email-flows/reset-password.d.ts +17 -0
  152. package/dist/auth/email-flows/reset-password.d.ts.map +1 -0
  153. package/dist/auth/email-flows/set-email-verified.d.ts +19 -0
  154. package/dist/auth/email-flows/set-email-verified.d.ts.map +1 -0
  155. package/dist/auth/email-flows/verify-email.d.ts +25 -0
  156. package/dist/auth/email-flows/verify-email.d.ts.map +1 -0
  157. package/dist/auth/email-sign-in.d.ts +51 -0
  158. package/dist/auth/email-sign-in.d.ts.map +1 -0
  159. package/dist/auth/events.d.ts +166 -0
  160. package/dist/auth/events.d.ts.map +1 -0
  161. package/dist/auth/first-proof.d.ts +43 -0
  162. package/dist/auth/first-proof.d.ts.map +1 -0
  163. package/dist/auth/hashers.d.ts +52 -0
  164. package/dist/auth/hashers.d.ts.map +1 -0
  165. package/dist/auth/index.d.ts +22 -0
  166. package/dist/auth/index.d.ts.map +1 -0
  167. package/dist/auth/invitations/accept.d.ts +10 -0
  168. package/dist/auth/invitations/accept.d.ts.map +1 -0
  169. package/dist/auth/invitations/change-pending.d.ts +17 -0
  170. package/dist/auth/invitations/change-pending.d.ts.map +1 -0
  171. package/dist/auth/invitations/claim.d.ts +31 -0
  172. package/dist/auth/invitations/claim.d.ts.map +1 -0
  173. package/dist/auth/invitations/events.d.ts +46 -0
  174. package/dist/auth/invitations/events.d.ts.map +1 -0
  175. package/dist/auth/invitations/find-invitee.d.ts +20 -0
  176. package/dist/auth/invitations/find-invitee.d.ts.map +1 -0
  177. package/dist/auth/invitations/find-pending.d.ts +5 -0
  178. package/dist/auth/invitations/find-pending.d.ts.map +1 -0
  179. package/dist/auth/invitations/flows.d.ts +7 -0
  180. package/dist/auth/invitations/flows.d.ts.map +1 -0
  181. package/dist/auth/invitations/history-input.d.ts +29 -0
  182. package/dist/auth/invitations/history-input.d.ts.map +1 -0
  183. package/dist/auth/invitations/history.d.ts +10 -0
  184. package/dist/auth/invitations/history.d.ts.map +1 -0
  185. package/dist/auth/invitations/index.d.ts +11 -0
  186. package/dist/auth/invitations/index.d.ts.map +1 -0
  187. package/dist/auth/invitations/input.d.ts +30 -0
  188. package/dist/auth/invitations/input.d.ts.map +1 -0
  189. package/dist/auth/invitations/invited-type.d.ts +22 -0
  190. package/dist/auth/invitations/invited-type.d.ts.map +1 -0
  191. package/dist/auth/invitations/invitee.d.ts +11 -0
  192. package/dist/auth/invitations/invitee.d.ts.map +1 -0
  193. package/dist/auth/invitations/issue.d.ts +9 -0
  194. package/dist/auth/invitations/issue.d.ts.map +1 -0
  195. package/dist/auth/invitations/limit.d.ts +7 -0
  196. package/dist/auth/invitations/limit.d.ts.map +1 -0
  197. package/dist/auth/invitations/password-invitee.d.ts +18 -0
  198. package/dist/auth/invitations/password-invitee.d.ts.map +1 -0
  199. package/dist/auth/invitations/passwordless-invitee.d.ts +13 -0
  200. package/dist/auth/invitations/passwordless-invitee.d.ts.map +1 -0
  201. package/dist/auth/invitations/preview.d.ts +8 -0
  202. package/dist/auth/invitations/preview.d.ts.map +1 -0
  203. package/dist/auth/invitations/read.d.ts +10 -0
  204. package/dist/auth/invitations/read.d.ts.map +1 -0
  205. package/dist/auth/invitations/resend.d.ts +12 -0
  206. package/dist/auth/invitations/resend.d.ts.map +1 -0
  207. package/dist/auth/invitations/to-invitation.d.ts +11 -0
  208. package/dist/auth/invitations/to-invitation.d.ts.map +1 -0
  209. package/dist/auth/invitations/write.d.ts +17 -0
  210. package/dist/auth/invitations/write.d.ts.map +1 -0
  211. package/dist/auth/issuers/cache.d.ts +21 -0
  212. package/dist/auth/issuers/cache.d.ts.map +1 -0
  213. package/dist/auth/issuers/create.d.ts +18 -0
  214. package/dist/auth/issuers/create.d.ts.map +1 -0
  215. package/dist/auth/issuers/index.d.ts +3 -0
  216. package/dist/auth/issuers/index.d.ts.map +1 -0
  217. package/dist/auth/issuers/types.d.ts +45 -0
  218. package/dist/auth/issuers/types.d.ts.map +1 -0
  219. package/dist/auth/janus.d.ts +39 -0
  220. package/dist/auth/janus.d.ts.map +1 -0
  221. package/dist/auth/magic-link.d.ts +25 -0
  222. package/dist/auth/magic-link.d.ts.map +1 -0
  223. package/dist/auth/mail-requests.d.ts +55 -0
  224. package/dist/auth/mail-requests.d.ts.map +1 -0
  225. package/dist/auth/one-time/codes.d.ts +46 -0
  226. package/dist/auth/one-time/codes.d.ts.map +1 -0
  227. package/dist/auth/one-time/index.d.ts +15 -0
  228. package/dist/auth/one-time/index.d.ts.map +1 -0
  229. package/dist/auth/one-time/issue.d.ts +45 -0
  230. package/dist/auth/one-time/issue.d.ts.map +1 -0
  231. package/dist/auth/one-time/refusals.d.ts +26 -0
  232. package/dist/auth/one-time/refusals.d.ts.map +1 -0
  233. package/dist/auth/one-time/spend.d.ts +24 -0
  234. package/dist/auth/one-time/spend.d.ts.map +1 -0
  235. package/dist/auth/one-time/window.d.ts +50 -0
  236. package/dist/auth/one-time/window.d.ts.map +1 -0
  237. package/dist/auth/outage.d.ts +66 -0
  238. package/dist/auth/outage.d.ts.map +1 -0
  239. package/dist/auth/parse-sealing-keys.d.ts +26 -0
  240. package/dist/auth/parse-sealing-keys.d.ts.map +1 -0
  241. package/dist/auth/passkeys/assert.d.ts +51 -0
  242. package/dist/auth/passkeys/assert.d.ts.map +1 -0
  243. package/dist/auth/passkeys/assertion-options.d.ts +9 -0
  244. package/dist/auth/passkeys/assertion-options.d.ts.map +1 -0
  245. package/dist/auth/passkeys/challenge.d.ts +19 -0
  246. package/dist/auth/passkeys/challenge.d.ts.map +1 -0
  247. package/dist/auth/passkeys/commit.d.ts +33 -0
  248. package/dist/auth/passkeys/commit.d.ts.map +1 -0
  249. package/dist/auth/passkeys/flows.d.ts +13 -0
  250. package/dist/auth/passkeys/flows.d.ts.map +1 -0
  251. package/dist/auth/passkeys/index.d.ts +12 -0
  252. package/dist/auth/passkeys/index.d.ts.map +1 -0
  253. package/dist/auth/passkeys/manage.d.ts +11 -0
  254. package/dist/auth/passkeys/manage.d.ts.map +1 -0
  255. package/dist/auth/passkeys/name.d.ts +4 -0
  256. package/dist/auth/passkeys/name.d.ts.map +1 -0
  257. package/dist/auth/passkeys/register.d.ts +20 -0
  258. package/dist/auth/passkeys/register.d.ts.map +1 -0
  259. package/dist/auth/passkeys/registration-options.d.ts +22 -0
  260. package/dist/auth/passkeys/registration-options.d.ts.map +1 -0
  261. package/dist/auth/passkeys/remove-all.d.ts +26 -0
  262. package/dist/auth/passkeys/remove-all.d.ts.map +1 -0
  263. package/dist/auth/passkeys/sign-in-options.d.ts +12 -0
  264. package/dist/auth/passkeys/sign-in-options.d.ts.map +1 -0
  265. package/dist/auth/passkeys/sign-in.d.ts +21 -0
  266. package/dist/auth/passkeys/sign-in.d.ts.map +1 -0
  267. package/dist/auth/passkeys/verifier.d.ts +113 -0
  268. package/dist/auth/passkeys/verifier.d.ts.map +1 -0
  269. package/dist/auth/passkeys/view.d.ts +5 -0
  270. package/dist/auth/passkeys/view.d.ts.map +1 -0
  271. package/dist/auth/passkeys/wiring.d.ts +24 -0
  272. package/dist/auth/passkeys/wiring.d.ts.map +1 -0
  273. package/dist/auth/password-written.d.ts +55 -0
  274. package/dist/auth/password-written.d.ts.map +1 -0
  275. package/dist/auth/port/assert-api-keys.d.ts +21 -0
  276. package/dist/auth/port/assert-api-keys.d.ts.map +1 -0
  277. package/dist/auth/port/assert-invitations.d.ts +15 -0
  278. package/dist/auth/port/assert-invitations.d.ts.map +1 -0
  279. package/dist/auth/port/assert-stores.d.ts +16 -0
  280. package/dist/auth/port/assert-stores.d.ts.map +1 -0
  281. package/dist/auth/port/memory/api-keys/capabilities.d.ts +8 -0
  282. package/dist/auth/port/memory/api-keys/capabilities.d.ts.map +1 -0
  283. package/dist/auth/port/memory/api-keys/index.d.ts +13 -0
  284. package/dist/auth/port/memory/api-keys/index.d.ts.map +1 -0
  285. package/dist/auth/port/memory/api-keys/pages.d.ts +7 -0
  286. package/dist/auth/port/memory/api-keys/pages.d.ts.map +1 -0
  287. package/dist/auth/port/memory/copy.d.ts +6 -0
  288. package/dist/auth/port/memory/copy.d.ts.map +1 -0
  289. package/dist/auth/port/memory/index.d.ts +10 -0
  290. package/dist/auth/port/memory/index.d.ts.map +1 -0
  291. package/dist/auth/port/memory/invitations-pending.d.ts +6 -0
  292. package/dist/auth/port/memory/invitations-pending.d.ts.map +1 -0
  293. package/dist/auth/port/memory/invitations.d.ts +12 -0
  294. package/dist/auth/port/memory/invitations.d.ts.map +1 -0
  295. package/dist/auth/port/memory/passkeys.d.ts +9 -0
  296. package/dist/auth/port/memory/passkeys.d.ts.map +1 -0
  297. package/dist/auth/port/memory/sessions.d.ts +4 -0
  298. package/dist/auth/port/memory/sessions.d.ts.map +1 -0
  299. package/dist/auth/port/memory/social-links.d.ts +10 -0
  300. package/dist/auth/port/memory/social-links.d.ts.map +1 -0
  301. package/dist/auth/port/memory/stores.d.ts +26 -0
  302. package/dist/auth/port/memory/stores.d.ts.map +1 -0
  303. package/dist/auth/port/memory/tokens.d.ts +4 -0
  304. package/dist/auth/port/memory/tokens.d.ts.map +1 -0
  305. package/dist/auth/port/memory/user-index.d.ts +20 -0
  306. package/dist/auth/port/memory/user-index.d.ts.map +1 -0
  307. package/dist/auth/port/memory/user-update.d.ts +10 -0
  308. package/dist/auth/port/memory/user-update.d.ts.map +1 -0
  309. package/dist/auth/port/memory/users.d.ts +4 -0
  310. package/dist/auth/port/memory/users.d.ts.map +1 -0
  311. package/dist/auth/port/types/api-keys.d.ts +199 -0
  312. package/dist/auth/port/types/api-keys.d.ts.map +1 -0
  313. package/dist/auth/port/types/credentials.d.ts +46 -0
  314. package/dist/auth/port/types/credentials.d.ts.map +1 -0
  315. package/dist/auth/port/types/index.d.ts +75 -0
  316. package/dist/auth/port/types/index.d.ts.map +1 -0
  317. package/dist/auth/port/types/invitations/index.d.ts +15 -0
  318. package/dist/auth/port/types/invitations/index.d.ts.map +1 -0
  319. package/dist/auth/port/types/invitations/page.d.ts +52 -0
  320. package/dist/auth/port/types/invitations/page.d.ts.map +1 -0
  321. package/dist/auth/port/types/invitations/records.d.ts +101 -0
  322. package/dist/auth/port/types/invitations/records.d.ts.map +1 -0
  323. package/dist/auth/port/types/invitations/store.d.ts +82 -0
  324. package/dist/auth/port/types/invitations/store.d.ts.map +1 -0
  325. package/dist/auth/port/types/json.d.ts +27 -0
  326. package/dist/auth/port/types/json.d.ts.map +1 -0
  327. package/dist/auth/port/types/passkeys.d.ts +94 -0
  328. package/dist/auth/port/types/passkeys.d.ts.map +1 -0
  329. package/dist/auth/port/types/sessions.d.ts +142 -0
  330. package/dist/auth/port/types/sessions.d.ts.map +1 -0
  331. package/dist/auth/port/types/social-links.d.ts +64 -0
  332. package/dist/auth/port/types/social-links.d.ts.map +1 -0
  333. package/dist/auth/port/types/stores.d.ts +48 -0
  334. package/dist/auth/port/types/stores.d.ts.map +1 -0
  335. package/dist/auth/port/types/tokens.d.ts +168 -0
  336. package/dist/auth/port/types/tokens.d.ts.map +1 -0
  337. package/dist/auth/port/types/users.d.ts +260 -0
  338. package/dist/auth/port/types/users.d.ts.map +1 -0
  339. package/dist/auth/prepared.d.ts +21 -0
  340. package/dist/auth/prepared.d.ts.map +1 -0
  341. package/dist/auth/proven-sign-in.d.ts +22 -0
  342. package/dist/auth/proven-sign-in.d.ts.map +1 -0
  343. package/dist/auth/sealer-for.d.ts +44 -0
  344. package/dist/auth/sealer-for.d.ts.map +1 -0
  345. package/dist/auth/sealing.d.ts +36 -0
  346. package/dist/auth/sealing.d.ts.map +1 -0
  347. package/dist/auth/second-factor/activate.d.ts +9 -0
  348. package/dist/auth/second-factor/activate.d.ts.map +1 -0
  349. package/dist/auth/second-factor/app-code-attempts.d.ts +47 -0
  350. package/dist/auth/second-factor/app-code-attempts.d.ts.map +1 -0
  351. package/dist/auth/second-factor/challenge.d.ts +15 -0
  352. package/dist/auth/second-factor/challenge.d.ts.map +1 -0
  353. package/dist/auth/second-factor/codes-left.d.ts +14 -0
  354. package/dist/auth/second-factor/codes-left.d.ts.map +1 -0
  355. package/dist/auth/second-factor/disable.d.ts +10 -0
  356. package/dist/auth/second-factor/disable.d.ts.map +1 -0
  357. package/dist/auth/second-factor/enroll.d.ts +6 -0
  358. package/dist/auth/second-factor/enroll.d.ts.map +1 -0
  359. package/dist/auth/second-factor/factor.d.ts +33 -0
  360. package/dist/auth/second-factor/factor.d.ts.map +1 -0
  361. package/dist/auth/second-factor/flows.d.ts +36 -0
  362. package/dist/auth/second-factor/flows.d.ts.map +1 -0
  363. package/dist/auth/second-factor/lifecycle.d.ts +14 -0
  364. package/dist/auth/second-factor/lifecycle.d.ts.map +1 -0
  365. package/dist/auth/second-factor/passkey-confirm.d.ts +21 -0
  366. package/dist/auth/second-factor/passkey-confirm.d.ts.map +1 -0
  367. package/dist/auth/second-factor/recovery-codes.d.ts +36 -0
  368. package/dist/auth/second-factor/recovery-codes.d.ts.map +1 -0
  369. package/dist/auth/second-factor/recovery.d.ts +20 -0
  370. package/dist/auth/second-factor/recovery.d.ts.map +1 -0
  371. package/dist/auth/second-factor/redeem.d.ts +42 -0
  372. package/dist/auth/second-factor/redeem.d.ts.map +1 -0
  373. package/dist/auth/second-factor/refusal.d.ts +6 -0
  374. package/dist/auth/second-factor/refusal.d.ts.map +1 -0
  375. package/dist/auth/second-factor/regenerate.d.ts +12 -0
  376. package/dist/auth/second-factor/regenerate.d.ts.map +1 -0
  377. package/dist/auth/second-factor/reseal.d.ts +17 -0
  378. package/dist/auth/second-factor/reseal.d.ts.map +1 -0
  379. package/dist/auth/second-factor/spend-recovery-code.d.ts +15 -0
  380. package/dist/auth/second-factor/spend-recovery-code.d.ts.map +1 -0
  381. package/dist/auth/secrets.d.ts +17 -0
  382. package/dist/auth/secrets.d.ts.map +1 -0
  383. package/dist/auth/sessions/amr.d.ts +36 -0
  384. package/dist/auth/sessions/amr.d.ts.map +1 -0
  385. package/dist/auth/sessions/authenticate.d.ts +12 -0
  386. package/dist/auth/sessions/authenticate.d.ts.map +1 -0
  387. package/dist/auth/sessions/collect-expired.d.ts +15 -0
  388. package/dist/auth/sessions/collect-expired.d.ts.map +1 -0
  389. package/dist/auth/sessions/cookie.d.ts +9 -0
  390. package/dist/auth/sessions/cookie.d.ts.map +1 -0
  391. package/dist/auth/sessions/fresh.d.ts +35 -0
  392. package/dist/auth/sessions/fresh.d.ts.map +1 -0
  393. package/dist/auth/sessions/index.d.ts +12 -0
  394. package/dist/auth/sessions/index.d.ts.map +1 -0
  395. package/dist/auth/sessions/open-session.d.ts +22 -0
  396. package/dist/auth/sessions/open-session.d.ts.map +1 -0
  397. package/dist/auth/sessions/presented-token.d.ts +25 -0
  398. package/dist/auth/sessions/presented-token.d.ts.map +1 -0
  399. package/dist/auth/sessions/shared-api.d.ts +17 -0
  400. package/dist/auth/sessions/shared-api.d.ts.map +1 -0
  401. package/dist/auth/sessions/standing.d.ts +32 -0
  402. package/dist/auth/sessions/standing.d.ts.map +1 -0
  403. package/dist/auth/shared-api.d.ts +139 -0
  404. package/dist/auth/shared-api.d.ts.map +1 -0
  405. package/dist/auth/sign-in-attempts.d.ts +45 -0
  406. package/dist/auth/sign-in-attempts.d.ts.map +1 -0
  407. package/dist/auth/sign-in-code.d.ts +26 -0
  408. package/dist/auth/sign-in-code.d.ts.map +1 -0
  409. package/dist/auth/social/attach.d.ts +31 -0
  410. package/dist/auth/social/attach.d.ts.map +1 -0
  411. package/dist/auth/social/begin.d.ts +30 -0
  412. package/dist/auth/social/begin.d.ts.map +1 -0
  413. package/dist/auth/social/complete-link.d.ts +17 -0
  414. package/dist/auth/social/complete-link.d.ts.map +1 -0
  415. package/dist/auth/social/complete.d.ts +54 -0
  416. package/dist/auth/social/complete.d.ts.map +1 -0
  417. package/dist/auth/social/cookie.d.ts +16 -0
  418. package/dist/auth/social/cookie.d.ts.map +1 -0
  419. package/dist/auth/social/find-provider.d.ts +23 -0
  420. package/dist/auth/social/find-provider.d.ts.map +1 -0
  421. package/dist/auth/social/finish.d.ts +60 -0
  422. package/dist/auth/social/finish.d.ts.map +1 -0
  423. package/dist/auth/social/flow-cookie-value.d.ts +26 -0
  424. package/dist/auth/social/flow-cookie-value.d.ts.map +1 -0
  425. package/dist/auth/social/flow-secret.d.ts +40 -0
  426. package/dist/auth/social/flow-secret.d.ts.map +1 -0
  427. package/dist/auth/social/index.d.ts +19 -0
  428. package/dist/auth/social/index.d.ts.map +1 -0
  429. package/dist/auth/social/link-holder.d.ts +33 -0
  430. package/dist/auth/social/link-holder.d.ts.map +1 -0
  431. package/dist/auth/social/provider-call.d.ts +31 -0
  432. package/dist/auth/social/provider-call.d.ts.map +1 -0
  433. package/dist/auth/social/redeem.d.ts +45 -0
  434. package/dist/auth/social/redeem.d.ts.map +1 -0
  435. package/dist/auth/social/return-to.d.ts +18 -0
  436. package/dist/auth/social/return-to.d.ts.map +1 -0
  437. package/dist/auth/social/sign-in.d.ts +41 -0
  438. package/dist/auth/social/sign-in.d.ts.map +1 -0
  439. package/dist/auth/social/sign-up.d.ts +37 -0
  440. package/dist/auth/social/sign-up.d.ts.map +1 -0
  441. package/dist/auth/social/start.d.ts +21 -0
  442. package/dist/auth/social/start.d.ts.map +1 -0
  443. package/dist/auth/social/step-up-proof.d.ts +26 -0
  444. package/dist/auth/social/step-up-proof.d.ts.map +1 -0
  445. package/dist/auth/social/step-up-request.d.ts +28 -0
  446. package/dist/auth/social/step-up-request.d.ts.map +1 -0
  447. package/dist/auth/social/step-up.d.ts +19 -0
  448. package/dist/auth/social/step-up.d.ts.map +1 -0
  449. package/dist/auth/social/types-of.d.ts +12 -0
  450. package/dist/auth/social/types-of.d.ts.map +1 -0
  451. package/dist/auth/social/unlink.d.ts +16 -0
  452. package/dist/auth/social/unlink.d.ts.map +1 -0
  453. package/dist/auth/social/wiring.d.ts +10 -0
  454. package/dist/auth/social/wiring.d.ts.map +1 -0
  455. package/dist/auth/standard-schema.d.ts +41 -0
  456. package/dist/auth/standard-schema.d.ts.map +1 -0
  457. package/dist/auth/step-up/codes.d.ts +35 -0
  458. package/dist/auth/step-up/codes.d.ts.map +1 -0
  459. package/dist/auth/step-up/flows.d.ts +18 -0
  460. package/dist/auth/step-up/flows.d.ts.map +1 -0
  461. package/dist/auth/step-up/open.d.ts +23 -0
  462. package/dist/auth/step-up/open.d.ts.map +1 -0
  463. package/dist/auth/step-up/passkey.d.ts +31 -0
  464. package/dist/auth/step-up/passkey.d.ts.map +1 -0
  465. package/dist/auth/step-up/request.d.ts +15 -0
  466. package/dist/auth/step-up/request.d.ts.map +1 -0
  467. package/dist/auth/step-up/spend.d.ts +4 -0
  468. package/dist/auth/step-up/spend.d.ts.map +1 -0
  469. package/dist/auth/totp.d.ts +36 -0
  470. package/dist/auth/totp.d.ts.map +1 -0
  471. package/dist/auth/types/api-keys-of.d.ts +19 -0
  472. package/dist/auth/types/api-keys-of.d.ts.map +1 -0
  473. package/dist/auth/types/api-keys.d.ts +164 -0
  474. package/dist/auth/types/api-keys.d.ts.map +1 -0
  475. package/dist/auth/types/avatar.d.ts +72 -0
  476. package/dist/auth/types/avatar.d.ts.map +1 -0
  477. package/dist/auth/types/change-email.d.ts +82 -0
  478. package/dist/auth/types/change-email.d.ts.map +1 -0
  479. package/dist/auth/types/checks.d.ts +147 -0
  480. package/dist/auth/types/checks.d.ts.map +1 -0
  481. package/dist/auth/types/email-flows.d.ts +117 -0
  482. package/dist/auth/types/email-flows.d.ts.map +1 -0
  483. package/dist/auth/types/find-by-email.d.ts +31 -0
  484. package/dist/auth/types/find-by-email.d.ts.map +1 -0
  485. package/dist/auth/types/find-or-create.d.ts +59 -0
  486. package/dist/auth/types/find-or-create.d.ts.map +1 -0
  487. package/dist/auth/types/index.d.ts +38 -0
  488. package/dist/auth/types/index.d.ts.map +1 -0
  489. package/dist/auth/types/inference.d.ts +62 -0
  490. package/dist/auth/types/inference.d.ts.map +1 -0
  491. package/dist/auth/types/invitations/api.d.ts +203 -0
  492. package/dist/auth/types/invitations/api.d.ts.map +1 -0
  493. package/dist/auth/types/invitations/history.d.ts +87 -0
  494. package/dist/auth/types/invitations/history.d.ts.map +1 -0
  495. package/dist/auth/types/invitations/index.d.ts +10 -0
  496. package/dist/auth/types/invitations/index.d.ts.map +1 -0
  497. package/dist/auth/types/invitations/invitation.d.ts +76 -0
  498. package/dist/auth/types/invitations/invitation.d.ts.map +1 -0
  499. package/dist/auth/types/invitations/issue-type.d.ts +15 -0
  500. package/dist/auth/types/invitations/issue-type.d.ts.map +1 -0
  501. package/dist/auth/types/invitations-of.d.ts +26 -0
  502. package/dist/auth/types/invitations-of.d.ts.map +1 -0
  503. package/dist/auth/types/janus.d.ts +51 -0
  504. package/dist/auth/types/janus.d.ts.map +1 -0
  505. package/dist/auth/types/magic-link.d.ts +69 -0
  506. package/dist/auth/types/magic-link.d.ts.map +1 -0
  507. package/dist/auth/types/passkeys.d.ts +183 -0
  508. package/dist/auth/types/passkeys.d.ts.map +1 -0
  509. package/dist/auth/types/password.d.ts +113 -0
  510. package/dist/auth/types/password.d.ts.map +1 -0
  511. package/dist/auth/types/prepared.d.ts +68 -0
  512. package/dist/auth/types/prepared.d.ts.map +1 -0
  513. package/dist/auth/types/proven-sign-in.d.ts +43 -0
  514. package/dist/auth/types/proven-sign-in.d.ts.map +1 -0
  515. package/dist/auth/types/reset-password.d.ts +46 -0
  516. package/dist/auth/types/reset-password.d.ts.map +1 -0
  517. package/dist/auth/types/second-factor.d.ts +164 -0
  518. package/dist/auth/types/second-factor.d.ts.map +1 -0
  519. package/dist/auth/types/session.d.ts +68 -0
  520. package/dist/auth/types/session.d.ts.map +1 -0
  521. package/dist/auth/types/shared-api.d.ts +96 -0
  522. package/dist/auth/types/shared-api.d.ts.map +1 -0
  523. package/dist/auth/types/sign-in.d.ts +102 -0
  524. package/dist/auth/types/sign-in.d.ts.map +1 -0
  525. package/dist/auth/types/social-flow.d.ts +28 -0
  526. package/dist/auth/types/social-flow.d.ts.map +1 -0
  527. package/dist/auth/types/social-step-up.d.ts +38 -0
  528. package/dist/auth/types/social-step-up.d.ts.map +1 -0
  529. package/dist/auth/types/social.d.ts +193 -0
  530. package/dist/auth/types/social.d.ts.map +1 -0
  531. package/dist/auth/types/step-up.d.ts +133 -0
  532. package/dist/auth/types/step-up.d.ts.map +1 -0
  533. package/dist/auth/types/type-api.d.ts +29 -0
  534. package/dist/auth/types/type-api.d.ts.map +1 -0
  535. package/dist/auth/types/user-type.d.ts +106 -0
  536. package/dist/auth/types/user-type.d.ts.map +1 -0
  537. package/dist/auth/types/user.d.ts +62 -0
  538. package/dist/auth/types/user.d.ts.map +1 -0
  539. package/dist/auth/types/verify-email.d.ts +190 -0
  540. package/dist/auth/types/verify-email.d.ts.map +1 -0
  541. package/dist/auth/users/any-type-api.d.ts +6 -0
  542. package/dist/auth/users/any-type-api.d.ts.map +1 -0
  543. package/dist/auth/users/by-login.d.ts +10 -0
  544. package/dist/auth/users/by-login.d.ts.map +1 -0
  545. package/dist/auth/users/change-password.d.ts +26 -0
  546. package/dist/auth/users/change-password.d.ts.map +1 -0
  547. package/dist/auth/users/delete.d.ts +10 -0
  548. package/dist/auth/users/delete.d.ts.map +1 -0
  549. package/dist/auth/users/email-move-guard.d.ts +20 -0
  550. package/dist/auth/users/email-move-guard.d.ts.map +1 -0
  551. package/dist/auth/users/email-prefix.d.ts +23 -0
  552. package/dist/auth/users/email-prefix.d.ts.map +1 -0
  553. package/dist/auth/users/fields-patch.d.ts +21 -0
  554. package/dist/auth/users/fields-patch.d.ts.map +1 -0
  555. package/dist/auth/users/find-by-email.d.ts +11 -0
  556. package/dist/auth/users/find-by-email.d.ts.map +1 -0
  557. package/dist/auth/users/find-many.d.ts +29 -0
  558. package/dist/auth/users/find-many.d.ts.map +1 -0
  559. package/dist/auth/users/find-or-create.d.ts +12 -0
  560. package/dist/auth/users/find-or-create.d.ts.map +1 -0
  561. package/dist/auth/users/flow-types.d.ts +15 -0
  562. package/dist/auth/users/flow-types.d.ts.map +1 -0
  563. package/dist/auth/users/index.d.ts +9 -0
  564. package/dist/auth/users/index.d.ts.map +1 -0
  565. package/dist/auth/users/insert.d.ts +15 -0
  566. package/dist/auth/users/insert.d.ts.map +1 -0
  567. package/dist/auth/users/name-prefix.d.ts +19 -0
  568. package/dist/auth/users/name-prefix.d.ts.map +1 -0
  569. package/dist/auth/users/password-flows.d.ts +11 -0
  570. package/dist/auth/users/password-flows.d.ts.map +1 -0
  571. package/dist/auth/users/record-flows.d.ts +11 -0
  572. package/dist/auth/users/record-flows.d.ts.map +1 -0
  573. package/dist/auth/users/sign-in.d.ts +24 -0
  574. package/dist/auth/users/sign-in.d.ts.map +1 -0
  575. package/dist/auth/users/sign-up.d.ts +13 -0
  576. package/dist/auth/users/sign-up.d.ts.map +1 -0
  577. package/dist/auth/users/type-api.d.ts +10 -0
  578. package/dist/auth/users/type-api.d.ts.map +1 -0
  579. package/dist/auth/users/update.d.ts +16 -0
  580. package/dist/auth/users/update.d.ts.map +1 -0
  581. package/dist/background/background.d.ts +22 -0
  582. package/dist/background/background.d.ts.map +1 -0
  583. package/dist/chunks/index-2ttdcz7n.js +354 -0
  584. package/dist/chunks/index-2ttdcz7n.js.map +16 -0
  585. package/dist/chunks/index-5dxynm32.js +85 -0
  586. package/dist/chunks/index-5dxynm32.js.map +10 -0
  587. package/dist/chunks/index-ftz0ne6j.js +127 -0
  588. package/dist/chunks/index-ftz0ne6j.js.map +11 -0
  589. package/dist/chunks/index-k6y18nx9.js +724 -0
  590. package/dist/chunks/index-k6y18nx9.js.map +24 -0
  591. package/dist/chunks/index-n8jxmxeg.js +64 -0
  592. package/dist/chunks/index-n8jxmxeg.js.map +11 -0
  593. package/dist/conformance/api-keys/cases/bound.d.ts +3 -0
  594. package/dist/conformance/api-keys/cases/bound.d.ts.map +1 -0
  595. package/dist/conformance/api-keys/cases/expiry.d.ts +3 -0
  596. package/dist/conformance/api-keys/cases/expiry.d.ts.map +1 -0
  597. package/dist/conformance/api-keys/cases/index.d.ts +4 -0
  598. package/dist/conformance/api-keys/cases/index.d.ts.map +1 -0
  599. package/dist/conformance/api-keys/cases/insert.d.ts +3 -0
  600. package/dist/conformance/api-keys/cases/insert.d.ts.map +1 -0
  601. package/dist/conformance/api-keys/cases/outage.d.ts +3 -0
  602. package/dist/conformance/api-keys/cases/outage.d.ts.map +1 -0
  603. package/dist/conformance/api-keys/cases/revoke.d.ts +3 -0
  604. package/dist/conformance/api-keys/cases/revoke.d.ts.map +1 -0
  605. package/dist/conformance/api-keys/cases/touch.d.ts +3 -0
  606. package/dist/conformance/api-keys/cases/touch.d.ts.map +1 -0
  607. package/dist/conformance/api-keys/cases/user-bound.d.ts +3 -0
  608. package/dist/conformance/api-keys/cases/user-bound.d.ts.map +1 -0
  609. package/dist/conformance/api-keys/describe.d.ts +20 -0
  610. package/dist/conformance/api-keys/describe.d.ts.map +1 -0
  611. package/dist/conformance/api-keys/fixtures.d.ts +4 -0
  612. package/dist/conformance/api-keys/fixtures.d.ts.map +1 -0
  613. package/dist/conformance/api-keys/index.d.ts +18 -0
  614. package/dist/conformance/api-keys/index.d.ts.map +1 -0
  615. package/dist/conformance/api-keys/reference.d.ts +4 -0
  616. package/dist/conformance/api-keys/reference.d.ts.map +1 -0
  617. package/dist/conformance/api-keys/types.d.ts +42 -0
  618. package/dist/conformance/api-keys/types.d.ts.map +1 -0
  619. package/dist/conformance/assert.d.ts +40 -0
  620. package/dist/conformance/assert.d.ts.map +1 -0
  621. package/dist/conformance/cases/outage.d.ts +3 -0
  622. package/dist/conformance/cases/outage.d.ts.map +1 -0
  623. package/dist/conformance/cases/outage.passkeys.d.ts +12 -0
  624. package/dist/conformance/cases/outage.passkeys.d.ts.map +1 -0
  625. package/dist/conformance/cases/passkeys/deletion.d.ts +4 -0
  626. package/dist/conformance/cases/passkeys/deletion.d.ts.map +1 -0
  627. package/dist/conformance/cases/passkeys/index.d.ts +8 -0
  628. package/dist/conformance/cases/passkeys/index.d.ts.map +1 -0
  629. package/dist/conformance/cases/passkeys/inserts.d.ts +4 -0
  630. package/dist/conformance/cases/passkeys/inserts.d.ts.map +1 -0
  631. package/dist/conformance/cases/passkeys/reads.d.ts +4 -0
  632. package/dist/conformance/cases/passkeys/reads.d.ts.map +1 -0
  633. package/dist/conformance/cases/passkeys/uses.d.ts +4 -0
  634. package/dist/conformance/cases/passkeys/uses.d.ts.map +1 -0
  635. package/dist/conformance/cases/sessions/deletion.d.ts +4 -0
  636. package/dist/conformance/cases/sessions/deletion.d.ts.map +1 -0
  637. package/dist/conformance/cases/sessions/extension.d.ts +4 -0
  638. package/dist/conformance/cases/sessions/extension.d.ts.map +1 -0
  639. package/dist/conformance/cases/sessions/index.d.ts +4 -0
  640. package/dist/conformance/cases/sessions/index.d.ts.map +1 -0
  641. package/dist/conformance/cases/sessions/inserts.d.ts +4 -0
  642. package/dist/conformance/cases/sessions/inserts.d.ts.map +1 -0
  643. package/dist/conformance/cases/sessions/list.d.ts +4 -0
  644. package/dist/conformance/cases/sessions/list.d.ts.map +1 -0
  645. package/dist/conformance/cases/sessions/reads.d.ts +4 -0
  646. package/dist/conformance/cases/sessions/reads.d.ts.map +1 -0
  647. package/dist/conformance/cases/sessions/reauthentication.d.ts +4 -0
  648. package/dist/conformance/cases/sessions/reauthentication.d.ts.map +1 -0
  649. package/dist/conformance/cases/sessions/revocation.d.ts +4 -0
  650. package/dist/conformance/cases/sessions/revocation.d.ts.map +1 -0
  651. package/dist/conformance/cases/social-links/deletion.d.ts +4 -0
  652. package/dist/conformance/cases/social-links/deletion.d.ts.map +1 -0
  653. package/dist/conformance/cases/social-links/index.d.ts +8 -0
  654. package/dist/conformance/cases/social-links/index.d.ts.map +1 -0
  655. package/dist/conformance/cases/social-links/inserts.d.ts +4 -0
  656. package/dist/conformance/cases/social-links/inserts.d.ts.map +1 -0
  657. package/dist/conformance/cases/social-links/reads.d.ts +4 -0
  658. package/dist/conformance/cases/social-links/reads.d.ts.map +1 -0
  659. package/dist/conformance/cases/tokens/attempts.d.ts +7 -0
  660. package/dist/conformance/cases/tokens/attempts.d.ts.map +1 -0
  661. package/dist/conformance/cases/tokens/change-email.d.ts +8 -0
  662. package/dist/conformance/cases/tokens/change-email.d.ts.map +1 -0
  663. package/dist/conformance/cases/tokens/deletion.d.ts +4 -0
  664. package/dist/conformance/cases/tokens/deletion.d.ts.map +1 -0
  665. package/dist/conformance/cases/tokens/index.d.ts +4 -0
  666. package/dist/conformance/cases/tokens/index.d.ts.map +1 -0
  667. package/dist/conformance/cases/tokens/inserts.d.ts +7 -0
  668. package/dist/conformance/cases/tokens/inserts.d.ts.map +1 -0
  669. package/dist/conformance/cases/tokens/kinds.d.ts +7 -0
  670. package/dist/conformance/cases/tokens/kinds.d.ts.map +1 -0
  671. package/dist/conformance/cases/tokens/redemption.d.ts +7 -0
  672. package/dist/conformance/cases/tokens/redemption.d.ts.map +1 -0
  673. package/dist/conformance/cases/tokens/social-flow.d.ts +8 -0
  674. package/dist/conformance/cases/tokens/social-flow.d.ts.map +1 -0
  675. package/dist/conformance/cases/tokens/spending.d.ts +7 -0
  676. package/dist/conformance/cases/tokens/spending.d.ts.map +1 -0
  677. package/dist/conformance/cases/users/avatar.d.ts +8 -0
  678. package/dist/conformance/cases/users/avatar.d.ts.map +1 -0
  679. package/dist/conformance/cases/users/batch.d.ts +8 -0
  680. package/dist/conformance/cases/users/batch.d.ts.map +1 -0
  681. package/dist/conformance/cases/users/deletion.d.ts +4 -0
  682. package/dist/conformance/cases/users/deletion.d.ts.map +1 -0
  683. package/dist/conformance/cases/users/index.d.ts +4 -0
  684. package/dist/conformance/cases/users/index.d.ts.map +1 -0
  685. package/dist/conformance/cases/users/inserts.d.ts +4 -0
  686. package/dist/conformance/cases/users/inserts.d.ts.map +1 -0
  687. package/dist/conformance/cases/users/listing.d.ts +4 -0
  688. package/dist/conformance/cases/users/listing.d.ts.map +1 -0
  689. package/dist/conformance/cases/users/patches.d.ts +7 -0
  690. package/dist/conformance/cases/users/patches.d.ts.map +1 -0
  691. package/dist/conformance/cases/users/reads.d.ts +7 -0
  692. package/dist/conformance/cases/users/reads.d.ts.map +1 -0
  693. package/dist/conformance/cases/users/second-factor.d.ts +16 -0
  694. package/dist/conformance/cases/users/second-factor.d.ts.map +1 -0
  695. package/dist/conformance/cases/users/versions.d.ts +7 -0
  696. package/dist/conformance/cases/users/versions.d.ts.map +1 -0
  697. package/dist/conformance/describe.d.ts +82 -0
  698. package/dist/conformance/describe.d.ts.map +1 -0
  699. package/dist/conformance/fixtures.d.ts +31 -0
  700. package/dist/conformance/fixtures.d.ts.map +1 -0
  701. package/dist/conformance/index.d.ts +46 -0
  702. package/dist/conformance/index.d.ts.map +1 -0
  703. package/dist/conformance/index.js +4411 -0
  704. package/dist/conformance/index.js.map +86 -0
  705. package/dist/conformance/invitations/cases/actors.d.ts +3 -0
  706. package/dist/conformance/invitations/cases/actors.d.ts.map +1 -0
  707. package/dist/conformance/invitations/cases/find-pending.d.ts +3 -0
  708. package/dist/conformance/invitations/cases/find-pending.d.ts.map +1 -0
  709. package/dist/conformance/invitations/cases/imported.d.ts +3 -0
  710. package/dist/conformance/invitations/cases/imported.d.ts.map +1 -0
  711. package/dist/conformance/invitations/cases/index.d.ts +4 -0
  712. package/dist/conformance/invitations/cases/index.d.ts.map +1 -0
  713. package/dist/conformance/invitations/cases/insert.d.ts +3 -0
  714. package/dist/conformance/invitations/cases/insert.d.ts.map +1 -0
  715. package/dist/conformance/invitations/cases/list-lapsed.d.ts +3 -0
  716. package/dist/conformance/invitations/cases/list-lapsed.d.ts.map +1 -0
  717. package/dist/conformance/invitations/cases/list-status.d.ts +3 -0
  718. package/dist/conformance/invitations/cases/list-status.d.ts.map +1 -0
  719. package/dist/conformance/invitations/cases/list.d.ts +3 -0
  720. package/dist/conformance/invitations/cases/list.d.ts.map +1 -0
  721. package/dist/conformance/invitations/cases/outage.d.ts +3 -0
  722. package/dist/conformance/invitations/cases/outage.d.ts.map +1 -0
  723. package/dist/conformance/invitations/cases/scope.d.ts +3 -0
  724. package/dist/conformance/invitations/cases/scope.d.ts.map +1 -0
  725. package/dist/conformance/invitations/cases/update.d.ts +3 -0
  726. package/dist/conformance/invitations/cases/update.d.ts.map +1 -0
  727. package/dist/conformance/invitations/describe.d.ts +20 -0
  728. package/dist/conformance/invitations/describe.d.ts.map +1 -0
  729. package/dist/conformance/invitations/fixtures.d.ts +4 -0
  730. package/dist/conformance/invitations/fixtures.d.ts.map +1 -0
  731. package/dist/conformance/invitations/index.d.ts +18 -0
  732. package/dist/conformance/invitations/index.d.ts.map +1 -0
  733. package/dist/conformance/invitations/reference.d.ts +4 -0
  734. package/dist/conformance/invitations/reference.d.ts.map +1 -0
  735. package/dist/conformance/invitations/types.d.ts +34 -0
  736. package/dist/conformance/invitations/types.d.ts.map +1 -0
  737. package/dist/conformance/reference.d.ts +13 -0
  738. package/dist/conformance/reference.d.ts.map +1 -0
  739. package/dist/conformance/relations/cases/deletion.d.ts +4 -0
  740. package/dist/conformance/relations/cases/deletion.d.ts.map +1 -0
  741. package/dist/conformance/relations/cases/holders.d.ts +9 -0
  742. package/dist/conformance/relations/cases/holders.d.ts.map +1 -0
  743. package/dist/conformance/relations/cases/index.d.ts +4 -0
  744. package/dist/conformance/relations/cases/index.d.ts.map +1 -0
  745. package/dist/conformance/relations/cases/outage.d.ts +3 -0
  746. package/dist/conformance/relations/cases/outage.d.ts.map +1 -0
  747. package/dist/conformance/relations/cases/reads.d.ts +8 -0
  748. package/dist/conformance/relations/cases/reads.d.ts.map +1 -0
  749. package/dist/conformance/relations/cases/traversal.d.ts +7 -0
  750. package/dist/conformance/relations/cases/traversal.d.ts.map +1 -0
  751. package/dist/conformance/relations/cases/writes.d.ts +4 -0
  752. package/dist/conformance/relations/cases/writes.d.ts.map +1 -0
  753. package/dist/conformance/relations/describe.d.ts +20 -0
  754. package/dist/conformance/relations/describe.d.ts.map +1 -0
  755. package/dist/conformance/relations/fixtures.d.ts +8 -0
  756. package/dist/conformance/relations/fixtures.d.ts.map +1 -0
  757. package/dist/conformance/relations/index.d.ts +18 -0
  758. package/dist/conformance/relations/index.d.ts.map +1 -0
  759. package/dist/conformance/relations/reference.d.ts +4 -0
  760. package/dist/conformance/relations/reference.d.ts.map +1 -0
  761. package/dist/conformance/relations/types.d.ts +34 -0
  762. package/dist/conformance/relations/types.d.ts.map +1 -0
  763. package/dist/conformance/types.d.ts +79 -0
  764. package/dist/conformance/types.d.ts.map +1 -0
  765. package/dist/errors/janus-error/base.d.ts +47 -0
  766. package/dist/errors/janus-error/base.d.ts.map +1 -0
  767. package/dist/errors/janus-error/codes.credentials.d.ts +36 -0
  768. package/dist/errors/janus-error/codes.credentials.d.ts.map +1 -0
  769. package/dist/errors/janus-error/codes.d.ts +23 -0
  770. package/dist/errors/janus-error/codes.d.ts.map +1 -0
  771. package/dist/errors/janus-error/codes.invitations.d.ts +52 -0
  772. package/dist/errors/janus-error/codes.invitations.d.ts.map +1 -0
  773. package/dist/errors/janus-error/codes.one-time.d.ts +63 -0
  774. package/dist/errors/janus-error/codes.one-time.d.ts.map +1 -0
  775. package/dist/errors/janus-error/codes.records.d.ts +86 -0
  776. package/dist/errors/janus-error/codes.records.d.ts.map +1 -0
  777. package/dist/errors/janus-error/codes.social.d.ts +88 -0
  778. package/dist/errors/janus-error/codes.social.d.ts.map +1 -0
  779. package/dist/errors/janus-error/index.d.ts +17 -0
  780. package/dist/errors/janus-error/index.d.ts.map +1 -0
  781. package/dist/errors/janus-error/options.d.ts +105 -0
  782. package/dist/errors/janus-error/options.d.ts.map +1 -0
  783. package/dist/errors/janus-error/refusals.d.ts +151 -0
  784. package/dist/errors/janus-error/refusals.d.ts.map +1 -0
  785. package/dist/errors/janus-error/status.d.ts +21 -0
  786. package/dist/errors/janus-error/status.d.ts.map +1 -0
  787. package/dist/errors/janus-error/store.d.ts +36 -0
  788. package/dist/errors/janus-error/store.d.ts.map +1 -0
  789. package/dist/ids/derived.d.ts +25 -0
  790. package/dist/ids/derived.d.ts.map +1 -0
  791. package/dist/ids/id.d.ts +55 -0
  792. package/dist/ids/id.d.ts.map +1 -0
  793. package/dist/index.d.ts +32 -0
  794. package/dist/index.d.ts.map +1 -0
  795. package/dist/index.js +6933 -0
  796. package/dist/index.js.map +208 -0
  797. package/dist/pagination/cursor-page.d.ts +53 -0
  798. package/dist/pagination/cursor-page.d.ts.map +1 -0
  799. package/dist/permissions/bound-model.d.ts +10 -0
  800. package/dist/permissions/bound-model.d.ts.map +1 -0
  801. package/dist/permissions/can.d.ts +13 -0
  802. package/dist/permissions/can.d.ts.map +1 -0
  803. package/dist/permissions/engine.d.ts +49 -0
  804. package/dist/permissions/engine.d.ts.map +1 -0
  805. package/dist/permissions/holders.d.ts +12 -0
  806. package/dist/permissions/holders.d.ts.map +1 -0
  807. package/dist/permissions/index.d.ts +36 -0
  808. package/dist/permissions/index.d.ts.map +1 -0
  809. package/dist/permissions/index.js +924 -0
  810. package/dist/permissions/index.js.map +28 -0
  811. package/dist/permissions/input.d.ts +43 -0
  812. package/dist/permissions/input.d.ts.map +1 -0
  813. package/dist/permissions/list.d.ts +16 -0
  814. package/dist/permissions/list.d.ts.map +1 -0
  815. package/dist/permissions/model/can.d.ts +41 -0
  816. package/dist/permissions/model/can.d.ts.map +1 -0
  817. package/dist/permissions/model/config.d.ts +36 -0
  818. package/dist/permissions/model/config.d.ts.map +1 -0
  819. package/dist/permissions/model/constraint.d.ts +37 -0
  820. package/dist/permissions/model/constraint.d.ts.map +1 -0
  821. package/dist/permissions/model/ctx.d.ts +23 -0
  822. package/dist/permissions/model/ctx.d.ts.map +1 -0
  823. package/dist/permissions/model/define.d.ts +78 -0
  824. package/dist/permissions/model/define.d.ts.map +1 -0
  825. package/dist/permissions/model/from-field.d.ts +31 -0
  826. package/dist/permissions/model/from-field.d.ts.map +1 -0
  827. package/dist/permissions/model/grant.d.ts +81 -0
  828. package/dist/permissions/model/grant.d.ts.map +1 -0
  829. package/dist/permissions/model/list.d.ts +48 -0
  830. package/dist/permissions/model/list.d.ts.map +1 -0
  831. package/dist/permissions/model/names.d.ts +51 -0
  832. package/dist/permissions/model/names.d.ts.map +1 -0
  833. package/dist/permissions/model/permissions.d.ts +48 -0
  834. package/dist/permissions/model/permissions.d.ts.map +1 -0
  835. package/dist/permissions/model/refs.d.ts +36 -0
  836. package/dist/permissions/model/refs.d.ts.map +1 -0
  837. package/dist/permissions/model/refusal.d.ts +13 -0
  838. package/dist/permissions/model/refusal.d.ts.map +1 -0
  839. package/dist/permissions/model/unions.d.ts +3 -0
  840. package/dist/permissions/model/unions.d.ts.map +1 -0
  841. package/dist/permissions/model/when.d.ts +16 -0
  842. package/dist/permissions/model/when.d.ts.map +1 -0
  843. package/dist/permissions/port/holders.d.ts +38 -0
  844. package/dist/permissions/port/holders.d.ts.map +1 -0
  845. package/dist/permissions/port/memory.d.ts +17 -0
  846. package/dist/permissions/port/memory.d.ts.map +1 -0
  847. package/dist/permissions/port/types.d.ts +101 -0
  848. package/dist/permissions/port/types.d.ts.map +1 -0
  849. package/dist/permissions/replace.d.ts +25 -0
  850. package/dist/permissions/replace.d.ts.map +1 -0
  851. package/dist/permissions/resolve/declared-names.d.ts +24 -0
  852. package/dist/permissions/resolve/declared-names.d.ts.map +1 -0
  853. package/dist/permissions/resolve/refuse-data-beyond-root.d.ts +11 -0
  854. package/dist/permissions/resolve/refuse-data-beyond-root.d.ts.map +1 -0
  855. package/dist/permissions/resolve/refuse-loops.d.ts +10 -0
  856. package/dist/permissions/resolve/refuse-loops.d.ts.map +1 -0
  857. package/dist/permissions/resolve/resolve-model.d.ts +13 -0
  858. package/dist/permissions/resolve/resolve-model.d.ts.map +1 -0
  859. package/dist/permissions/resolve/resolve-relation.d.ts +9 -0
  860. package/dist/permissions/resolve/resolve-relation.d.ts.map +1 -0
  861. package/dist/permissions/resolve/resolve-rule.d.ts +12 -0
  862. package/dist/permissions/resolve/resolve-rule.d.ts.map +1 -0
  863. package/dist/permissions/resolve/resolved.d.ts +52 -0
  864. package/dist/permissions/resolve/resolved.d.ts.map +1 -0
  865. package/dist/permissions/resolve/step.d.ts +4 -0
  866. package/dist/permissions/resolve/step.d.ts.map +1 -0
  867. package/dist/permissions/reverse.d.ts +53 -0
  868. package/dist/permissions/reverse.d.ts.map +1 -0
  869. package/dist/permissions/walk.d.ts +29 -0
  870. package/dist/permissions/walk.d.ts.map +1 -0
  871. package/dist/stores/guard.d.ts +24 -0
  872. package/dist/stores/guard.d.ts.map +1 -0
  873. package/dist/stores/storable.d.ts +15 -0
  874. package/dist/stores/storable.d.ts.map +1 -0
  875. package/dist/subjects/notation.d.ts +39 -0
  876. package/dist/subjects/notation.d.ts.map +1 -0
  877. package/dist/subjects/subject.d.ts +128 -0
  878. package/dist/subjects/subject.d.ts.map +1 -0
  879. package/dist/testing/index.d.ts +12 -0
  880. package/dist/testing/index.d.ts.map +1 -0
  881. package/dist/testing/index.js +26 -0
  882. package/dist/testing/index.js.map +10 -0
  883. package/dist/time/clock.d.ts +31 -0
  884. package/dist/time/clock.d.ts.map +1 -0
  885. package/dist/time/duration.d.ts +23 -0
  886. package/dist/time/duration.d.ts.map +1 -0
  887. package/docs/README.md +46 -0
  888. package/docs/guide/adapters.md +858 -0
  889. package/docs/guide/api-keys.md +316 -0
  890. package/docs/guide/avatars.md +334 -0
  891. package/docs/guide/devices.md +441 -0
  892. package/docs/guide/email-flows.md +880 -0
  893. package/docs/guide/errors.md +180 -0
  894. package/docs/guide/events.md +467 -0
  895. package/docs/guide/invitations.md +465 -0
  896. package/docs/guide/issuers.md +107 -0
  897. package/docs/guide/magic-link.md +580 -0
  898. package/docs/guide/migrating-invitations.md +142 -0
  899. package/docs/guide/passkeys.md +425 -0
  900. package/docs/guide/passwords.md +325 -0
  901. package/docs/guide/permissions.md +719 -0
  902. package/docs/guide/second-factor.md +1124 -0
  903. package/docs/guide/sessions.md +521 -0
  904. package/docs/guide/sign-in-code.md +631 -0
  905. package/docs/guide/social.md +639 -0
  906. package/docs/guide/step-up.md +262 -0
  907. package/docs/guide/users.md +557 -0
  908. package/docs/guide/vocabulary.md +316 -0
  909. package/docs/roadmap.md +101 -0
  910. package/docs/troubleshooting.md +3305 -0
  911. package/package.json +77 -5
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `auth.apiKeys` as `janus()` adds it: only when the configuration has the
3
+ * `apiKeys` block.
4
+ *
5
+ * Part of what `janus()` hands back; `./janus` gathers it.
6
+ */
7
+ import type { JanusConfig } from '../config';
8
+ import type { ApiKeysApi } from './api-keys';
9
+ import type { UserOf } from './inference';
10
+ /**
11
+ * `auth.apiKeys` — only when the configuration has the `apiKeys` block, with
12
+ * the lifetimes it lists as the only ones `create` takes.
13
+ */
14
+ export type ApiKeysOf<C extends JanusConfig> = C extends {
15
+ readonly apiKeys: {
16
+ readonly lifetimes: readonly (infer L)[];
17
+ };
18
+ } ? ApiKeysApi<UserOf<C>, Extract<L, string | number>> : unknown;
19
+ //# sourceMappingURL=api-keys-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys-of.d.ts","sourceRoot":"","sources":["../../../src/auth/types/api-keys-of.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS;IACxD,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAA;KAAE,CAAC;CAC/D,GACE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,GAClD,OAAO,CAAC"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * API keys as application code sees them, and the `apiKeys` surface
3
+ * `janus({ apiKeys })` adds.
4
+ *
5
+ * Part of what `janus()` hands back; `./index` gathers it.
6
+ */
7
+ import type { CursorPage } from '../../pagination/cursor-page';
8
+ import type { Duration } from '../../time/duration';
9
+ import type { ApiKeyBound, ApiKeyRecord } from '../port/types/api-keys';
10
+ import type { Principal } from './session';
11
+ import type { UserRef } from './user';
12
+ /**
13
+ * An API key, as application code sees it: everything but the secret's hash,
14
+ * with a `hint` to tell keys apart in a list. **The token is never here** —
15
+ * it is shown once, by `create`.
16
+ */
17
+ export interface ApiKey extends Omit<ApiKeyRecord, 'secretHash' | 'scopes' | 'bound' | 'expiryNotifiedAt'> {
18
+ /** The start of the token — its prefix and the first characters of its id: `sl_0192ab…`. Safe to display. */
19
+ readonly hint: string;
20
+ /** What the key may do, as given to `create`; `null` for a key created without `scopes`. */
21
+ readonly scopes: readonly string[] | null;
22
+ /** The object the key is bound to, as given to `create`; `null` for an unbound key. */
23
+ readonly bound: ApiKeyBound | null;
24
+ /** When `markExpiryNotified` recorded the notice; `null` until then. */
25
+ readonly expiryNotifiedAt: Date | null;
26
+ }
27
+ /** What `apiKeys.create` takes. */
28
+ export interface CreateApiKeyInput<Lifetime extends string | number> {
29
+ readonly name: string;
30
+ readonly lifetime: Lifetime;
31
+ /**
32
+ * What the key may do (`['mcp:read']`), stored on the key and answered as
33
+ * `principal.scopes`. **Janus never enforces them**: the application checks
34
+ * them where it serves the request. Absent, the key is unscoped and
35
+ * `principal.scopes` is `null`. 1 to 32 distinct scope tokens of 1 to 100
36
+ * printable ASCII characters, no space, `"` or `\`; a repeat is dropped.
37
+ */
38
+ readonly scopes?: readonly string[];
39
+ /**
40
+ * The one object the key acts in, answered as `principal.bound`. **Janus
41
+ * never enforces it either**: the application pins the request to it.
42
+ * Absent, the key is unbound and `principal.bound` is `null`.
43
+ */
44
+ readonly bound?: ApiKeyBound;
45
+ }
46
+ /** A page request of `list`, `listBound` and `expiring`. */
47
+ export interface ApiKeyPage {
48
+ readonly limit?: number;
49
+ readonly after?: string | null;
50
+ }
51
+ /** The options of `list`: a page, and optionally the bound object to filter on. */
52
+ export interface ApiKeyListOptions extends ApiKeyPage {
53
+ /**
54
+ * Absent: all the user's keys. An object: only the keys bound to it. `null`:
55
+ * only the unbound keys. A value that is no bound shape has an empty page.
56
+ * Given, it needs a store with the `bound` capability (a `TypeError`
57
+ * otherwise); the `userBound` capability makes it one read, else the core
58
+ * reads the user's keys 100 at a time and filters them.
59
+ */
60
+ readonly bound?: ApiKeyBound | null;
61
+ }
62
+ /** A key just created, and the only time its token is available. */
63
+ export interface CreatedApiKey {
64
+ readonly apiKey: ApiKey;
65
+ /**
66
+ * `${prefix}${id}_${secret}`. **Show it to the user once and keep it
67
+ * nowhere**: only its hash is stored, so a lost token is a new key.
68
+ */
69
+ readonly token: string;
70
+ }
71
+ /**
72
+ * The `apiKeys` of an instance configured with `janus({ apiKeys })` — absent
73
+ * from the type without it. `Lifetime` is the configured lifetimes, as written.
74
+ */
75
+ export interface ApiKeysApi<U extends {
76
+ readonly type: string;
77
+ }, Lifetime extends string | number = string | number> {
78
+ readonly apiKeys: {
79
+ /**
80
+ * Creates a key for the user `current` belongs to, and answers its token
81
+ * once.
82
+ *
83
+ * **Behind a fresh proof**: `current.session.authenticatedAt` must be
84
+ * within `apiKeys.freshWithin` (10 minutes when absent), else
85
+ * `STEP_UP_REQUIRED` — ask for a step-up and try again. A key can never
86
+ * be fresh: a key principal is refused with `STEP_UP_REQUIRED` and
87
+ * `reason: 'apiKey'`. `USER_INACTIVE` for an inactive user, `NOT_FOUND` for
88
+ * a user gone or of a type `apiKeys.types` leaves out.
89
+ *
90
+ * `API_KEY_INVALID` (400, `field`) for a `name` empty or over 100
91
+ * characters once trimmed, a `lifetime` not among the configured ones,
92
+ * `scopes` or `bound` not shaped as {@link CreateApiKeyInput} says;
93
+ * `API_KEY_LIMIT` (409, `maxActive`) when the user already holds the most.
94
+ * A `TypeError` for `scopes` or `bound` on a store without the `bound`
95
+ * capability, which would drop them.
96
+ */
97
+ create(current: Principal<U>, input: CreateApiKeyInput<Lifetime>): Promise<CreatedApiKey>;
98
+ /**
99
+ * A user's keys — standing, revoked and lapsed — oldest first, all of them
100
+ * or, with `bound`, those bound to one object (`null`: the unbound ones).
101
+ * `INVALID_CURSOR` for a bad `after`; a `TypeError` for `bound` on a store
102
+ * without the `bound` capability.
103
+ */
104
+ list(user: UserRef, options?: ApiKeyListOptions): Promise<CursorPage<ApiKey>>;
105
+ /**
106
+ * One key by id, as `list` answers it, or `null` for none (and for an id
107
+ * that is no key id, without reading the store). A revoked or lapsed key
108
+ * is answered as is: `get` does not check validity, `authenticate` does.
109
+ *
110
+ * **Pass `owner` whenever the id came from a request**: a key of another
111
+ * user is then `null`, as an unknown one. Without it any key is answered
112
+ * — the administrator's path, never to be answered to a request without
113
+ * checking its `userId`. A store failure throws.
114
+ */
115
+ get(id: string, options?: {
116
+ readonly owner?: UserRef;
117
+ }): Promise<ApiKey | null>;
118
+ /**
119
+ * Every key bound to `object` — whoever holds it, standing, revoked and
120
+ * lapsed — oldest first: the object owner's view. An `object` that is no
121
+ * bound shape has an empty page. A `TypeError` on a store without the
122
+ * `bound` capability.
123
+ */
124
+ listBound(object: ApiKeyBound, page?: ApiKeyPage): Promise<CursorPage<ApiKey>>;
125
+ /**
126
+ * Revokes every standing key of `user` bound to `object` — when the user
127
+ * leaves it — and answers how many; the user's other keys stand. A
128
+ * `TypeError` on a store without the `bound` capability.
129
+ */
130
+ revokeAllBound(user: UserRef, object: ApiKeyBound): Promise<number>;
131
+ /**
132
+ * The standing keys that lapse within `within` (a duration, `'7d'`) and
133
+ * whose notice is not recorded yet, oldest first: what a daily sweep
134
+ * warns about. A `TypeError` for a `within` that is no positive
135
+ * duration, and on a store without the `expiryNotice` capability.
136
+ */
137
+ expiring(options: {
138
+ readonly within: Duration;
139
+ } & ApiKeyPage): Promise<CursorPage<ApiKey>>;
140
+ /**
141
+ * Records that the key's expiry notice is sent, so the next sweep leaves
142
+ * it out. `true` when this call recorded it, `false` when it was already
143
+ * — of concurrent sweeps, exactly one wins, so it can be claimed before
144
+ * the notice is sent. `NOT_FOUND` for no such key. A `TypeError` on a
145
+ * store without the `expiryNotice` capability.
146
+ */
147
+ markExpiryNotified(id: string): Promise<boolean>;
148
+ /**
149
+ * Revokes one key; revoking a revoked key is not an error. `NOT_FOUND`
150
+ * for no such key.
151
+ *
152
+ * **Pass `owner` whenever the id came from a request**: a key of
153
+ * another user is then `NOT_FOUND`, as an unknown one. Without it any
154
+ * key may be revoked — the administrator's path, never to be called with
155
+ * an id read from a request.
156
+ */
157
+ revoke(id: string, options?: {
158
+ readonly owner?: UserRef;
159
+ }): Promise<void>;
160
+ /** Revokes every standing key of a user and answers how many. */
161
+ revokeAll(user: UserRef): Promise<number>;
162
+ };
163
+ }
164
+ //# sourceMappingURL=api-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../../src/auth/types/api-keys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EA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AAC,OAAO,CAAC,CAAC;QAEjD;;;;;;;;WAQG;QACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;YAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;SAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAE1E,iEAAiE;QACjE,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;KAC1C,CAAC;CACF"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The avatar of a user: the id of the image the application stored for them,
3
+ * set and removed by every user type, and at the root of an instance with
4
+ * several.
5
+ *
6
+ * Part of what `janus()` hands back; `./index` gathers it.
7
+ */
8
+ import type { UserRef, WriteOptions } from './user';
9
+ /**
10
+ * What every user type answers for the avatar of its users. **Janus stores
11
+ * only the id the application chose** — an opaque string, never parsed — and
12
+ * never the image: storing, processing, serving and deleting the bytes is the
13
+ * application's. Read it back as `user.avatar` ({@link UserAvatar} or `null`).
14
+ *
15
+ * An instance with several user types answers the same `avatar` at its root,
16
+ * for the page that holds a user's id and does not know their type: it reads
17
+ * the user to find the type, then does what that type's `avatar` does, and
18
+ * the answer's `type` says which it was. `NOT_FOUND` for a user of no type.
19
+ *
20
+ * These are server-side methods, like `update`: **no access check, no
21
+ * freshness check**. Whether a request may change this user's avatar, and who
22
+ * may see it, is for the application to decide before it calls them.
23
+ *
24
+ * ```ts
25
+ * const id = crypto.randomUUID(); // a fresh id for every upload
26
+ * await store.replace({ imageId: id }, bytes); // the bytes first …
27
+ * await auth.avatar.set(userId, { id }); // … then the record
28
+ * // with several user types: auth.patient.avatar.set(userId, { id })
29
+ * ```
30
+ */
31
+ export interface AvatarApi<U> {
32
+ readonly avatar: {
33
+ /**
34
+ * Points the user at the image stored under `avatar.id`, and answers the
35
+ * written user. `updatedAt` of the avatar is now.
36
+ *
37
+ * **Write the image to your storage first, then call this.** If this
38
+ * fails, the image is an orphan nobody points at; the other order could
39
+ * leave a record pointing at bytes that were never written.
40
+ *
41
+ * **Use a fresh id for every upload**, such as `crypto.randomUUID()`.
42
+ * Reusing the id of the current image lets a storage `replace` overwrite
43
+ * the image the user is showing, and the later removal of the former
44
+ * image — the same id — delete the new one. The id doubles as the
45
+ * cache-buster: a new image has a new id.
46
+ *
47
+ * Setting the id the user already has writes nothing and emits nothing.
48
+ * Otherwise `user.avatarChanged` is emitted with `formerAvatarId` — the
49
+ * id replaced, `null` for a first avatar — which is how the application
50
+ * deletes the former image.
51
+ *
52
+ * `AVATAR_ID_INVALID` when `id` is not a non-empty string of at most 512
53
+ * characters that every store can keep, before anything is read.
54
+ * `NOT_FOUND` for an unknown user. `VERSION_CONFLICT` when `ifVersion` is
55
+ * stale, and also when another write landed between this call's read and
56
+ * its write, with or without an `ifVersion`: **delete the image you just
57
+ * uploaded on any failure**, since nothing points at it.
58
+ */
59
+ set(user: UserRef, avatar: {
60
+ readonly id: string;
61
+ }, options?: WriteOptions): Promise<U>;
62
+ /**
63
+ * Clears the user's avatar, and answers the written user. A user with no
64
+ * avatar writes nothing and emits nothing. Otherwise `user.avatarRemoved`
65
+ * is emitted with `formerAvatarId`, the id it had: delete that image
66
+ * from your storage. `NOT_FOUND` for an unknown user; `VERSION_CONFLICT`
67
+ * when `ifVersion` is stale or another write landed in between.
68
+ */
69
+ remove(user: UserRef, options?: WriteOptions): Promise<U>;
70
+ };
71
+ }
72
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/auth/types/avatar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE;QAChB;;;;;;;;;;;;;;;;;;;;;;;;;WAyBG;QACH,GAAG,CACF,IAAI,EAAE,OAAO,EACb,MAAM,EAAE;YAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;SAAE,EAC/B,OAAO,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,CAAC,CAAC,CAAC;QACd;;;;;;WAMG;QACH,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;KAC1D,CAAC;CACF"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * What a user type with an e-mail answers besides: moving the user to a new
3
+ * address, by a link sent to it.
4
+ *
5
+ * Part of what `janus()` hands back; `./index` gathers it.
6
+ */
7
+ import type { IssuedToken } from './email-flows';
8
+ import type { UserRef } from './user';
9
+ /**
10
+ * Changing a user's e-mail, proved: a link is sent to the **new** address,
11
+ * and following it moves the user there.
12
+ */
13
+ export interface ChangeEmailApi<U> {
14
+ readonly changeEmail: {
15
+ /**
16
+ * Issues a link's token for the new address `email`. `email` is the
17
+ * `email` field's value, validated by the type's schema as `update`
18
+ * would — a malformed one is `USER_INVALID` — and the answer's `email`
19
+ * is the address to send the link to. Nothing changes until `confirm`.
20
+ *
21
+ * **Gate it**: behind a fresh sign-in (`assertFresh`) or a step-up, since
22
+ * whoever changes the e-mail takes over password resets. Put `token` in
23
+ * a link to a page of yours, and **only in the e-mail** to the new
24
+ * address. Tell the former address from `user.emailChanged`.
25
+ *
26
+ * Whether somebody already holds the new address is **not** checked here
27
+ * — it would tell who has an account; `confirm` refuses `LOGIN_TAKEN`.
28
+ * The user's earlier links are spent: only the last one sent works.
29
+ * **Throttled** per user and per new address (`janus({ mail: { throttle } })`):
30
+ * `MAIL_THROTTLED` with `retryAfter`, and no token. An unknown user is
31
+ * `NOT_FOUND`, an inactive one `USER_INACTIVE`.
32
+ */
33
+ send(user: UserRef, email: string): Promise<IssuedToken>;
34
+ /**
35
+ * Spends the link's token, moves the user to the address it was sent to
36
+ * and marks it verified — the link reached its inbox. Password, second
37
+ * factor and sessions are untouched. Emits `user.emailChanged` (with
38
+ * `formerEmail`) and `user.emailVerified`.
39
+ *
40
+ * **Call it from a `POST`**, never from the `GET` of the link. An
41
+ * unknown, spent or lapsed token is `TOKEN_UNKNOWN`, `TOKEN_SPENT` or
42
+ * `TOKEN_EXPIRED`; a user whose e-mail is no longer the one the link
43
+ * was asked from is `TOKEN_STALE`; an address another user of the type
44
+ * holds is `LOGIN_TAKEN` — the token already spent; an inactive user
45
+ * is `USER_INACTIVE`. A user written in between is `VERSION_CONFLICT`,
46
+ * also after the token is spent.
47
+ *
48
+ * **With several user types**, a token issued to a user of another type
49
+ * is `TOKEN_UNKNOWN` here, and it is spent. A page that does not know
50
+ * the type — an anonymous confirmation page — calls the root's
51
+ * `janus.changeEmail.confirm` instead.
52
+ */
53
+ confirm(token: string): Promise<U>;
54
+ };
55
+ }
56
+ /**
57
+ * What an instance with several user types answers at its root when at least
58
+ * one has an e-mail: the confirmation of a change, whatever the user's type.
59
+ */
60
+ export interface AnyTypeChangeEmailApi<U> {
61
+ readonly changeEmail: {
62
+ /**
63
+ * Confirms a change of e-mail for a page that does not know the user's
64
+ * type: spends the link's token, reads the user it was issued to,
65
+ * whatever their type, and then does what that type's `confirm` does —
66
+ * the same move, events and refusals. The answer's `type` says which
67
+ * type it was.
68
+ *
69
+ * **Call it from a `POST`**, never from the `GET` of the link. An
70
+ * unknown, spent or lapsed token is `TOKEN_UNKNOWN`, `TOKEN_SPENT` or
71
+ * `TOKEN_EXPIRED`; a user gone since, or of a type with no e-mail, is
72
+ * `TOKEN_UNKNOWN`; a user whose e-mail is no longer the one the link
73
+ * was asked from is `TOKEN_STALE`; an address another user of the type
74
+ * holds is `LOGIN_TAKEN` — the token already spent; an inactive user
75
+ * is `USER_INACTIVE`. A user written in between is `VERSION_CONFLICT`.
76
+ *
77
+ * `send` stays on each type: `janus.admin.changeEmail.send(...)`.
78
+ */
79
+ confirm(token: string): Promise<U>;
80
+ };
81
+ }
82
+ //# sourceMappingURL=change-email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-email.d.ts","sourceRoot":"","sources":["../../../src/auth/types/change-email.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE;QACrB;;;;;;;;;;;;;;;;;WAiBG;QACH,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QACzD;;;;;;;;;;;;;;;;;;WAkBG;QACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;KACnC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE;QACrB;;;;;;;;;;;;;;;;WAgBG;QACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;KACnC,CAAC;CACF"}
@@ -0,0 +1,147 @@
1
+ /**
2
+ * The checks, as types: what `janus` intersects into its parameter so a wrong
3
+ * configuration is refused on the offending key.
4
+ *
5
+ * Part of what `janus()` takes; `./index` gathers it.
6
+ */
7
+ import type { MultiTypeConfig, RESERVED_FIELDS, RESERVED_TYPES, UserSchema } from '../config';
8
+ import type { InputOf, LoginOf, OutputOf, RequiredStringKeys } from './inference';
9
+ import type { InvitedNames } from './invitations-of';
10
+ /**
11
+ * Makes a value that names no key of `Keys` unassignable, and says why on that
12
+ * key.
13
+ *
14
+ * The reason is the **key** of an object type, and the valid names its value.
15
+ * A string-literal message would not survive: `'emial' & 'message'` reduces to
16
+ * `never`, which collapses the whole object and loses the sentence — measured
17
+ * while writing `from` in the first surface. A string intersected with an
18
+ * object does not reduce, so the compiler prints both.
19
+ */
20
+ type CheckName<V, Keys extends string, What extends string> = [V] extends [Keys] ? unknown : {
21
+ readonly [K in `"${V & string}" is not ${What}; name one of`]: Keys;
22
+ };
23
+ type Reserved<S> = Extract<keyof OutputOf<S>, (typeof RESERVED_FIELDS)[number]>;
24
+ /** The e-mail field of a type being checked: the one `email` names, or `'email'` when the schema has it. */
25
+ type EmailKeyOf<Def, SchemaKey extends string> = Def extends {
26
+ readonly email: infer E extends string;
27
+ } ? E : 'email' extends RequiredStringKeys<OutputOf<SchemaOf<Def, SchemaKey>>> ? 'email' : never;
28
+ /** A type's `social` block: it needs an e-mail, and a `signUp` needs the e-mail to be the login and to answer the type's fields. */
29
+ type CheckSocial<Def, SchemaKey extends string> = Def extends {
30
+ readonly social: infer S;
31
+ } ? ([EmailKeyOf<Def, SchemaKey>] extends [never] ? {
32
+ readonly social: {
33
+ readonly [M in 'social needs an e-mail: the schema has no required string "email" field and no `email` names one']: never;
34
+ };
35
+ } : unknown) & (S extends {
36
+ readonly signUp: (...args: never[]) => infer R;
37
+ } ? CheckSignUp<Def, SchemaKey, R> : unknown) : unknown;
38
+ /** `social.signUp`: only where the login is the e-mail, answering the type's fields. */
39
+ type CheckSignUp<Def, SchemaKey extends string, R> = ([LoginOf<Def>] extends [
40
+ never
41
+ ] ? unknown : [LoginOf<Def>] extends [EmailKeyOf<Def, SchemaKey>] ? unknown : {
42
+ readonly social: {
43
+ readonly signUp: {
44
+ readonly [M in 'social.signUp needs a type whose login is its e-mail: password.login names another field']: never;
45
+ };
46
+ };
47
+ }) & ([Awaited<R>] extends [InputOf<SchemaOf<Def, SchemaKey>>] ? unknown : {
48
+ readonly social: {
49
+ readonly signUp: {
50
+ readonly [M in "social.signUp must answer the type's fields, as its schema reads them"]: never;
51
+ };
52
+ };
53
+ });
54
+ /** The checks on one user type: its login, its e-mail, its field names and its social block. */
55
+ type CheckType<Def, SchemaKey extends string> = CheckSocial<Def, SchemaKey> & (Def extends {
56
+ readonly password: {
57
+ readonly login: infer L;
58
+ };
59
+ } ? {
60
+ readonly password: {
61
+ readonly login: CheckName<L, RequiredStringKeys<OutputOf<SchemaOf<Def, SchemaKey>>>, 'a required string field'>;
62
+ };
63
+ } : unknown) & (Def extends {
64
+ readonly password: {
65
+ readonly requireVerifiedEmail: true;
66
+ };
67
+ } ? [EmailKeyOf<Def, SchemaKey>] extends [never] ? {
68
+ readonly password: {
69
+ readonly requireVerifiedEmail: {
70
+ readonly [M in 'requireVerifiedEmail needs an e-mail: the schema has no required string "email" field and no `email` names one']: never;
71
+ };
72
+ };
73
+ } : unknown : unknown) & (Def extends {
74
+ readonly email: infer E;
75
+ } ? {
76
+ readonly email: CheckName<E, RequiredStringKeys<OutputOf<SchemaOf<Def, SchemaKey>>>, 'a required string field'>;
77
+ } : unknown) & ([Reserved<SchemaOf<Def, SchemaKey>>] extends [never] ? unknown : {
78
+ readonly [K in SchemaKey]: {
79
+ readonly [M in `"${Reserved<SchemaOf<Def, SchemaKey>> & string}" is a field janus sets itself; rename it`]: never;
80
+ };
81
+ });
82
+ type SchemaOf<Def, SchemaKey extends string> = Def extends {
83
+ readonly [K in SchemaKey]: infer S extends UserSchema;
84
+ } ? S : never;
85
+ /** `passkeys` needs `secondFactor` (a passkey is only registered beside an active TOTP), unless `firstFactor: true`. */
86
+ type CheckPasskeysSecondFactor<C> = 'secondFactor' extends keyof C ? unknown : C extends {
87
+ readonly passkeys: {
88
+ readonly firstFactor: true;
89
+ };
90
+ } ? unknown : {
91
+ readonly passkeys: {
92
+ readonly [M in 'passkeys needs secondFactor: a passkey is only registered beside an active TOTP']: never;
93
+ };
94
+ };
95
+ /** `passkeys` needs a store with a `passkeys` slot: the type of `store` must name it. */
96
+ type CheckPasskeysSlot<C> = C extends {
97
+ readonly store: infer S;
98
+ } ? 'passkeys' extends keyof S ? unknown : {
99
+ readonly passkeys: {
100
+ readonly [M in 'passkeys needs store.passkeys: the store given has no passkeys slot']: never;
101
+ };
102
+ } : unknown;
103
+ /** The checks on `passkeys`, when the configuration has the block. */
104
+ type CheckPasskeys<C> = C extends {
105
+ readonly passkeys: unknown;
106
+ } ? CheckPasskeysSecondFactor<C> & CheckPasskeysSlot<C> : unknown;
107
+ /** The refusal `invitations` carries, on its own key, with the reason as the key of an object type. */
108
+ type Refuse<Reason extends string> = {
109
+ readonly invitations: {
110
+ readonly [M in Reason]: never;
111
+ };
112
+ };
113
+ /** Why a user type cannot accept an invitation, or `never`: it needs an e-mail, and a password only if its login is that e-mail. */
114
+ type InvitedProblem<Def, SchemaKey extends string> = [LoginOf<Def>] extends [
115
+ never
116
+ ] ? [EmailKeyOf<Def, SchemaKey>] extends [never] ? 'invitations need a user type with an e-mail: the invitation is for an address' : never : [LoginOf<Def>] extends [EmailKeyOf<Def, SchemaKey>] ? never : 'invitations need a user type with no password, or whose password login is its e-mail: password.login names another field';
117
+ /** Whether a listed tuple names a type twice. */
118
+ type HasDuplicate<L> = L extends readonly [infer H, ...infer R] ? H extends R[number] ? true : HasDuplicate<R> : false;
119
+ /** The refusals about the shape of the list itself: empty, or a repeated name. */
120
+ type ListShape<T> = [T] extends [readonly []] ? 'invitations.type must list at least one user type' : HasDuplicate<T> extends true ? 'invitations.type lists a user type twice' : never;
121
+ /** Why each listed name is refused, as a union of reasons: `never` when every one can accept. */
122
+ type ListedProblems<Users, Names extends string> = Names extends keyof Users ? InvitedProblem<Users[Names], 'schema'> : 'invitations.type: not a user type of this instance';
123
+ /** The checks on `invitations`, when the configuration has the block: the user types it makes. */
124
+ type CheckInvitations<C> = C extends {
125
+ readonly invitations: infer I;
126
+ } ? C extends MultiTypeConfig ? [I] extends [
127
+ {
128
+ readonly type: infer T extends string | readonly string[];
129
+ }
130
+ ] ? Refuse<ListShape<T> | ListedProblems<C['users'], InvitedNames<T>>> : Refuse<'invitations.type must name the user type an invitation makes: this instance has several'> : Refuse<InvitedProblem<C, 'user'>> : unknown;
131
+ /**
132
+ * The compile-time checks `janus` intersects into its parameter.
133
+ *
134
+ * `janus` infers its argument, so an excess-property check never fires;
135
+ * intersecting `C & Checked<C>` makes a wrong value unassignable **on the
136
+ * offending key**, with the reason as the type the compiler prints. The pattern
137
+ * is measured in `nxgt-data/packages/mongo-kit/src/config/types.ts`.
138
+ */
139
+ export type Checked<C> = CheckPasskeys<C> & CheckInvitations<C> & (C extends MultiTypeConfig ? {
140
+ readonly users: {
141
+ readonly [K in keyof C['users']]: K extends (typeof RESERVED_TYPES)[number] ? {
142
+ readonly [M in `"${K & string}" cannot name a user type: janus() answers a method of that name`]: never;
143
+ } : CheckType<C['users'][K], 'schema'>;
144
+ };
145
+ } : CheckType<C, 'user'>);
146
+ export {};
147
+ //# sourceMappingURL=checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../../src/auth/types/checks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,cAAc,EACd,UAAU,EACV,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACX,OAAO,EACP,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;GASG;AACH,KAAK,SAAS,CAAC,CAAC,EAAE,IAAI,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAC7E,OAAO,GACP;IACA,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,GAAG,MAAM,YAAY,IAAI,eAAe,GAAG,IAAI;CACnE,CAAC;AAEJ,KAAK,QAAQ,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEhF,4GAA4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
+ * What a user type with an e-mail answers besides: a sign-in code, a
3
+ * verification link and, with a password, a reset link.
4
+ *
5
+ * Part of what `janus()` hands back; `./index` gathers it.
6
+ */
7
+ import type { PreparedCode, PreparedRequest } from './prepared';
8
+ import type { SignedIn, SignInOptions } from './sign-in';
9
+ /** A one-time token, given to the application once, to send by e-mail. */
10
+ export interface IssuedToken {
11
+ readonly token: string;
12
+ /** The address to send it to. */
13
+ readonly email: string;
14
+ readonly expiresAt: Date;
15
+ }
16
+ /** An e-mailed sign-in code: send `code`, keep `challenge` for the confirmation. */
17
+ export interface IssuedCode<U> {
18
+ /** Six digits, for the visitor to type. Put it in the e-mail, and nowhere else. */
19
+ readonly code: string;
20
+ /**
21
+ * The secret the code is checked against. **Keep it with the visitor** —
22
+ * a short-lived cookie, or the code form's body — never in the e-mail,
23
+ * a URL or a log.
24
+ */
25
+ readonly challenge: string;
26
+ /** The address to send the code to. */
27
+ readonly email: string;
28
+ readonly expiresAt: Date;
29
+ readonly user: U;
30
+ }
31
+ /**
32
+ * What a user type with an e-mail answers besides: signing in with a code
33
+ * sent to it, no password needed.
34
+ *
35
+ * `Answer` is {@link SignInResult} when the type may have a second factor:
36
+ * the code proves the e-mail, and an active factor is still asked for.
37
+ */
38
+ export interface SignInCodeApi<U, Answer = SignedIn<U>> {
39
+ readonly signInCode: {
40
+ /**
41
+ * Issues a code for the user of this type holding this e-mail, or
42
+ * answers `null` when there is none, or they are inactive. **Never tell
43
+ * the visitor which**: answer the same page either way, and in the same
44
+ * time — send the e-mail off the request's path.
45
+ *
46
+ * Every call issues a new challenge with five attempts of its own, and
47
+ * spends the earlier ones: only the last code sent works, and a new
48
+ * `request` is five guesses more. **Throttled per address**, whether
49
+ * anybody holds it or not: past five requests in 10 minutes
50
+ * (`janus({ mail: { throttle } })`), `MAIL_THROTTLED` with
51
+ * `retryAfter`, and no code. Rate-limit it per client too.
52
+ */
53
+ request(email: string): Promise<IssuedCode<U> | null>;
54
+ /**
55
+ * `request` in two steps, for an application that sends the code off
56
+ * the visitor's request: counts the address — `MAIL_THROTTLED` with
57
+ * `retryAfter` past the limit — looks nobody up, and mints the
58
+ * `challenge` to give the visitor now, whoever holds the address.
59
+ * `send()` on the answer does the rest, once.
60
+ */
61
+ prepare(email: string): Promise<PreparedCode<U>>;
62
+ /**
63
+ * Checks the code against its challenge, marks the e-mail verified —
64
+ * the code reached the inbox — and signs the user in. **An e-mail
65
+ * proved for the first time drops the password, the second factor and the avatar,
66
+ * and signs out every session** before the new one opens, as for a
67
+ * link. An e-mail already verified changes nothing.
68
+ *
69
+ * A challenge takes **five attempts**: a code that does not match is
70
+ * `CODE_INVALID` with `attemptsLeft`, and the fifth spends it. An
71
+ * unknown, spent or lapsed challenge is `TOKEN_UNKNOWN`, `TOKEN_SPENT`
72
+ * or `TOKEN_EXPIRED`; an e-mail the user changed since is `TOKEN_STALE`;
73
+ * an inactive user is `USER_INACTIVE`.
74
+ */
75
+ confirm(challenge: string, code: string, options?: SignInOptions): Promise<Answer>;
76
+ };
77
+ }
78
+ /** What a user type with an e-mail and a password answers besides. */
79
+ export interface ResetPasswordApi<U> {
80
+ readonly resetPassword: {
81
+ /**
82
+ * Issues a reset token for the user of this type holding this e-mail, or
83
+ * answers `null` when there is none. **Never tell the visitor which**:
84
+ * answer the same page either way. The user's earlier reset tokens are
85
+ * spent: only the last one sent works. **Throttled per address**,
86
+ * whether anybody holds it or not: past five requests in 10 minutes
87
+ * (`janus({ mail: { throttle } })`), `MAIL_THROTTLED` with
88
+ * `retryAfter`, and no token.
89
+ */
90
+ request(email: string): Promise<(IssuedToken & {
91
+ readonly user: U;
92
+ }) | null>;
93
+ /**
94
+ * `request` in two steps, for an application that sends the link off
95
+ * the visitor's request: counts the address — `MAIL_THROTTLED` with
96
+ * `retryAfter` past the limit — and looks nobody up. `send()` on the
97
+ * answer does the rest, once.
98
+ */
99
+ prepare(email: string): Promise<PreparedRequest<IssuedToken & {
100
+ readonly user: U;
101
+ }>>;
102
+ /**
103
+ * Redeems the token, sets the password, marks the e-mail verified — the
104
+ * link proved it — and **signs the user out everywhere**. Every other
105
+ * reset token of the user is spent, as by `changePassword` and
106
+ * `setPassword`. Opens no session: call `signIn` next if that is your
107
+ * policy.
108
+ *
109
+ * **With several user types**, a token issued to a user of another type
110
+ * is `TOKEN_UNKNOWN` here, and it is spent. A page that does not know
111
+ * the type — an anonymous reset page — calls the root's
112
+ * `janus.resetPassword.confirm` instead.
113
+ */
114
+ confirm(token: string, password: string): Promise<U>;
115
+ };
116
+ }
117
+ //# sourceMappingURL=email-flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-flows.d.ts","sourceRoot":"","sources":["../../../src/auth/types/email-flows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAgB,MAAM,WAAW,CAAC;AAEvE,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CACzB;AAED,oFAAoF;AACpF,MAAM,WAAW,UAAU,CAAC,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,UAAU,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