@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,31 @@
1
+ /**
2
+ * What a user type with an e-mail answers besides: finding its user by the
3
+ * address, whether the type signs in with a password or not.
4
+ *
5
+ * Part of what `janus()` hands back; `./index` gathers it.
6
+ */
7
+ /**
8
+ * Finding a user by their e-mail — the lookup an invitation needs before
9
+ * `signInProven`, on a type with no password and so no `findByLogin`.
10
+ */
11
+ export interface FindByEmailApi<U> {
12
+ /**
13
+ * The user of this type holding this e-mail, or `null`. The address is
14
+ * normalised as the e-mail flows normalise it — trimmed and lowercased —
15
+ * whatever the type's login, so a type signing in with a username is
16
+ * still found by its e-mail, and a username that only looks like an
17
+ * address is nobody's. An inactive user is answered too, as by `find`.
18
+ *
19
+ * **An account-existence oracle: never expose it to an anonymous
20
+ * client.** It is a server-side read, to call after a proof of your own —
21
+ * an invitation token your server issued. It counts nothing in the mail
22
+ * or the sign-in throttle, issues nothing and writes nothing.
23
+ *
24
+ * A value that is no address — not a string, empty once trimmed, or
25
+ * holding a NUL or a lone surrogate — is nobody's: `null`, without
26
+ * asking the store, as `find` answers a malformed id. Rejects with
27
+ * `STORE_FAILED` only.
28
+ */
29
+ findByEmail(email: string): Promise<U | null>;
30
+ }
31
+ //# sourceMappingURL=find-by-email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-by-email.d.ts","sourceRoot":"","sources":["../../../src/auth/types/find-by-email.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAChC;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC9C"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * What a user type with a login or an e-mail answers besides: finding its
3
+ * user by that key, or creating it when nobody holds it.
4
+ *
5
+ * Part of what `janus()` hands back; `./index` gathers it.
6
+ */
7
+ /**
8
+ * Finding a user by the key an invitation names, or creating them — the
9
+ * accept step of an invitation, without the race between the read and the
10
+ * write.
11
+ */
12
+ export interface FindOrCreateApi<U, In> {
13
+ /**
14
+ * The user of this type holding `key`, or the user `input()` describes,
15
+ * created. Answers `{ user, created }`.
16
+ *
17
+ * The key is looked up as the type's own lookup would: the login, normalised
18
+ * as `findByLogin` normalises it, on a type that signs in with a password;
19
+ * the e-mail, normalised as `findByEmail` normalises it, on a type that does
20
+ * not. A user found, an inactive one included, is answered
21
+ * `{ user, created: false }`: `input` is not called and nothing is written.
22
+ *
23
+ * When nobody holds the key, `input` is called (it may be async) and the
24
+ * user is created exactly as `create` creates one. **What `input` throws
25
+ * propagates and nothing is written** — that is how the caller refuses before
26
+ * any write, such as "a password is required". The input must name the same
27
+ * key: once validated, its login (its e-mail, on a type with no password)
28
+ * must equal the normalised `key`, or the call is refused with
29
+ * `USER_INVALID` before the write.
30
+ *
31
+ * A call that loses a race to another that creates the same user gets the
32
+ * `LOGIN_TAKEN` of the store, reads the key once more and answers the
33
+ * winner `{ user, created: false }`; the `LOGIN_TAKEN` is rethrown only
34
+ * when that read finds nobody — another login of the new user is taken.
35
+ *
36
+ * On a type whose login is a username, an e-mail key finds an existing user
37
+ * (e-mails are stored as logins) but can never create one: the input's
38
+ * username is not the key, so it is `USER_INVALID`.
39
+ *
40
+ * **An account-existence oracle, as `findByEmail` is: never expose it to an
41
+ * anonymous client.** A key that is no storable string is nobody's, and goes
42
+ * through `input` and the creation, which refuses it.
43
+ *
44
+ * Rejects with `USER_INVALID`, `PASSWORD_TOO_SHORT`, `LOGIN_TAKEN`, or
45
+ * `STORE_FAILED`, and with whatever `input` throws. Sends `user.created`
46
+ * only when it created.
47
+ */
48
+ findOrCreate(key: string, input: () => (In & {
49
+ readonly password?: string;
50
+ readonly active?: boolean;
51
+ }) | Promise<In & {
52
+ readonly password?: string;
53
+ readonly active?: boolean;
54
+ }>): Promise<{
55
+ readonly user: U;
56
+ readonly created: boolean;
57
+ }>;
58
+ }
59
+ //# sourceMappingURL=find-or-create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-or-create.d.ts","sourceRoot":"","sources":["../../../src/auth/types/find-or-create.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,EAAE,EAAE;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,YAAY,CACX,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MACJ,CAAC,EAAE,GAAG;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,GAChE,OAAO,CAAC,EAAE,GAAG;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,GACxE,OAAO,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC5D"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * What `janus()` hands back, typed from the configuration it was given.
3
+ *
4
+ * The generic form is gathered here from the files beside this one; the
5
+ * implementation works on a degenericised mirror and casts once, in
6
+ * `auth/janus.ts`. That is `nxgt-data`'s shape, and it
7
+ * keeps each schema's type travelling through every public method without
8
+ * dragging a type parameter through every internal function.
9
+ */
10
+ export type { ApiKey, ApiKeyListOptions, ApiKeyPage, ApiKeysApi, CreateApiKeyInput, CreatedApiKey, } from './api-keys';
11
+ export type { AvatarApi } from './avatar';
12
+ export type { AnyTypeChangeEmailApi, ChangeEmailApi } from './change-email';
13
+ export type { Checked } from './checks';
14
+ export type { IssuedCode, IssuedToken, ResetPasswordApi, SignInCodeApi, } from './email-flows';
15
+ export type { FindByEmailApi } from './find-by-email';
16
+ export type { FindOrCreateApi } from './find-or-create';
17
+ export type { EmailOf, LoginOf, RequiredStringKeys, TypesOf, UserOf, } from './inference';
18
+ export type { AcceptedInvitation, HistoryRecord, HistoryRefusal, ImportHistoryItem, ImportHistoryOptions, ImportHistoryReport, Invitation, InvitationPreview, InvitationsApi, IssuedInvitation, } from './invitations';
19
+ export type { Janus } from './janus';
20
+ export type { MagicLinkApi } from './magic-link';
21
+ export type { Passkey, PasskeyFirstFactorApi, PasskeyRegistrationOptions, PasskeySignInApi, PasskeySignInChallenge, PasskeysApi, } from './passkeys';
22
+ export type { PasswordApi, SignUpPrepareApi } from './password';
23
+ export type { PreparedCode, PreparedRequest, PreparedSignUp, SignUpOutcome, } from './prepared';
24
+ export type { ProvenSignInApi } from './proven-sign-in';
25
+ export type { AnyTypeResetPasswordApi } from './reset-password';
26
+ export type { RecoveredSignIn, RecoveryCodesIssued, SecondFactorApi, SecondFactorEnrolment, SecondFactorResealed, SpentRecoveryCode, } from './second-factor';
27
+ export type { Authenticated, HeaderRecord, KeyAuthenticated, Principal, RequestLike, Session, } from './session';
28
+ export type { SharedApi } from './shared-api';
29
+ export type { SecondFactorMethod, SecondFactorRequired, SignedIn, SignInOptions, SignInResult, } from './sign-in';
30
+ export type { SocialApi, SocialCompleted, SocialLinked, } from './social';
31
+ export type { SocialFlowStart, SocialLink } from './social-flow';
32
+ export type { SocialStepUp, SocialStepUpProof } from './social-step-up';
33
+ export type { StepUpApi, StepUpByApp, StepUpByEmail, StepUpByPasskey, StepUpPasskeyApi, } from './step-up';
34
+ export type { TypeApi } from './type-api';
35
+ export type { User, UserAvatar, UserBase, UserRef, WriteOptions, } from './user';
36
+ export type { UserTypeApi } from './user-type';
37
+ export type { AnyTypeVerifyEmailApi, FirstProof, VerifyEmailApi, VerifyEmailOptions, } from './verify-email';
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EACX,MAAM,EACN,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5E,YAAY,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EACX,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,aAAa,GACb,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,YAAY,EACX,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,OAAO,EACP,MAAM,GACN,MAAM,aAAa,CAAC;AACrB,YAAY,EACX,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY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QAAQ,CAAC;AAChB,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EACX,qBAAqB,EACrB,UAAU,EACV,cAAc,EACd,kBAAkB,GAClB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * From a configuration to its types: its user types, their users, their login
3
+ * and e-mail fields, and what their writes take.
4
+ *
5
+ * The helpers without a doc comment are exported for the sibling files only;
6
+ * `./index` does not re-export them.
7
+ *
8
+ * The types derived from a configuration, in which the rest of the surface is
9
+ * written; `./index` gathers them.
10
+ */
11
+ import type { MultiTypeConfig, SingleTypeConfig } from '../config';
12
+ import type { StandardSchemaV1 } from '../standard-schema';
13
+ import type { User } from './user';
14
+ export type OutputOf<S> = S extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<S> : never;
15
+ export type InputOf<S> = S extends StandardSchemaV1 ? StandardSchemaV1.InferInput<S> : never;
16
+ /** The single-type form, seen as one entry of `users`. */
17
+ export type SingleAsType<C extends SingleTypeConfig> = {
18
+ readonly schema: C['user'];
19
+ readonly password: C['password'];
20
+ readonly email: C['email'];
21
+ readonly social: C['social'];
22
+ };
23
+ /** Every user type a configuration declares, by name. */
24
+ export type TypesOf<C> = C extends MultiTypeConfig ? C['users'] : C extends SingleTypeConfig ? {
25
+ readonly user: SingleAsType<C>;
26
+ } : never;
27
+ /**
28
+ * Every **top-level, required** key of `T` whose value is a string: what a
29
+ * login or an e-mail may name. Required, because a login read from an
30
+ * optional field is a user who may have no way to sign in.
31
+ */
32
+ export type RequiredStringKeys<T> = {
33
+ [K in keyof T & string]-?: object extends Pick<T, K> ? never : T[K] extends string ? K : never;
34
+ }[keyof T & string];
35
+ /** The login field of one user type, or `never` without a password. */
36
+ export type LoginOf<Def> = Def extends {
37
+ readonly password: {
38
+ readonly login: infer L extends string;
39
+ };
40
+ } ? L : never;
41
+ /**
42
+ * The e-mail field of one user type: the one it names, or `'email'` when the
43
+ * schema has a required string `email` — or `never`, and then the e-mail flows
44
+ * do not exist on it.
45
+ */
46
+ export type EmailOf<Def> = Def extends {
47
+ readonly email: infer E extends string;
48
+ } ? E : Def extends {
49
+ readonly schema: infer S;
50
+ } ? 'email' extends RequiredStringKeys<OutputOf<S>> ? 'email' : never : never;
51
+ export type UserOfType<Name extends string, Def> = Def extends {
52
+ readonly schema: infer S;
53
+ } ? User<Name, OutputOf<S>> : never;
54
+ /** Every user of a configuration: a union discriminated by `type`. */
55
+ export type UserOf<C> = {
56
+ [K in keyof TypesOf<C> & string]: UserOfType<K, TypesOf<C>[K]>;
57
+ }[keyof TypesOf<C> & string];
58
+ /** What `create`, `signUp` and `update` take for one user type. */
59
+ export type FieldsInput<Def> = Def extends {
60
+ readonly schema: infer S;
61
+ } ? InputOf<S> : never;
62
+ //# sourceMappingURL=inference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../src/auth/types/inference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,gBAAgB,GACjD,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,GAC/B,KAAK,CAAC;AACT,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,gBAAgB,GAChD,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,GAC9B,KAAK,CAAC;AAET,0DAA0D;AAC1D,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,gBAAgB,IAAI;IACtD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,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CAAC,IAAI,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS;IAC9D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB,GACE,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GACvB,KAAK,CAAC;AAET,sEAAsE;AACtE,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;KACtB,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9D,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;AAE7B,mEAAmE;AACnE,MAAM,MAAM,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACpE,OAAO,CAAC,CAAC,CAAC,GACV,KAAK,CAAC"}
@@ -0,0 +1,203 @@
1
+ /**
2
+ * The `invitations` surface `janus({ invitations })` adds.
3
+ *
4
+ * Part of what `janus()` hands back; `./index` gathers it.
5
+ */
6
+ import type { CursorPage } from '../../../pagination/cursor-page';
7
+ import type { InvitationStatus } from '../../port/types';
8
+ import type { SignInOptions } from '../sign-in';
9
+ import type { UserRef } from '../user';
10
+ import type { HistoryRecord, ImportHistoryOptions, ImportHistoryReport } from './history';
11
+ import type { AcceptedInvitation, Invitation, InvitationPreview, IssuedInvitation } from './invitation';
12
+ import type { IssueType } from './issue-type';
13
+ /**
14
+ * The `invitations` of an instance configured with `janus({ invitations })`.
15
+ * `Type` is the user types `invitations.type` lists, which `issue({ type })`
16
+ * takes by name.
17
+ */
18
+ export interface InvitationsApi<Type extends string = string> {
19
+ readonly invitations: {
20
+ /**
21
+ * Invites `email` into `scope` with `role`, and answers the code once.
22
+ * **Authorising the inviter is the application's**: check they may
23
+ * invite into this scope before calling.
24
+ *
25
+ * One pending invitation per scope and address: **issuing again for an
26
+ * address that has one revokes it** (lapsed or not) and makes a new one,
27
+ * with a new id and code. `INVITATION_INVALID` (400, `field`) for an
28
+ * input that cannot be kept; `INVITATION_LIMIT` (409, `maxActive`) when
29
+ * the scope holds `maxPending` invitations that have not lapsed and none
30
+ * is this address's own. **A refused issue that replaced a pending
31
+ * invitation leaves the old one revoked** (a race over the limit; the
32
+ * limit is otherwise checked before anything is written).
33
+ *
34
+ * **`type`** is the user type the invitee becomes, one of
35
+ * `invitations.type`: checked at compile time (required with several
36
+ * types, optional with one), fixed at issue (`resend` and `revoke` keep
37
+ * it). A wrong one at run time is `INVITATION_INVALID` (`field: 'type'`).
38
+ */
39
+ issue(input: {
40
+ readonly scope: string;
41
+ readonly email: string;
42
+ readonly name: string;
43
+ readonly role: string;
44
+ readonly locale?: string | null;
45
+ /**
46
+ * Who invites: a user or a user id, or `null` when **the system**
47
+ * does (a first administrator created from a script, with no user
48
+ * yet to be the inviter). Required, so a forgotten inviter is a
49
+ * type error and an `INVITATION_INVALID` (`field: 'invitedBy'`), never
50
+ * a silent system issue. Stored and answered as `invitedBy: null`.
51
+ */
52
+ readonly invitedBy: UserRef | null;
53
+ /**
54
+ * An opaque reference to the application's own record the invitation
55
+ * is for (1 to 100 characters), answered back on the invitation and
56
+ * usable as a `list` and `count` filter. Janus never reads it.
57
+ */
58
+ readonly ref?: string | null;
59
+ } & IssueType<Type>): Promise<IssuedInvitation>;
60
+ /**
61
+ * A new code and a new lifetime for a pending invitation — lapsed or not;
62
+ * the old code stops working. `NOT_FOUND` for no such invitation **in
63
+ * this scope** (an id of another scope is as unknown),
64
+ * `INVITATION_NOT_PENDING` (409) when it is accepted or revoked.
65
+ */
66
+ resend(input: {
67
+ readonly id: string;
68
+ readonly scope: string;
69
+ /**
70
+ * The user id of whoever resends, kept as `resentBy` and carried by
71
+ * the `invitation.resent` event. The last resend wins; one that names
72
+ * nobody resets it to `null`.
73
+ */
74
+ readonly by?: string;
75
+ }): Promise<IssuedInvitation>;
76
+ /**
77
+ * Takes a pending invitation back — lapsed or not — and answers it as
78
+ * revoked. `NOT_FOUND` as `resend`, `INVITATION_NOT_PENDING` (409) when
79
+ * it is accepted or already revoked.
80
+ */
81
+ revoke(input: {
82
+ readonly id: string;
83
+ readonly scope: string;
84
+ /** The user id of whoever revokes, kept as `revokedBy` and carried by the `invitation.revoked` event. */
85
+ readonly by?: string;
86
+ }): Promise<Invitation>;
87
+ /**
88
+ * One scope's invitations, oldest first (`order: 'desc'` for newest
89
+ * first), of one status, role and ref, or all. `page.status` is a
90
+ * status; `lapsed: 'exclude'` leaves lapsed invitations out (pending,
91
+ * `expiresAt` at or before now) and keeps every other record,
92
+ * `'only'` keeps only the lapsed ones, absent keeps all (the cursor is
93
+ * bound to it); `limit` is 20 when absent, at most 100. `after` is the
94
+ * `nextCursor` of the previous page, in the same order.
95
+ */
96
+ list(scope: string, page?: {
97
+ readonly status?: InvitationStatus;
98
+ readonly role?: string;
99
+ readonly ref?: string;
100
+ readonly lapsed?: 'exclude' | 'only';
101
+ readonly order?: 'asc' | 'desc';
102
+ readonly limit?: number;
103
+ readonly after?: string | null;
104
+ }): Promise<CursorPage<Invitation>>;
105
+ /**
106
+ * The invitation `id` names in `scope`, or `null` when there is none
107
+ * there: an unknown or malformed id, or an id of another scope (a
108
+ * request-supplied id must not tell what exists elsewhere). One store
109
+ * read, whatever the scope holds. A store outage throws, it is never
110
+ * `null`. Lapsed pending invitations answer `pending`, as `list` does.
111
+ */
112
+ get(input: {
113
+ readonly id: string;
114
+ readonly scope: string;
115
+ }): Promise<Invitation | null>;
116
+ /**
117
+ * How many invitations of a scope match, with the filters of `list`
118
+ * and none of its paging. `status: 'pending'` is the stored status:
119
+ * a lapsed invitation still counts unless `lapsed` is `'exclude'`
120
+ * (or `'only'` counts nothing else), as in `list`.
121
+ */
122
+ count(scope: string, filter?: {
123
+ readonly status?: InvitationStatus;
124
+ readonly role?: string;
125
+ readonly ref?: string;
126
+ readonly lapsed?: 'exclude' | 'only';
127
+ }): Promise<number>;
128
+ /**
129
+ * The invitation a code names, narrowed to an {@link InvitationPreview}
130
+ * (it is unauthenticated), **without spending it** — for the page
131
+ * the invitee lands on. `INVITATION_INVALID` (400) for any code that
132
+ * names no pending, unlapsed invitation: unknown, malformed, accepted,
133
+ * revoked or lapsed, with nothing to tell them apart. Throttle it:
134
+ * the library does not.
135
+ */
136
+ preview(code: string): Promise<InvitationPreview>;
137
+ /**
138
+ * Copies the invitations of the application's old system into the
139
+ * store, as history: accepted, revoked, or pending and lapsed. **No
140
+ * event, no mail, no code**: an imported record has no code that could
141
+ * ever match (its hash is unusable), so it cannot be previewed or
142
+ * accepted, and only `list`, `get` and `count` see it.
143
+ *
144
+ * **Idempotent by (`scope`, `key`)**: the id is derived from them, so a
145
+ * record already imported is reported `present` and left alone, and a
146
+ * re-run is safe. Run it with `{ dryRun: true }` first. **Concurrent runs
147
+ * of the same records may both report `inserted`**: one write wins, and
148
+ * the other finds it taken. A live pending record is refused
149
+ * (`live-pending`: issue it), and so is a pending one whose scope and
150
+ * address already hold a pending invitation (`pending-held`).
151
+ *
152
+ * A bad record is reported `refused`, never thrown, and the others go
153
+ * on. A `TypeError` for a call that is not an array of at most 1000
154
+ * records, bad options, or an instance with no `invitations`; a store
155
+ * outage throws, with what was written before it kept.
156
+ */
157
+ importHistory(records: readonly HistoryRecord<Type>[], options?: ImportHistoryOptions): Promise<ImportHistoryReport>;
158
+ /**
159
+ * Accepts the invitation a code names, for the person who followed the
160
+ * link: **the code is the proof of their inbox**, so no other proof is
161
+ * asked. Claims the invitation first, under its version — of two
162
+ * concurrent accepts exactly one wins, the other gets
163
+ * `INVITATION_INVALID` — then:
164
+ *
165
+ * - nobody holds the address: the user `invitations.create` describes is
166
+ * created, their e-mail proved and `password` set;
167
+ * - a user holds it with an e-mail never proved: `verifyEmail.proveFirst`
168
+ * runs (**their password, second factor and avatar are dropped, every session
169
+ * revoked**) and `password` is set;
170
+ * - a user holds it with a proved e-mail: nothing of theirs changes, the
171
+ * `password` is ignored and nobody is signed in (`status: 'signIn'`).
172
+ *
173
+ * For a user type **with no password** the same three cases hold with
174
+ * no password to set (and one given is ignored): the new or newly proved
175
+ * user is signed in, a proved one gets `signIn` — they come back with
176
+ * the link or code they already use.
177
+ *
178
+ * Before all of it, `invitations.beforeAccept` — when configured — may
179
+ * refuse: `INVITATION_REFUSED` (403), with nothing written.
180
+ *
181
+ * Then `onAccepted` is called, and a new or newly proved user is signed
182
+ * in as `signInProven` does — `device` as for any sign-in — a session, or
183
+ * a second-factor challenge. **If anything fails before `onAccepted`
184
+ * returns, the claim is released** and the invitation can be accepted
185
+ * again; once it returned, the invitation stays accepted. The password is
186
+ * checked against the type's policy before any user is made
187
+ * (`PASSWORD_TOO_SHORT`). A retry after a failed `onAccepted` finds the user
188
+ * the first try made, already proved, and answers `signIn`.
189
+ *
190
+ * `INVITATION_INVALID` (400) for any code that names no pending,
191
+ * unlapsed invitation, as `preview`; `PASSWORD_REQUIRED` (400) when a
192
+ * password is needed and absent, with nothing written;
193
+ * `PASSWORD_TOO_SHORT` and `USER_INVALID` as `create`; `USER_INACTIVE`
194
+ * for a deactivated user. Throttle it: the library does not.
195
+ */
196
+ accept(input: {
197
+ readonly code: string;
198
+ readonly password?: string;
199
+ readonly device?: SignInOptions['device'];
200
+ }): Promise<AcceptedInvitation>;
201
+ };
202
+ }
203
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/auth/types/invitations/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OA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;;;;;;;;;;;;;;;;WAmBG;QACH,aAAa,CACZ,OAAO,EAAE,SAAS,aAAa,CAAC,IAAI,CAAC,EAAE,EACvC,OAAO,CAAC,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAqCG;QACH,MAAM,CAAC,KAAK,EAAE;YACb,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;YAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;SAC1C,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;KAChC,CAAC;CACF"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Invitation history: the records `invitations.importHistory` takes from the
3
+ * application's old system, and the report it answers.
4
+ *
5
+ * Part of what `janus()` hands back; `./index` gathers it.
6
+ */
7
+ import type { UserRef } from '../user';
8
+ import type { IssueType } from './issue-type';
9
+ /** What every imported record carries, whatever its status. */
10
+ interface HistoryBase {
11
+ /**
12
+ * The application's own id of the invitation (1 to 100 characters),
13
+ * **unique within the scope**. The janus id is derived from it, so
14
+ * importing the same record again finds it.
15
+ */
16
+ readonly key: string;
17
+ readonly scope: string;
18
+ readonly email: string;
19
+ readonly name: string;
20
+ readonly role: string;
21
+ readonly createdAt: Date;
22
+ readonly locale?: string | null;
23
+ readonly ref?: string | null;
24
+ /** A user or a user id, or `null` (the default) for the system. */
25
+ readonly invitedBy?: UserRef | null;
26
+ /** Default `createdAt` plus `invitations.lifetime`. */
27
+ readonly expiresAt?: Date;
28
+ /** Default: the date the status was reached, else `createdAt`. */
29
+ readonly updatedAt?: Date;
30
+ }
31
+ /** A record that was accepted: `acceptedAt` is required. */
32
+ interface HistoryAccepted extends HistoryBase {
33
+ readonly status: 'accepted';
34
+ readonly acceptedAt: Date;
35
+ /** The janus user id of whoever accepted it, or `null` (the default) when no such user exists. */
36
+ readonly acceptedBy?: string | null;
37
+ }
38
+ /** A record that was revoked: `revokedAt` is required. */
39
+ interface HistoryRevoked extends HistoryBase {
40
+ readonly status: 'revoked';
41
+ readonly revokedAt: Date;
42
+ /** The janus user id of whoever revoked it, or `null` (the default). */
43
+ readonly revokedBy?: string | null;
44
+ }
45
+ /** A record that was never answered and whose `expiresAt` has passed. A live one is refused. */
46
+ interface HistoryPending extends HistoryBase {
47
+ readonly status: 'pending';
48
+ }
49
+ /**
50
+ * One invitation of the application's old system, in the shape
51
+ * `invitations.importHistory` takes. `type` is one of `invitations.type`,
52
+ * required with several types, as for `issue`.
53
+ */
54
+ export type HistoryRecord<Type extends string = string> = (HistoryAccepted | HistoryRevoked | HistoryPending) & IssueType<Type>;
55
+ /** The options of `invitations.importHistory`. */
56
+ export interface ImportHistoryOptions {
57
+ /** Check and report, and write nothing. Run it first. Default `false`. */
58
+ readonly dryRun?: boolean;
59
+ }
60
+ /** Why a record was not imported. `invalid` names the `field`. */
61
+ export type HistoryRefusal = 'invalid' | 'unknown-type' | 'live-pending' | 'pending-held' | 'duplicate-key' | 'key-taken';
62
+ /**
63
+ * What became of one record. `inserted` is "would be inserted" in a dry run;
64
+ * `present` is a record that was imported before.
65
+ */
66
+ export type ImportHistoryItem = {
67
+ readonly key: string | null;
68
+ readonly id: string;
69
+ readonly outcome: 'inserted' | 'present';
70
+ } | {
71
+ readonly key: string | null;
72
+ readonly id: string | null;
73
+ readonly outcome: 'refused';
74
+ readonly reason: HistoryRefusal;
75
+ /** The field of a record that is `invalid`. */
76
+ readonly field?: string;
77
+ };
78
+ /** What `invitations.importHistory` answers, with one item per record, in order. */
79
+ export interface ImportHistoryReport {
80
+ readonly dryRun: boolean;
81
+ readonly inserted: number;
82
+ readonly present: number;
83
+ readonly refused: number;
84
+ readonly items: readonly ImportHistoryItem[];
85
+ }
86
+ export {};
87
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,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,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC7C"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Invitations: what application code reads (`invitation.ts`), the `invitations`
3
+ * surface (`api.ts`) and `issue`'s typed `type` (`issue-type.ts`).
4
+ *
5
+ * Gathered here from the files beside this one.
6
+ */
7
+ export type { InvitationsApi } from './api';
8
+ export type { HistoryRecord, HistoryRefusal, ImportHistoryItem, ImportHistoryOptions, ImportHistoryReport, } from './history';
9
+ export type { AcceptedInvitation, Invitation, InvitationPreview, IssuedInvitation, } from './invitation';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/types/invitations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,YAAY,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,WAAW,CAAC;AACnB,YAAY,EACX,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Invitations as application code sees them: the invitation, its preview, what `issue` and `accept` answer.
3
+ *
4
+ * Part of what `janus()` hands back; `./index` gathers it.
5
+ */
6
+ import type { InvitationRecord } from '../../port/types';
7
+ import type { SecondFactorRequired, SignedIn } from '../sign-in';
8
+ import type { User } from '../user';
9
+ /**
10
+ * An invitation, as application code sees it: everything but the hash of its
11
+ * code and its version. **The code is never here**: `issue` and `resend`
12
+ * answer it once.
13
+ *
14
+ * A `pending` invitation whose `expiresAt` has passed is lapsed: it cannot be
15
+ * previewed or accepted, and `resend` gives it a new code.
16
+ */
17
+ export type Invitation = Omit<InvitationRecord, 'codeHash' | 'version' | 'ref' | 'type' | 'revokedBy' | 'resentBy'> & {
18
+ /**
19
+ * The user type the invitation is for: one of `invitations.type`. An
20
+ * invitation stored before the field existed reads as the first type
21
+ * listed. It may name a type that is no longer configured (still listed,
22
+ * no longer previewed or accepted).
23
+ */
24
+ readonly type: string;
25
+ /** The opaque reference `issue` was given (the application's own record), or `null`. */
26
+ readonly ref: string | null;
27
+ /** Who revoked it (the `by` of `revoke`), or `null` when not revoked or no one was named. */
28
+ readonly revokedBy: string | null;
29
+ /** Who sent it again last (the `by` of `resend`), or `null` when never resent or no one was named. */
30
+ readonly resentBy: string | null;
31
+ };
32
+ /**
33
+ * What `preview` answers to whoever holds a code, who may be anybody:
34
+ * the invitation's content, and nothing about who sent it or how it stands.
35
+ */
36
+ export type InvitationPreview = Pick<Invitation, 'id' | 'scope' | 'email' | 'name' | 'role' | 'locale' | 'expiresAt' | 'type'> & {
37
+ /**
38
+ * Whether the page should ask for a password: `false` for a user type with
39
+ * no password, and for somebody who already has an account with a proved
40
+ * e-mail and a password (they sign in with it). `accept` refuses without one only for a new invitee or an e-mail
41
+ * never proved; a proved account with no password may omit it (it is signed
42
+ * in as `signIn`), and gets the one given if there is one.
43
+ */
44
+ readonly needsPassword: boolean;
45
+ };
46
+ /** An invitation just issued or sent again, and the only time its code is available. */
47
+ export interface IssuedInvitation {
48
+ readonly invitation: Invitation;
49
+ /**
50
+ * 32 random bytes, base64url. **Put it in the invitation e-mail's link
51
+ * and keep it nowhere**: only its hash is stored, so a lost code is a
52
+ * `resend`.
53
+ */
54
+ readonly code: string;
55
+ }
56
+ /**
57
+ * What `accept` answers: the invitation, now accepted, and how the invitee
58
+ * stands — switch on `status`:
59
+ *
60
+ * - `signedIn` — a session was opened (a new user, or an account whose
61
+ * e-mail was never proved); put `token` in a cookie;
62
+ * - `secondFactor` — a second factor is still to prove, as for any sign-in;
63
+ * - `signIn` — the address already belongs to a proved user, who is **not**
64
+ * signed in: an invitation proves the inbox, not who holds the account.
65
+ * Send them to the sign-in page, where they use what they already have.
66
+ */
67
+ export type AcceptedInvitation = (SignedIn<User<string, Record<string, unknown>>> & {
68
+ readonly invitation: Invitation;
69
+ }) | (SecondFactorRequired & {
70
+ readonly invitation: Invitation;
71
+ }) | {
72
+ readonly status: 'signIn';
73
+ readonly user: User<string, Record<string, unknown>>;
74
+ readonly invitation: Invitation;
75
+ };
76
+ //# sourceMappingURL=invitation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invitation.d.ts","sourceRoot":"","sources":["../../../../src/auth/types/invitations/invitation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAC5B,gBAAgB,EAChB,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,CAClE,GAAG;IACH;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,6FAA6F;IAC7F,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,sGAAsG;IACtG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACnC,UAAU,EACV,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAC5E,GAAG;IACH;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAC3B,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG;IACnD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CAC/B,CAAC,GACF,CAAC,oBAAoB,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC,GAC5D;IACA,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CAC/B,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `issue`'s `type`, typed as the user types `invitations.type` lists.
3
+ *
4
+ * Part of what `janus()` hands back; `./index` gathers it.
5
+ */
6
+ /** Whether `T` is a union of several members (`never` and `string` are not). */
7
+ type IsUnion<T, U = T> = [T] extends [never] ? false : T extends unknown ? [U] extends [T] ? false : true : never;
8
+ /** `issue`'s `type`: the user types listed, **required** when there are several. */
9
+ export type IssueType<Type extends string> = [IsUnion<Type>] extends [true] ? {
10
+ readonly type: Type;
11
+ } : {
12
+ readonly type?: Type;
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=issue-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-type.d.ts","sourceRoot":"","sources":["../../../../src/auth/types/invitations/issue-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gFAAgF;AAChF,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACzC,KAAK,GACL,CAAC,SAAS,OAAO,GAChB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GACd,KAAK,GACL,IAAI,GACL,KAAK,CAAC;AAEV,oFAAoF;AACpF,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GACxE;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC"}