@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,24 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/ids/id.ts", "../src/auth/port/memory/copy.ts", "../src/auth/port/memory/api-keys/pages.ts", "../src/auth/port/memory/api-keys/capabilities.ts", "../src/auth/port/memory/api-keys/index.ts", "../src/auth/port/memory/invitations-pending.ts", "../src/auth/port/memory/invitations.ts", "../src/auth/port/memory/passkeys.ts", "../src/auth/port/memory/sessions.ts", "../src/auth/port/memory/social-links.ts", "../src/auth/port/memory/tokens.ts", "../src/auth/port/memory/user-index.ts", "../src/auth/port/memory/user-update.ts", "../src/auth/port/memory/users.ts", "../src/auth/port/memory/stores.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * An id — of a user, a session: a UUIDv7, lowercase, hyphenated.\n *\n * **The core mints it, not the store**, and that decision pays for itself three\n * times over:\n *\n * - A UUIDv7 leads with a 48-bit millisecond timestamp, so ids sort in\n * creation order as strings. The pagination cursor is therefore *the last\n * id* — one index on the id, and the ordering is already total. A\n * store-minted id would need a `createdAt` index plus the id as a tiebreak,\n * because a timestamp alone is not a total order, and an opaque cursor per\n * adapter.\n * - `insertUser` becomes **idempotent under retry**: the id is decided\n * before the call, so a retry after a timeout writes the same row rather\n * than a second user.\n * - Every adapter reports the same shape, so moving an application from one\n * adapter to another is a copy rather than a rewrite of every stored\n * reference.\n *\n * The price, stated plainly: an adapter cannot reuse an existing numeric primary\n * key. It gets a `uuid` column, or a 36-character string, and the monotonic\n * prefix gives it the index locality a UUIDv4 destroys.\n */\nexport type Id = string;\n\nconst HEX: readonly string[] = Array.from({ length: 256 }, (_, i) =>\n\ti.toString(16).padStart(2, '0'),\n);\n\nlet lastMs = -1;\nlet sequence = 0;\n\n/**\n * The 12-bit sequence UUIDv7 keeps for ordering inside one millisecond.\n *\n * RFC 9562 calls this the \"replace leftmost random bits with an increased clock\n * precision\" method. Without it, two ids minted in the same millisecond order\n * by their random tail — still a total order, which is all the port requires,\n * but not creation order, and \"newest first\" would then be wrong for anything\n * created in a burst. A signup storm is exactly such a burst.\n */\nconst SEQUENCE_MAX = 0xfff;\n\n/**\n * A fresh id.\n *\n * Strictly increasing: within one millisecond it uses the sequence, and if that\n * overflows — more than 4096 ids in a millisecond, which no real\n * application reaches — it borrows the next millisecond rather than repeating\n * one. Across processes the 62 random bits of the tail are what keep two machines\n * apart.\n */\nexport function mintId(now: number = Date.now()): Id {\n\tlet ms = now;\n\n\tif (ms === lastMs) {\n\t\tsequence += 1;\n\t\tif (sequence > SEQUENCE_MAX) {\n\t\t\t// Borrow from the next millisecond. This keeps ids strictly\n\t\t\t// increasing at the cost of a timestamp a hair ahead of the clock,\n\t\t\t// which is the right trade: a repeated id would break the cursor.\n\t\t\tms = lastMs + 1;\n\t\t\tsequence = 0;\n\t\t}\n\t} else if (ms > lastMs) {\n\t\tsequence = 0;\n\t} else {\n\t\t// The clock went backwards — an NTP step, or a container resumed. Hold\n\t\t// the last millisecond and keep counting, so ids stay ordered even\n\t\t// though they stop matching the wall clock for a moment.\n\t\tms = lastMs;\n\t\tsequence += 1;\n\t\tif (sequence > SEQUENCE_MAX) {\n\t\t\tms = lastMs + 1;\n\t\t\tsequence = 0;\n\t\t}\n\t}\n\n\tlastMs = ms;\n\n\tconst bytes = new Uint8Array(16);\n\tcrypto.getRandomValues(bytes.subarray(8));\n\n\tbytes[0] = (ms / 2 ** 40) & 0xff;\n\tbytes[1] = (ms / 2 ** 32) & 0xff;\n\tbytes[2] = (ms / 2 ** 24) & 0xff;\n\tbytes[3] = (ms / 2 ** 16) & 0xff;\n\tbytes[4] = (ms / 2 ** 8) & 0xff;\n\tbytes[5] = ms & 0xff;\n\t// Version 7 in the high nibble, the sequence's top 4 bits below it.\n\tbytes[6] = 0x70 | ((sequence >> 8) & 0x0f);\n\tbytes[7] = sequence & 0xff;\n\t// Variant 10 in the two high bits of byte 8; the rest of it stays random.\n\tbytes[8] = 0x80 | ((bytes[8] as number) & 0x3f);\n\n\treturn `${HEX[bytes[0] as number]}${HEX[bytes[1] as number]}${HEX[bytes[2] as number]}${HEX[bytes[3] as number]}-${HEX[bytes[4] as number]}${HEX[bytes[5] as number]}-${HEX[bytes[6] as number]}${HEX[bytes[7] as number]}-${HEX[bytes[8] as number]}${HEX[bytes[9] as number]}-${HEX[bytes[10] as number]}${HEX[bytes[11] as number]}${HEX[bytes[12] as number]}${HEX[bytes[13] as number]}${HEX[bytes[14] as number]}${HEX[bytes[15] as number]}`;\n}\n\nconst UUID_V7 =\n\t/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;\n\n/**\n * Whether this string is an id this package could have minted.\n *\n * Used by an adapter to answer `null` for a malformed id **without reaching the\n * store**: an id arrives off a URL, and one of the wrong shape is \"no such\n * user\", not an outage and not a query. Rejecting it here also keeps a\n * hand-written id out of a store that would then hold something the cursor\n * cannot order.\n */\nexport function isId(value: string): boolean {\n\treturn UUID_V7.test(value);\n}\n\n/**\n * When this id was minted, from the id itself.\n *\n * Offered because the timestamp is *in* the id, so a `createdAt` column is a\n * convenience rather than the truth — and an adapter that loses one can still\n * answer. It is not a substitute for `createdAt`: the sequence may have borrowed\n * a millisecond, and a clock that stepped backwards is held rather than\n * followed, so this is accurate to the millisecond and no further.\n */\nexport function mintedAt(id: Id): Date {\n\tconst hex = id.replace(/-/g, '').slice(0, 12);\n\treturn new Date(Number.parseInt(hex, 16));\n}\n",
6
+ "/**\n * A deep copy: every record goes in and comes out through it, so a caller that\n * mutates what it passed or what it got back cannot reach the store.\n */\nexport const copy = <T>(value: T): T => structuredClone(value);\n",
7
+ "import type { CursorPage } from '../../../../pagination/cursor-page';\nimport type {\n\tApiKeyBound,\n\tApiKeyId,\n\tApiKeyPageRequest,\n\tApiKeyRecord,\n} from '../../types';\nimport { copy } from '../copy';\n\nexport function sameBound(\n\tstored: ApiKeyBound | undefined,\n\tbound: ApiKeyBound,\n): boolean {\n\treturn (\n\t\tstored !== undefined && stored.type === bound.type && stored.id === bound.id\n\t);\n}\n\n/** One page of the keys that match, in id order — a Map keeps insertion order, not id order. */\nexport function pageWhere(\n\tbyId: Map<ApiKeyId, ApiKeyRecord>,\n\t{ first, after }: ApiKeyPageRequest,\n\tmatches: (stored: ApiKeyRecord) => boolean,\n): CursorPage<ApiKeyRecord> {\n\tconst ids = [...byId.values()]\n\t\t.filter(matches)\n\t\t.map((key) => key.id)\n\t\t.filter((id) => after === null || id > after)\n\t\t.sort();\n\tconst pageIds = ids.slice(0, first);\n\tconst last = pageIds.at(-1);\n\n\treturn {\n\t\titems: pageIds.map((id) => copy(byId.get(id) as ApiKeyRecord)),\n\t\tnextCursor: ids.length > first && last !== undefined ? last : null,\n\t};\n}\n\nexport function deleteWhere(\n\tbyId: Map<ApiKeyId, ApiKeyRecord>,\n\tmatches: (stored: ApiKeyRecord) => boolean,\n): number {\n\tlet deleted = 0;\n\n\tfor (const [id, stored] of byId) {\n\t\tif (matches(stored)) {\n\t\t\tbyId.delete(id);\n\t\t\tdeleted += 1;\n\t\t}\n\t}\n\n\treturn deleted;\n}\n",
8
+ "import type {\n\tApiKeyBoundMethods,\n\tApiKeyExpiryNoticeMethods,\n\tApiKeyId,\n\tApiKeyRecord,\n\tApiKeyUserBoundMethods,\n} from '../../types';\nimport { pageWhere, sameBound } from './pages';\n\n/** The memory store's `bound` capability, over its map. */\nexport function boundMethods(\n\tbyId: Map<ApiKeyId, ApiKeyRecord>,\n): ApiKeyBoundMethods {\n\treturn {\n\t\tasync listBoundApiKeys(bound, page) {\n\t\t\treturn pageWhere(byId, page, (key) => sameBound(key.bound, bound));\n\t\t},\n\n\t\tasync revokeBoundApiKeys(userId, bound, at) {\n\t\t\tlet revoked = 0;\n\n\t\t\tfor (const [id, stored] of byId) {\n\t\t\t\tif (\n\t\t\t\t\tstored.userId === userId &&\n\t\t\t\t\tstored.revokedAt === null &&\n\t\t\t\t\tsameBound(stored.bound, bound)\n\t\t\t\t) {\n\t\t\t\t\tbyId.set(id, { ...stored, revokedAt: new Date(at) });\n\t\t\t\t\trevoked += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn revoked;\n\t\t},\n\t};\n}\n\n/** The memory store's `userBound` capability, over its map. */\nexport function userBoundMethods(\n\tbyId: Map<ApiKeyId, ApiKeyRecord>,\n): ApiKeyUserBoundMethods {\n\treturn {\n\t\tasync listUserBoundApiKeys(userId, bound, page) {\n\t\t\treturn pageWhere(\n\t\t\t\tbyId,\n\t\t\t\tpage,\n\t\t\t\t(key) =>\n\t\t\t\t\tkey.userId === userId &&\n\t\t\t\t\t(bound === null\n\t\t\t\t\t\t? key.bound === undefined\n\t\t\t\t\t\t: sameBound(key.bound, bound)),\n\t\t\t);\n\t\t},\n\t};\n}\n\n/** The memory store's `expiryNotice` capability, over its map. */\nexport function expiryNoticeMethods(\n\tbyId: Map<ApiKeyId, ApiKeyRecord>,\n): ApiKeyExpiryNoticeMethods {\n\treturn {\n\t\tasync listExpiringApiKeys({ now, before, first, after }) {\n\t\t\treturn pageWhere(\n\t\t\t\tbyId,\n\t\t\t\t{ first, after },\n\t\t\t\t(key) =>\n\t\t\t\t\tkey.revokedAt === null &&\n\t\t\t\t\tkey.expiryNotifiedAt === undefined &&\n\t\t\t\t\tkey.expiresAt.getTime() > now.getTime() &&\n\t\t\t\t\tkey.expiresAt.getTime() <= before.getTime(),\n\t\t\t);\n\t\t},\n\n\t\tasync markApiKeyExpiryNotified(id, at) {\n\t\t\tconst stored = byId.get(id);\n\t\t\tif (stored === undefined || stored.expiryNotifiedAt !== undefined) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tbyId.set(id, { ...stored, expiryNotifiedAt: new Date(at) });\n\t\t\treturn true;\n\t\t},\n\t};\n}\n",
9
+ "import type {\n\tApiKeyBoundMethods,\n\tApiKeyExpiryNoticeMethods,\n\tApiKeyId,\n\tApiKeyRecord,\n\tApiKeyStore,\n\tApiKeyUserBoundMethods,\n} from '../../types';\nimport { copy } from '../copy';\nimport {\n\tboundMethods,\n\texpiryNoticeMethods,\n\tuserBoundMethods,\n} from './capabilities';\nimport { deleteWhere, pageWhere } from './pages';\n\n/**\n * The API key store in memory: the reference implementation of\n * {@link ApiKeyStore}, shipped for a consumer's unit tests and for an adapter\n * author to compare against.\n *\n * Every method is `async` and every record is copied in and out, as the other\n * in-memory stores do. `touchApiKey` reads and writes with no `await` between\n * the two, so concurrent calls on a stale key see exactly one winner. It has\n * every optional capability: `bound`, `userBound` and `expiryNotice`.\n */\nexport function createMemoryApiKeys(): ApiKeyStore &\n\tApiKeyBoundMethods &\n\tApiKeyUserBoundMethods &\n\tApiKeyExpiryNoticeMethods {\n\tconst byId = new Map<ApiKeyId, ApiKeyRecord>();\n\n\treturn {\n\t\tasync insertApiKey(record) {\n\t\t\tif (!byId.has(record.id)) byId.set(record.id, copy(record));\n\t\t},\n\n\t\tasync findApiKey(id) {\n\t\t\tconst stored = byId.get(id);\n\t\t\treturn stored === undefined ? null : copy(stored);\n\t\t},\n\n\t\tasync listUserApiKeys(userId, page) {\n\t\t\treturn pageWhere(byId, page, (key) => key.userId === userId);\n\t\t},\n\n\t\tasync touchApiKey(id, at, staleBefore) {\n\t\t\tconst stored = byId.get(id);\n\t\t\tif (stored === undefined || stored.revokedAt !== null) return false;\n\t\t\tif (\n\t\t\t\tstored.lastUsedAt !== null &&\n\t\t\t\tstored.lastUsedAt.getTime() >= staleBefore.getTime()\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tbyId.set(id, { ...stored, lastUsedAt: new Date(at) });\n\t\t\treturn true;\n\t\t},\n\n\t\tasync revokeApiKey(id, at) {\n\t\t\tconst stored = byId.get(id);\n\t\t\tif (stored === undefined) return false;\n\n\t\t\tif (stored.revokedAt === null) {\n\t\t\t\tbyId.set(id, { ...stored, revokedAt: new Date(at) });\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tasync revokeUserApiKeys(userId, at) {\n\t\t\tlet revoked = 0;\n\n\t\t\tfor (const [id, stored] of byId) {\n\t\t\t\tif (stored.userId === userId && stored.revokedAt === null) {\n\t\t\t\t\tbyId.set(id, { ...stored, revokedAt: new Date(at) });\n\t\t\t\t\trevoked += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn revoked;\n\t\t},\n\n\t\tasync deleteUserApiKeys(userId) {\n\t\t\treturn deleteWhere(byId, (stored) => stored.userId === userId);\n\t\t},\n\n\t\tasync deleteExpiredApiKeys(before) {\n\t\t\treturn deleteWhere(\n\t\t\t\tbyId,\n\t\t\t\t(stored) => stored.expiresAt.getTime() <= before.getTime(),\n\t\t\t);\n\t\t},\n\t\t...boundMethods(byId),\n\t\t...userBoundMethods(byId),\n\t\t...expiryNoticeMethods(byId),\n\t};\n}\n",
10
+ "import type { InvitationId, InvitationRecord } from '../types';\nimport { copy } from './copy';\n\ntype Invitations = Map<InvitationId, InvitationRecord>;\n\nexport function holdsPending(\n\tbyId: Invitations,\n\trecord: InvitationRecord,\n): boolean {\n\tfor (const other of byId.values()) {\n\t\tif (\n\t\t\tother.id !== record.id &&\n\t\t\tother.status === 'pending' &&\n\t\t\tother.scope === record.scope &&\n\t\t\tother.email === record.email\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nexport function findPendingInvitation(\n\tbyId: Invitations,\n\tscope: string,\n\temail: string,\n): InvitationRecord | null {\n\tfor (const stored of byId.values()) {\n\t\tif (\n\t\t\tstored.status === 'pending' &&\n\t\t\tstored.scope === scope &&\n\t\t\tstored.email === email\n\t\t) {\n\t\t\treturn copy(stored);\n\t\t}\n\t}\n\treturn null;\n}\n",
11
+ "import { StoreConflict } from '../../../errors/janus-error';\nimport type {\n\tInvitationFilter,\n\tInvitationId,\n\tInvitationRecord,\n\tInvitationStore,\n} from '../types';\nimport { copy } from './copy';\nimport { findPendingInvitation, holdsPending } from './invitations-pending';\n\n/**\n * The invitation store in memory: the reference implementation of\n * {@link InvitationStore}, shipped for a consumer's unit tests and for an\n * adapter author to compare against.\n *\n * Every method is `async` and every record is copied in and out. A write reads\n * and writes with no `await` between the two, so concurrent claims on one\n * version see exactly one winner.\n */\nexport function createMemoryInvitations(): InvitationStore {\n\tconst byId: Invitations = new Map();\n\n\treturn {\n\t\tinsertInvitation: async (record) => insertInvitation(byId, record),\n\t\tfindInvitation: async (id) => findInvitation(byId, id),\n\t\tfindInvitationByCodeHash: async (codeHash) =>\n\t\t\tfindInvitationByCodeHash(byId, codeHash),\n\t\tlistScopeInvitations: async (scope, query) =>\n\t\t\tlistScopeInvitations(byId, scope, query),\n\t\tfindPendingInvitation: async (scope, email) =>\n\t\t\tfindPendingInvitation(byId, scope, email),\n\t\tcountScopeInvitations: async (scope, filter) =>\n\t\t\tcountScopeInvitations(byId, scope, filter),\n\t\tcountPendingInvitations: async (scope, now) =>\n\t\t\tcountPendingInvitations(byId, scope, now),\n\t\tupdateInvitation: async (id, ifVersion, patch) =>\n\t\t\tupdateInvitation(byId, id, ifVersion, patch),\n\t\tdeleteScopeInvitations: async (scope) =>\n\t\t\tdeleteWhere(byId, (stored) => stored.scope === scope),\n\t\tdeleteExpiredInvitations: async (before) =>\n\t\t\tdeleteWhere(\n\t\t\t\tbyId,\n\t\t\t\t(stored) => stored.expiresAt.getTime() <= before.getTime(),\n\t\t\t),\n\t};\n}\n\ntype Invitations = Map<InvitationId, InvitationRecord>;\n\nfunction insertInvitation(\n\tbyId: Invitations,\n\trecord: InvitationRecord,\n): boolean {\n\tif (byId.has(record.id)) return true;\n\tif (record.status === 'pending' && holdsPending(byId, record)) return false;\n\tbyId.set(record.id, copy(record));\n\treturn true;\n}\n\nfunction findInvitation(\n\tbyId: Invitations,\n\tid: InvitationId,\n): InvitationRecord | null {\n\tconst stored = byId.get(id);\n\treturn stored === undefined ? null : copy(stored);\n}\n\nfunction findInvitationByCodeHash(\n\tbyId: Invitations,\n\tcodeHash: string,\n): InvitationRecord | null {\n\tfor (const stored of byId.values()) {\n\t\tif (stored.codeHash === codeHash) return copy(stored);\n\t}\n\treturn null;\n}\n\nfunction listScopeInvitations(\n\tbyId: Invitations,\n\tscope: string,\n\t{\n\t\tstatus,\n\t\tfirst,\n\t\tafter,\n\t\trole = null,\n\t\tref = null,\n\t\torder = 'asc',\n\t\tlapsed = null,\n\t}: Parameters<InvitationStore['listScopeInvitations']>[1],\n): { items: InvitationRecord[]; nextCursor: string | null } {\n\tconst desc = order === 'desc';\n\t// A Map keeps insertion order, not id order.\n\tconst ids = [...byId.values()]\n\t\t.filter((invitation) =>\n\t\t\tmatches(invitation, scope, { status, role, ref, lapsed }),\n\t\t)\n\t\t.map((invitation) => invitation.id)\n\t\t.filter((id) => after === null || (desc ? id < after : id > after))\n\t\t.sort();\n\tif (desc) ids.reverse();\n\tconst pageIds = ids.slice(0, first);\n\tconst last = pageIds.at(-1);\n\n\treturn {\n\t\titems: pageIds.map((id) => copy(byId.get(id) as InvitationRecord)),\n\t\tnextCursor: ids.length > first && last !== undefined ? last : null,\n\t};\n}\n\nfunction matches(\n\tinvitation: InvitationRecord,\n\tscope: string,\n\tfilter: InvitationFilter,\n): boolean {\n\treturn (\n\t\tinvitation.scope === scope &&\n\t\t(filter.status === null || invitation.status === filter.status) &&\n\t\t(filter.role === null || invitation.role === filter.role) &&\n\t\t(filter.ref === null || (invitation.ref ?? null) === filter.ref) &&\n\t\tkeptByLapsed(invitation, filter.lapsed)\n\t);\n}\n\n/** Lapsed: stored `pending` with `expiresAt` at or before `now`. */\nfunction keptByLapsed(\n\tinvitation: InvitationRecord,\n\tlapsed: InvitationFilter['lapsed'] | null,\n): boolean {\n\tif (lapsed == null) return true;\n\tconst isLapsed =\n\t\tinvitation.status === 'pending' &&\n\t\tinvitation.expiresAt.getTime() <= lapsed.now.getTime();\n\treturn lapsed.mode === 'only' ? isLapsed : !isLapsed;\n}\n\nfunction countScopeInvitations(\n\tbyId: Invitations,\n\tscope: string,\n\tfilter: InvitationFilter,\n): number {\n\tlet count = 0;\n\tfor (const stored of byId.values()) {\n\t\tif (matches(stored, scope, filter)) count += 1;\n\t}\n\treturn count;\n}\n\nfunction countPendingInvitations(\n\tbyId: Invitations,\n\tscope: string,\n\tnow: Date,\n): number {\n\tlet count = 0;\n\tfor (const stored of byId.values()) {\n\t\tif (\n\t\t\tstored.scope === scope &&\n\t\t\tstored.status === 'pending' &&\n\t\t\tstored.expiresAt.getTime() > now.getTime()\n\t\t) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}\n\nfunction updateInvitation(\n\tbyId: Invitations,\n\tid: InvitationId,\n\tifVersion: number,\n\tpatch: Parameters<InvitationStore['updateInvitation']>[2],\n): InvitationRecord | null {\n\tconst stored = byId.get(id);\n\tif (stored === undefined) return null;\n\n\tif (stored.version !== ifVersion) {\n\t\tthrow new StoreConflict(\n\t\t\t'version',\n\t\t\t`updateInvitation: expected version ${ifVersion}, found ${stored.version}`,\n\t\t\t{\n\t\t\t\texpectedVersion: ifVersion,\n\t\t\t\tactualVersion: stored.version,\n\t\t\t\toperation: 'updateInvitation',\n\t\t\t},\n\t\t);\n\t}\n\n\tconst next: InvitationRecord = {\n\t\t...stored,\n\t\t...definedOnly(patch),\n\t\tversion: stored.version + 1,\n\t};\n\tif (next.status === 'pending' && holdsPending(byId, next)) {\n\t\tthrow new StoreConflict(\n\t\t\t'pending',\n\t\t\t'updateInvitation: another pending invitation holds this scope and address',\n\t\t\t{ operation: 'updateInvitation' },\n\t\t);\n\t}\n\n\tbyId.set(id, copy(next));\n\treturn copy(next);\n}\n\n/** A key present with `undefined` is absent, never an erasure. */\nfunction definedOnly<T extends object>(patch: T): Partial<T> {\n\treturn Object.fromEntries(\n\t\tObject.entries(patch).filter(([, value]) => value !== undefined),\n\t) as Partial<T>;\n}\n\nfunction deleteWhere(\n\tbyId: Invitations,\n\tmatches: (stored: InvitationRecord) => boolean,\n): number {\n\tlet deleted = 0;\n\n\tfor (const [id, stored] of byId) {\n\t\tif (matches(stored)) {\n\t\t\tbyId.delete(id);\n\t\t\tdeleted += 1;\n\t\t}\n\t}\n\n\treturn deleted;\n}\n",
12
+ "import type { PasskeyRecord, PasskeyStore } from '../types';\nimport { copy } from './copy';\n\n/**\n * The passkey store in memory, by `credentialId`: bytes compared as they are.\n *\n * Each method checks and writes with no `await` between the two, which on one\n * event loop is what an atomic insert-if-absent or conditional write is.\n */\nexport function memoryPasskeyStore(): PasskeyStore {\n\tconst byCredential = new Map<string, PasskeyRecord>();\n\n\treturn {\n\t\tasync insertPasskey(record) {\n\t\t\tconst held = byCredential.get(record.credentialId);\n\t\t\tif (held !== undefined) return copy(held);\n\n\t\t\tbyCredential.set(record.credentialId, copy(record));\n\t\t\treturn copy(record);\n\t\t},\n\n\t\tasync findPasskey(credentialId) {\n\t\t\tconst stored = byCredential.get(credentialId);\n\t\t\treturn stored === undefined ? null : copy(stored);\n\t\t},\n\n\t\tasync listUserPasskeys(userId) {\n\t\t\treturn [...byCredential.values()]\n\t\t\t\t.filter((passkey) => passkey.userId === userId)\n\t\t\t\t.map(copy);\n\t\t},\n\n\t\tasync recordPasskeyUse(userId, credentialId, use, ifCounter) {\n\t\t\tconst stored = byCredential.get(credentialId);\n\t\t\tif (stored?.userId !== userId || stored.counter !== ifCounter) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst updated: PasskeyRecord = {\n\t\t\t\t...stored,\n\t\t\t\tcounter: use.counter,\n\t\t\t\tbackedUp: use.backedUp,\n\t\t\t\tlastUsedAt: new Date(use.lastUsedAt),\n\t\t\t};\n\t\t\tbyCredential.set(credentialId, updated);\n\t\t\treturn copy(updated);\n\t\t},\n\n\t\tasync renamePasskey(userId, credentialId, name) {\n\t\t\tconst stored = byCredential.get(credentialId);\n\t\t\tif (stored?.userId !== userId) return false;\n\n\t\t\tbyCredential.set(credentialId, { ...stored, name });\n\t\t\treturn true;\n\t\t},\n\n\t\tasync deletePasskey(userId, credentialId) {\n\t\t\tif (byCredential.get(credentialId)?.userId !== userId) return false;\n\n\t\t\tbyCredential.delete(credentialId);\n\t\t\treturn true;\n\t\t},\n\n\t\tasync deleteUserPasskeys(userId) {\n\t\t\tlet deleted = 0;\n\n\t\t\tfor (const [key, stored] of byCredential) {\n\t\t\t\tif (stored.userId === userId) {\n\t\t\t\t\tbyCredential.delete(key);\n\t\t\t\t\tdeleted += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn deleted;\n\t\t},\n\t};\n}\n",
13
+ "import type { SessionId, SessionRecord, SessionStore } from '../types';\nimport { copy } from './copy';\n\n/** What the in-memory session store holds: the records, and the index on their token hashes. */\ninterface SessionIndex {\n\treadonly byId: Map<SessionId, SessionRecord>;\n\treadonly byTokenHash: Map<string, SessionId>;\n}\n\n/** The session store in memory. */\nexport function memorySessionStore(): SessionStore {\n\tconst index: SessionIndex = {\n\t\tbyId: new Map<SessionId, SessionRecord>(),\n\t\tbyTokenHash: new Map<string, SessionId>(),\n\t};\n\tconst { byId, byTokenHash } = index;\n\n\treturn {\n\t\tasync insertSession(record) {\n\t\t\tif (byId.has(record.id)) return;\n\n\t\t\tconst written = copy(record);\n\t\t\tbyId.set(written.id, written);\n\t\t\tbyTokenHash.set(written.tokenHash, written.id);\n\t\t},\n\n\t\tasync findSessionByTokenHash(tokenHash) {\n\t\t\tconst id = byTokenHash.get(tokenHash);\n\t\t\tconst stored = id === undefined ? undefined : byId.get(id);\n\t\t\treturn stored === undefined ? null : copy(stored);\n\t\t},\n\n\t\tasync extendSession(id, expiresAt, lastUsedAt) {\n\t\t\treturn standingWrite(index, id, {\n\t\t\t\texpiresAt: new Date(expiresAt),\n\t\t\t\t...(lastUsedAt === undefined\n\t\t\t\t\t? {}\n\t\t\t\t\t: { lastUsedAt: new Date(lastUsedAt) }),\n\t\t\t});\n\t\t},\n\n\t\tasync reauthenticateSession(id, at, amr) {\n\t\t\treturn standingWrite(index, id, {\n\t\t\t\tauthenticatedAt: new Date(at),\n\t\t\t\t...(amr === undefined ? {} : { amr: [...amr] }),\n\t\t\t});\n\t\t},\n\n\t\tasync revokeSession(id, at) {\n\t\t\tconst stored = byId.get(id);\n\t\t\tif (stored === undefined) return false;\n\n\t\t\tif (stored.revokedAt === null) revoke(index, id, stored, at);\n\t\t\treturn true;\n\t\t},\n\n\t\tasync listUserSessions(userId, now) {\n\t\t\tconst listed: SessionRecord[] = [];\n\t\t\tfor (const stored of byId.values()) {\n\t\t\t\tif (\n\t\t\t\t\tstored.userId === userId &&\n\t\t\t\t\tstored.revokedAt === null &&\n\t\t\t\t\tstored.expiresAt.getTime() > now.getTime()\n\t\t\t\t) {\n\t\t\t\t\tlisted.push(copy(stored));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn listed;\n\t\t},\n\n\t\tasync revokeUserSessions(userId, at, except, issuedBefore) {\n\t\t\tlet revoked = 0;\n\n\t\t\tfor (const [id, stored] of byId) {\n\t\t\t\tif (\n\t\t\t\t\tstored.userId === userId &&\n\t\t\t\t\tstored.revokedAt === null &&\n\t\t\t\t\tid !== except &&\n\t\t\t\t\t(issuedBefore === undefined ||\n\t\t\t\t\t\tstored.createdAt.getTime() < issuedBefore.getTime())\n\t\t\t\t) {\n\t\t\t\t\trevoke(index, id, stored, at);\n\t\t\t\t\trevoked += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn revoked;\n\t\t},\n\n\t\tasync deleteUserSessions(userId) {\n\t\t\treturn deleteWhere(index, (stored) => stored.userId === userId);\n\t\t},\n\n\t\tasync deleteExpiredSessions(before) {\n\t\t\treturn deleteWhere(\n\t\t\t\tindex,\n\t\t\t\t(stored) => stored.expiresAt.getTime() <= before.getTime(),\n\t\t\t);\n\t\t},\n\t};\n}\n\n/**\n * Writes `patch` on a session **only while it is not revoked**, and answers\n * it as written — or `null` for none, or a revoked one, never brought back.\n */\nfunction standingWrite(\n\t{ byId }: SessionIndex,\n\tid: SessionId,\n\tpatch: Pick<\n\t\tPartial<SessionRecord>,\n\t\t'expiresAt' | 'authenticatedAt' | 'lastUsedAt' | 'amr'\n\t>,\n): SessionRecord | null {\n\tconst stored = byId.get(id);\n\tif (stored === undefined || stored.revokedAt !== null) return null;\n\n\tconst written: SessionRecord = { ...stored, ...patch };\n\tbyId.set(id, written);\n\treturn copy(written);\n}\n\nfunction revoke(\n\t{ byId }: SessionIndex,\n\tid: SessionId,\n\tstored: SessionRecord,\n\tat: Date,\n): void {\n\tbyId.set(id, { ...stored, revokedAt: new Date(at) });\n}\n\n/** Deletes every session `matches` accepts, from both maps, and counts them. */\nfunction deleteWhere(\n\t{ byId, byTokenHash }: SessionIndex,\n\tmatches: (stored: SessionRecord) => boolean,\n): number {\n\tlet deleted = 0;\n\n\tfor (const [id, stored] of byId) {\n\t\tif (matches(stored)) {\n\t\t\tbyId.delete(id);\n\t\t\tbyTokenHash.delete(stored.tokenHash);\n\t\t\tdeleted += 1;\n\t\t}\n\t}\n\n\treturn deleted;\n}\n",
14
+ "import type { SocialLinkRecord, SocialLinkStore } from '../types';\nimport { copy } from './copy';\n\n/**\n * The social link store in memory, by `(provider, accountId)`: bytes compared\n * as they are, so `'Abc'` and `'abc'` are two accounts.\n *\n * `insertSocialLink` checks and writes with no `await` between the two, which\n * on one event loop is what an atomic insert-if-absent is.\n */\nexport function memorySocialLinkStore(): SocialLinkStore {\n\tconst byPair = new Map<string, SocialLinkRecord>();\n\n\treturn {\n\t\tasync insertSocialLink(record) {\n\t\t\tconst key = keyOf(record.provider, record.accountId);\n\t\t\tconst held = byPair.get(key);\n\t\t\tif (held !== undefined) return copy(held);\n\n\t\t\tbyPair.set(key, copy(record));\n\t\t\treturn copy(record);\n\t\t},\n\n\t\tasync findSocialLink(provider, accountId) {\n\t\t\tconst stored = byPair.get(keyOf(provider, accountId));\n\t\t\treturn stored === undefined ? null : copy(stored);\n\t\t},\n\n\t\tasync listUserSocialLinks(userId) {\n\t\t\treturn [...byPair.values()]\n\t\t\t\t.filter((link) => link.userId === userId)\n\t\t\t\t.map(copy);\n\t\t},\n\n\t\tasync deleteSocialLink(userId, provider, accountId) {\n\t\t\tconst key = keyOf(provider, accountId);\n\t\t\tif (byPair.get(key)?.userId !== userId) return false;\n\n\t\t\tbyPair.delete(key);\n\t\t\treturn true;\n\t\t},\n\n\t\tasync deleteUserSocialLinks(userId) {\n\t\t\tlet deleted = 0;\n\n\t\t\tfor (const [key, stored] of byPair) {\n\t\t\t\tif (stored.userId === userId) {\n\t\t\t\t\tbyPair.delete(key);\n\t\t\t\t\tdeleted += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn deleted;\n\t\t},\n\t};\n}\n\n/** An unambiguous key: a JSON array cannot be confused across the two parts. */\nfunction keyOf(provider: string, accountId: string): string {\n\treturn JSON.stringify([provider, accountId]);\n}\n",
15
+ "import type { Id } from '../../../ids/id';\nimport type { TokenKind, TokenRecord, TokenStore } from '../types';\nimport { copy } from './copy';\n\n/** The token store in memory, by token hash. */\nexport function memoryTokenStore(): TokenStore {\n\tconst byTokenHash = new Map<string, TokenRecord>();\n\n\treturn {\n\t\tasync insertToken(record) {\n\t\t\tif (byTokenHash.has(record.tokenHash)) return;\n\t\t\tbyTokenHash.set(record.tokenHash, copy(record));\n\t\t},\n\n\t\tasync consumeToken(tokenHash, kind, at, userId) {\n\t\t\treturn consume(byTokenHash, tokenHash, kind, at, userId);\n\t\t},\n\n\t\tasync countAttempt(tokenHash, kind) {\n\t\t\treturn count(byTokenHash, tokenHash, kind);\n\t\t},\n\n\t\tasync spendUserTokens(userId, kind, at, except) {\n\t\t\tlet spent = 0;\n\n\t\t\tfor (const [tokenHash, stored] of byTokenHash) {\n\t\t\t\tif (\n\t\t\t\t\ttokenHash !== except &&\n\t\t\t\t\tstored.userId === userId &&\n\t\t\t\t\tstored.kind === kind &&\n\t\t\t\t\tstored.spentAt === null\n\t\t\t\t) {\n\t\t\t\t\tbyTokenHash.set(tokenHash, { ...stored, spentAt: new Date(at) });\n\t\t\t\t\tspent += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn spent;\n\t\t},\n\n\t\tasync deleteUserTokens(userId) {\n\t\t\tlet deleted = 0;\n\n\t\t\tfor (const [tokenHash, stored] of byTokenHash) {\n\t\t\t\tif (stored.userId === userId) {\n\t\t\t\t\tbyTokenHash.delete(tokenHash);\n\t\t\t\t\tdeleted += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn deleted;\n\t\t},\n\n\t\tasync deleteExpiredTokens(before) {\n\t\t\tlet deleted = 0;\n\n\t\t\tfor (const [tokenHash, stored] of byTokenHash) {\n\t\t\t\tif (stored.expiresAt.getTime() <= before.getTime()) {\n\t\t\t\t\tbyTokenHash.delete(tokenHash);\n\t\t\t\t\tdeleted += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn deleted;\n\t\t},\n\t};\n}\n\n/**\n * Spends the token and answers it as it was. No `await` between the read and\n * the write: on one event loop that is what makes the pair a single\n * conditional write. With `userId`, another user's token matches nothing.\n */\nfunction consume(\n\tbyTokenHash: Map<string, TokenRecord>,\n\ttokenHash: string,\n\tkind: TokenKind,\n\tat: Date,\n\tuserId: Id | undefined,\n): TokenRecord | null {\n\tconst stored = byTokenHash.get(tokenHash);\n\tif (stored === undefined || stored.kind !== kind) return null;\n\tif (userId !== undefined && stored.userId !== userId) return null;\n\n\tconst before = copy(stored);\n\tif (stored.spentAt === null) {\n\t\tbyTokenHash.set(tokenHash, { ...stored, spentAt: new Date(at) });\n\t}\n\n\treturn before;\n}\n\n/** Counts one attempt: the same single conditional write, no `await` between the read and the write. */\nfunction count(\n\tbyTokenHash: Map<string, TokenRecord>,\n\ttokenHash: string,\n\tkind: TokenKind,\n): TokenRecord | null {\n\tconst stored = byTokenHash.get(tokenHash);\n\tif (stored === undefined || stored.kind !== kind) return null;\n\tif (stored.spentAt !== null) return copy(stored);\n\n\tconst counted = { ...stored, attempts: stored.attempts + 1 };\n\tbyTokenHash.set(tokenHash, counted);\n\treturn copy(counted);\n}\n",
16
+ "import { StoreConflict } from '../../../errors/janus-error';\nimport type { Id } from '../../../ids/id';\nimport type { UserRecord } from '../types';\n\n/** What the in-memory user store holds: the records, and the unique index on their logins. */\nexport interface UserIndex {\n\treadonly byId: Map<Id, UserRecord>;\n\t/** The unique index: (type, login) key → the id holding it. */\n\treadonly byLogin: Map<string, Id>;\n}\n\n/** The unique key of one login. `\\u0000` cannot occur in a type name the core accepts. */\nexport const keyOf = (type: string, login: string): string =>\n\t`${type}\\u0000${login}`;\n\n/** The first of `logins` held by a user of `type` other than `id`. */\nexport const takenBy = (\n\t{ byLogin }: UserIndex,\n\ttype: string,\n\tlogins: readonly string[],\n\tid: Id,\n): string | undefined =>\n\tlogins.find((login) => {\n\t\tconst holder = byLogin.get(keyOf(type, login));\n\t\treturn holder !== undefined && holder !== id;\n\t});\n\n/** The conflict a login held by another user of `type` is refused with. */\nexport const taken = (operation: string, type: string, login: string) =>\n\tnew StoreConflict(\n\t\t'login',\n\t\t`${operation}: the login is taken by another ${type}`,\n\t\t{ login, userType: type, operation },\n\t);\n\n/** Points every login of `record` at its id. */\nexport function indexLogins({ byLogin }: UserIndex, record: UserRecord): void {\n\tfor (const login of record.logins) {\n\t\tbyLogin.set(keyOf(record.type, login), record.id);\n\t}\n}\n\n/** Frees every login of `record`. */\nexport function dropLogins({ byLogin }: UserIndex, record: UserRecord): void {\n\tfor (const login of record.logins) {\n\t\tbyLogin.delete(keyOf(record.type, login));\n\t}\n}\n",
17
+ "import { NotFoundError, StoreConflict } from '../../../errors/janus-error';\nimport type { Id } from '../../../ids/id';\nimport type { UserPatch, UserRecord } from '../types';\nimport { copy } from './copy';\nimport {\n\tdropLogins,\n\tindexLogins,\n\ttaken,\n\ttakenBy,\n\ttype UserIndex,\n} from './user-index';\n\n/**\n * `updateUser` in memory: refused for an unknown id, a version that moved or\n * a login held by another user — checked, then written, in one synchronous\n * step.\n */\nexport function updateStored(\n\tindex: UserIndex,\n\tid: Id,\n\tpatch: UserPatch,\n\tifVersion: number,\n): UserRecord {\n\tconst stored = index.byId.get(id);\n\n\tif (stored === undefined) {\n\t\tthrow new NotFoundError('updateUser: no user has this id', {\n\t\t\tuserId: id,\n\t\t\toperation: 'updateUser',\n\t\t});\n\t}\n\n\tif (stored.version !== ifVersion) {\n\t\tthrow new StoreConflict(\n\t\t\t'version',\n\t\t\t`updateUser: expected version ${ifVersion}, found ${stored.version}`,\n\t\t\t{\n\t\t\t\tuserId: id,\n\t\t\t\texpectedVersion: ifVersion,\n\t\t\t\tactualVersion: stored.version,\n\t\t\t\toperation: 'updateUser',\n\t\t\t},\n\t\t);\n\t}\n\n\tif (patch.logins !== undefined) {\n\t\tconst collision = takenBy(index, stored.type, patch.logins, id);\n\t\tif (collision !== undefined) {\n\t\t\tthrow taken('updateUser', stored.type, collision);\n\t\t}\n\t}\n\n\tconst written = applyPatch(stored, copy(patch));\n\n\tindex.byId.set(id, written);\n\tif (patch.logins !== undefined) {\n\t\tdropLogins(index, stored);\n\t\tindexLogins(index, written);\n\t}\n\n\treturn copy(written);\n}\n\n/**\n * The record a patch produces: the fields it names, replaced whole; the fields\n * it does not name, untouched.\n *\n * Reads each field by name rather than spreading the patch, so a key the port\n * does not declare — `version`, `id`, `type`, `createdAt`, or a `snake_case`\n * typo from JavaScript — never reaches the record. A key present as\n * `undefined` is absent, never an erasure.\n */\nfunction applyPatch(stored: UserRecord, patch: UserPatch): UserRecord {\n\tconst { nameKey: _kept, ...unnamed } = stored;\n\tconst nameKey = patch.nameKey === undefined ? _kept : patch.nameKey;\n\treturn {\n\t\t...unnamed,\n\t\t...(nameKey === undefined || nameKey === null ? {} : { nameKey }),\n\t\tschemaVersion: patch.schemaVersion ?? stored.schemaVersion,\n\t\tactive: patch.active ?? stored.active,\n\t\tfields: patch.fields ?? stored.fields,\n\t\tlogins: patch.logins ?? stored.logins,\n\t\tpassword: patch.password === undefined ? stored.password : patch.password,\n\t\tsecondFactor:\n\t\t\tpatch.secondFactor === undefined\n\t\t\t\t? stored.secondFactor\n\t\t\t\t: patch.secondFactor,\n\t\tavatar: patch.avatar === undefined ? stored.avatar : patch.avatar,\n\t\temailVerifiedAt:\n\t\t\tpatch.emailVerifiedAt === undefined\n\t\t\t\t? stored.emailVerifiedAt\n\t\t\t\t: patch.emailVerifiedAt,\n\t\tversion: stored.version + 1,\n\t\tupdatedAt: patch.updatedAt,\n\t};\n}\n",
18
+ "import type { Id } from '../../../ids/id';\nimport type { UserRecord, UserStore } from '../types';\nimport { copy } from './copy';\nimport {\n\tdropLogins,\n\tindexLogins,\n\tkeyOf,\n\ttaken,\n\ttakenBy,\n\ttype UserIndex,\n} from './user-index';\nimport { updateStored } from './user-update';\n\n/** The user store in memory: the records by id, and the unique index on logins. */\nexport function memoryUserStore(): UserStore {\n\tconst index: UserIndex = {\n\t\tbyId: new Map<Id, UserRecord>(),\n\t\tbyLogin: new Map<string, Id>(),\n\t};\n\tconst { byId, byLogin } = index;\n\n\treturn {\n\t\tasync insertUser(record) {\n\t\t\tconst stored = byId.get(record.id);\n\t\t\tif (stored !== undefined) return copy(stored);\n\n\t\t\tconst collision = takenBy(index, record.type, record.logins, record.id);\n\t\t\tif (collision !== undefined) {\n\t\t\t\tthrow taken('insertUser', record.type, collision);\n\t\t\t}\n\n\t\t\tconst written = copy(record);\n\t\t\tbyId.set(written.id, written);\n\t\t\tindexLogins(index, written);\n\n\t\t\treturn copy(written);\n\t\t},\n\n\t\tasync findUser(id) {\n\t\t\tconst stored = byId.get(id);\n\t\t\treturn stored === undefined ? null : copy(stored);\n\t\t},\n\n\t\tasync findUsers(ids) {\n\t\t\treturn [...new Set(ids)].flatMap((id) => {\n\t\t\t\tconst stored = byId.get(id);\n\t\t\t\treturn stored === undefined ? [] : [copy(stored)];\n\t\t\t});\n\t\t},\n\n\t\tasync findUserByLogin(type, login) {\n\t\t\tconst id = byLogin.get(keyOf(type, login));\n\t\t\tconst stored = id === undefined ? undefined : byId.get(id);\n\t\t\treturn stored === undefined ? null : copy(stored);\n\t\t},\n\n\t\tasync listUsers({ type, loginPrefix, namePrefix, after, limit }) {\n\t\t\t// A Map keeps insertion order, not id order: a retried insert or an\n\t\t\t// id minted on another machine can land out of sequence.\n\t\t\tconst ids = [...byId.values()]\n\t\t\t\t.filter(\n\t\t\t\t\t(user) =>\n\t\t\t\t\t\tuser.type === type &&\n\t\t\t\t\t\tholdsPrefix(user, loginPrefix) &&\n\t\t\t\t\t\tnamedPrefix(user, namePrefix),\n\t\t\t\t)\n\t\t\t\t.map((user) => user.id)\n\t\t\t\t.filter((id) => after === null || id > after)\n\t\t\t\t.sort();\n\t\t\tconst pageIds = ids.slice(0, limit);\n\t\t\tconst last = pageIds.at(-1);\n\n\t\t\treturn {\n\t\t\t\titems: pageIds.map((id) => copy(byId.get(id) as UserRecord)),\n\t\t\t\tnextCursor: ids.length > limit && last !== undefined ? last : null,\n\t\t\t};\n\t\t},\n\n\t\tasync countUsers({ type, loginPrefix, namePrefix }) {\n\t\t\tlet count = 0;\n\t\t\tfor (const user of byId.values()) {\n\t\t\t\tif (\n\t\t\t\t\tuser.type === type &&\n\t\t\t\t\tholdsPrefix(user, loginPrefix) &&\n\t\t\t\t\tnamedPrefix(user, namePrefix)\n\t\t\t\t) {\n\t\t\t\t\tcount += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\tasync updateUser(id, patch, ifVersion) {\n\t\t\treturn updateStored(index, id, patch, ifVersion);\n\t\t},\n\n\t\tasync deleteUser(id) {\n\t\t\tconst stored = byId.get(id);\n\t\t\tif (stored === undefined) return false;\n\n\t\t\tbyId.delete(id);\n\t\t\tdropLogins(index, stored);\n\t\t\treturn true;\n\t\t},\n\t};\n}\n\n/** Whether the user holds a login starting with the prefix; every user does when there is none. */\nfunction holdsPrefix(user: UserRecord, prefix: string | undefined): boolean {\n\treturn (\n\t\tprefix === undefined ||\n\t\tuser.logins.some((login) => login.startsWith(prefix))\n\t);\n}\n\n/** Whether the user's name key starts with the prefix; every user does when there is none. */\nfunction namedPrefix(user: UserRecord, prefix: string | undefined): boolean {\n\treturn prefix === undefined || user.nameKey?.startsWith(prefix) === true;\n}\n",
19
+ "import type { JanusStores } from '../types';\nimport { memoryPasskeyStore } from './passkeys';\nimport { memorySessionStore } from './sessions';\nimport { memorySocialLinkStore } from './social-links';\nimport { memoryTokenStore } from './tokens';\nimport { memoryUserStore } from './users';\n\n/**\n * The reference implementation of the store port, in memory — the optional\n * `socialLinks` and `passkeys` slots included.\n *\n * **Shipped and documented, not a test helper.** It is what a consumer uses in\n * their own unit tests, and what an adapter author compares against when a\n * conformance case they do not understand turns red. So it keeps the six rules\n * for real rather than approximately:\n *\n * - uniqueness is a constraint — an index checked and written inside the same\n * synchronous step, which is what atomic means on one event loop;\n * - `consumeToken` reads and writes with no `await` between the two, so twenty\n * concurrent calls see exactly one unspent token;\n * - every record is **copied in and copied out**, so a caller that mutates what\n * it passed or what it got back cannot reach the store — the in-memory\n * version of \"bytes round-trip\";\n * - a patch applies only the fields it names, and only the fields the port\n * declares: a stray `version` or `id` in a patch from JavaScript is ignored,\n * not written.\n *\n * Every method is `async` even though none waits on anything: a caller that\n * forgot an `await` must fail here the way it would against a real database.\n */\nexport function createMemoryStores(): JanusStores {\n\treturn {\n\t\tusers: memoryUserStore(),\n\t\tsessions: memorySessionStore(),\n\t\ttokens: memoryTokenSt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AAS,KAAK,IAAI,EAAE;AAAA,MAC1B,IAAI,WAAW;AAAA,QAAW,OAAO;AAAA,MAEjC,KAAK,OAAO,EAAE;AAAA,MACd,WAAW,OAAO,MAAM;AAAA,MACxB,OAAO;AAAA;AAAA,EAET;AAAA;AAID,SAAS,WAAW,CAAC,MAAkB,QAAqC;AAAA,EAC3E,OACC,WAAW,aACX,KAAK,OAAO,KAAK,CAAC,UAAU,MAAM,WAAW,MAAM,CAAC;AAAA;AAKtD,SAAS,WAAW,CAAC,MAAkB,QAAqC;AAAA,EAC3E,OAAO,WAAW,aAAa,KAAK,SAAS,WAAW,MAAM,MAAM;AAAA;;;ACvF9D,SAAS,mBAAkB,GAAgB;AAAA,EACjD,OAAO;AAAA,IACN,OAAO,gBAAgB;AAAA,IACvB,UAAU,mBAAmB;AAAA,IAC7B,QAAQ,iBAAiB;AAAA,IACzB,aAAa,sBAAsB;AAAA,IACnC,UAAU,mBAAmB;AAAA,EAC9B;AAAA;",
22
+ "debugId": "D04447DEF52BD1AF64756E2164756E21",
23
+ "names": []
24
+ }
@@ -0,0 +1,64 @@
1
+ import {
2
+ JanusError2,
3
+ StoreFailure2
4
+ } from "./index-2ttdcz7n.js";
5
+
6
+ // src/stores/guard.ts
7
+ var ANSWERS_NOTHING = new Set([
8
+ "insertSession",
9
+ "insertToken",
10
+ "insertApiKey",
11
+ "write"
12
+ ]);
13
+ function guardStore(slot, store) {
14
+ const guarded = {};
15
+ for (const method of methodsOf(store)) {
16
+ const original = store[method];
17
+ if (typeof original !== "function")
18
+ continue;
19
+ guarded[method] = async (...args) => {
20
+ let answer;
21
+ try {
22
+ answer = await original.apply(store, args);
23
+ } catch (error) {
24
+ throw asFailure(error, slot, method);
25
+ }
26
+ if (answer === undefined && !ANSWERS_NOTHING.has(method)) {
27
+ throw new StoreFailure2(`${slot}.${method} answered undefined: an absence is null, so this store forgot to answer`, { slot, operation: method });
28
+ }
29
+ return answer;
30
+ };
31
+ }
32
+ return guarded;
33
+ }
34
+ function methodsOf(store) {
35
+ const names = new Set;
36
+ for (let proto = store;proto !== null && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) {
37
+ for (const name of Object.getOwnPropertyNames(proto)) {
38
+ if (name !== "constructor")
39
+ names.add(name);
40
+ }
41
+ }
42
+ return [...names];
43
+ }
44
+ function asFailure(error, slot, method) {
45
+ if (error instanceof JanusError2)
46
+ return error;
47
+ return new StoreFailure2(`${slot}.${method}: the store could not answer`, {
48
+ slot,
49
+ operation: method,
50
+ cause: error
51
+ });
52
+ }
53
+ function guardRelations(store) {
54
+ return guardStore("relations", store);
55
+ }
56
+
57
+ // src/stores/storable.ts
58
+ var isStorable = (value) => !value.includes("\x00") && value.isWellFormed();
59
+ var UNSTORABLE = "holds a NUL character or a lone surrogate, which no store can keep";
60
+
61
+ export { guardStore, guardRelations, isStorable, UNSTORABLE };
62
+
63
+ //# debugId=5905640CBBCF2F6264756E2164756E21
64
+ //# sourceMappingURL=index-n8jxmxeg.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/stores/guard.ts", "../src/stores/storable.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * **The one place a store's answer is caught**, shared by both sides of the\n * package: the identity stores and the relation store reach a caller only\n * through {@link guardStore}.\n *\n * - A `JanusError` the store threw passes through, so `instanceof` holds.\n * - **Anything else it threw is a failure** — `StoreFailure`, naming the slot\n * and the method, with the original as `cause`. Never an absence.\n * - `undefined` where the port says `null` is a store that forgot to answer,\n * and becomes `StoreFailure` rather than \"not found\".\n *\n * The `catch` below always rethrows; `src/auth/outage.scan.spec.ts` holds it to that.\n */\n\nimport {\n\ttype JanusError,\n\tJanusError as JanusErrorClass,\n\tStoreFailure,\n} from '../errors/janus-error';\nimport type { RelationStore } from '../permissions/port/types';\n\n/** A store the guard names in a `StoreFailure`: `users`, `sessions`, `tokens` or `relations`. */\nexport type StoreSlot = NonNullable<StoreFailure['slot']>;\n\n/**\n * The methods whose answer is legitimately nothing: `undefined` from them is\n * not a forgotten `return`. Every other method answers a value, `null`,\n * `false`, `0` or a page — **never `undefined`**.\n */\nconst ANSWERS_NOTHING = new Set([\n\t'insertSession',\n\t'insertToken',\n\t'insertApiKey',\n\t'write',\n]);\n\nexport function guardStore<S extends object>(slot: StoreSlot, store: S): S {\n\tconst guarded: Record<string, unknown> = {};\n\n\tfor (const method of methodsOf(store)) {\n\t\tconst original = (store as Record<string, unknown>)[method];\n\t\tif (typeof original !== 'function') continue;\n\n\t\tguarded[method] = async (...args: unknown[]) => {\n\t\t\tlet answer: unknown;\n\n\t\t\ttry {\n\t\t\t\tanswer = await original.apply(store, args);\n\t\t\t} catch (error) {\n\t\t\t\t// Rethrown, always. The only question is under which class.\n\t\t\t\tthrow asFailure(error, slot, method);\n\t\t\t}\n\n\t\t\tif (answer === undefined && !ANSWERS_NOTHING.has(method)) {\n\t\t\t\tthrow new StoreFailure(\n\t\t\t\t\t`${slot}.${method} answered undefined: an absence is null, so this store forgot to answer`,\n\t\t\t\t\t{ slot, operation: method },\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn answer;\n\t\t};\n\t}\n\n\treturn guarded as S;\n}\n\n/** Own and prototype methods, so a class-based store is guarded like a literal. */\nfunction methodsOf(store: object): string[] {\n\tconst names = new Set<string>();\n\n\tfor (\n\t\tlet proto: object | null = store;\n\t\tproto !== null && proto !== Object.prototype;\n\t\tproto = Object.getPrototypeOf(proto)\n\t) {\n\t\tfor (const name of Object.getOwnPropertyNames(proto)) {\n\t\t\tif (name !== 'constructor') names.add(name);\n\t\t}\n\t}\n\n\treturn [...names];\n}\n\nfunction asFailure(\n\terror: unknown,\n\tslot: StoreSlot,\n\tmethod: string,\n): JanusError {\n\tif (error instanceof JanusErrorClass) return error;\n\n\t// The message names where, never what: a driver's message may hold a\n\t// connection string, and a connection string holds a password. It is kept\n\t// as `cause`, for the operator's logs.\n\treturn new StoreFailure(`${slot}.${method}: the store could not answer`, {\n\t\tslot,\n\t\toperation: method,\n\t\tcause: error,\n\t});\n}\n\n/**\n * The relation store, guarded the same way: the permission engine's only way\n * to a store, so a failure there is `STORE_FAILED` and never a denial.\n */\nexport function guardRelations(store: RelationStore): RelationStore {\n\treturn guardStore('relations', store);\n}\n",
6
+ "/**\n * What every store can keep. PostgreSQL refuses `\\u0000` in `text` and\n * `jsonb`, and a lone surrogate in `jsonb`; MongoDB and the memory store keep\n * both. The core refuses them before a store is asked, so a request that sends\n * one is answered the same way on every adapter — not `STORE_FAILED` on one of\n * them, a 503 for a database that is up.\n *\n * Shared by both sides of the package, like `guard.ts`: a string from a\n * request reaches the identity stores and the relation store alike.\n */\n\n/** Whether every store can keep this string. */\nexport const isStorable = (value: string): boolean =>\n\t!value.includes('\\u0000') && value.isWellFormed();\n\n/** What an issue says about a string no store can keep. */\nexport const UNSTORABLE =\n\t'holds a NUL character or a lone surrogate, which no store can keep';\n"
7
+ ],
8
+ "mappings": ";;;;;;AA6BA,IAAM,kBAAkB,IAAI,IAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAEM,SAAS,UAA4B,CAAC,MAAiB,OAAa;AAAA,EAC1E,MAAM,UAAmC,CAAC;AAAA,EAE1C,WAAW,UAAU,UAAU,KAAK,GAAG;AAAA,IACtC,MAAM,WAAY,MAAkC;AAAA,IACpD,IAAI,OAAO,aAAa;AAAA,MAAY;AAAA,IAEpC,QAAQ,UAAU,UAAU,SAAoB;AAAA,MAC/C,IAAI;AAAA,MAEJ,IAAI;AAAA,QACH,SAAS,MAAM,SAAS,MAAM,OAAO,IAAI;AAAA,QACxC,OAAO,OAAO;AAAA,QAEf,MAAM,UAAU,OAAO,MAAM,MAAM;AAAA;AAAA,MAGpC,IAAI,WAAW,aAAa,CAAC,gBAAgB,IAAI,MAAM,GAAG;AAAA,QACzD,MAAM,IAAI,cACT,GAAG,QAAQ,iFACX,EAAE,MAAM,WAAW,OAAO,CAC3B;AAAA,MACD;AAAA,MAEA,OAAO;AAAA;AAAA,EAET;AAAA,EAEA,OAAO;AAAA;AAIR,SAAS,SAAS,CAAC,OAAyB;AAAA,EAC3C,MAAM,QAAQ,IAAI;AAAA,EAElB,SACK,QAAuB,MAC3B,UAAU,QAAQ,UAAU,OAAO,WACnC,QAAQ,OAAO,eAAe,KAAK,GAClC;AAAA,IACD,WAAW,QAAQ,OAAO,oBAAoB,KAAK,GAAG;AAAA,MACrD,IAAI,SAAS;AAAA,QAAe,MAAM,IAAI,IAAI;AAAA,IAC3C;AAAA,EACD;AAAA,EAEA,OAAO,CAAC,GAAG,KAAK;AAAA;AAGjB,SAAS,SAAS,CACjB,OACA,MACA,QACa;AAAA,EACb,IAAI,iBAAiB;AAAA,IAAiB,OAAO;AAAA,EAK7C,OAAO,IAAI,cAAa,GAAG,QAAQ,sCAAsC;AAAA,IACxE;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,EACR,CAAC;AAAA;AAOK,SAAS,cAAc,CAAC,OAAqC;AAAA,EACnE,OAAO,WAAW,aAAa,KAAK;AAAA;;;AC9F9B,IAAM,aAAa,CAAC,UAC1B,CAAC,MAAM,SAAS,MAAQ,KAAK,MAAM,aAAa;AAG1C,IAAM,aACZ;",
9
+ "debugId": "5905640CBBCF2F6264756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,3 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ export declare const apiKeyBoundCases: readonly ApiKeyCase[];
3
+ //# sourceMappingURL=bound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bound.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/bound.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAe3C,eAAO,MAAM,gBAAgB,EAAE,SAAS,UAAU,EA0IjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ export declare const apiKeyExpiryCases: readonly ApiKeyCase[];
3
+ //# sourceMappingURL=expiry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expiry.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/expiry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAgB3C,eAAO,MAAM,iBAAiB,EAAE,SAAS,UAAU,EA+HlD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ /** Every case of the API key store, outages aside, in the order they are described. */
3
+ export declare const apiKeyStoreCases: readonly ApiKeyCase[];
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAQ3C,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,EAAE,SAAS,UAAU,EAOjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ export declare const apiKeyInsertCases: readonly ApiKeyCase[];
3
+ //# sourceMappingURL=insert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/insert.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,eAAO,MAAM,iBAAiB,EAAE,SAAS,UAAU,EA6JlD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ export declare const apiKeyOutageCases: readonly ApiKeyCase[];
3
+ //# sourceMappingURL=outage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outage.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/outage.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,UAAU,CAAC;AA4EzD,eAAO,MAAM,iBAAiB,EAAE,SAAS,UAAU,EAkFlD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ export declare const apiKeyRevokeCases: readonly ApiKeyCase[];
3
+ //# sourceMappingURL=revoke.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revoke.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/revoke.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,eAAO,MAAM,iBAAiB,EAAE,SAAS,UAAU,EAwIlD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ export declare const apiKeyTouchCases: readonly ApiKeyCase[];
3
+ //# sourceMappingURL=touch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/touch.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,eAAO,MAAM,gBAAgB,EAAE,SAAS,UAAU,EAoGjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ApiKeyCase } from '../types';
2
+ export declare const apiKeyUserBoundCases: readonly ApiKeyCase[];
3
+ //# sourceMappingURL=user-bound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-bound.d.ts","sourceRoot":"","sources":["../../../../src/conformance/api-keys/cases/user-bound.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAY3C,eAAO,MAAM,oBAAoB,EAAE,SAAS,UAAU,EA4JrD,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { ConformanceRunner } from '../types';
2
+ import type { ApiKeyCase, ApiKeyHarness } from './types';
3
+ /** Every case, in the order they are described. */
4
+ export declare const allApiKeyCases: readonly ApiKeyCase[];
5
+ /** Runs one case against a freshly opened store, and closes it, pass or fail. */
6
+ export declare function runApiKeyCase(apiKeyCase: ApiKeyCase, harness: ApiKeyHarness): Promise<{
7
+ readonly skipped: string;
8
+ } | {
9
+ readonly passed: true;
10
+ }>;
11
+ /** Describes the whole API key suite under the adapter's test runner. */
12
+ export declare function describeApiKeyStores(options: {
13
+ readonly name: string;
14
+ readonly harness: ApiKeyHarness;
15
+ readonly runner?: ConformanceRunner;
16
+ /** Case ids to skip, each with the reason — reported, never silent. */
17
+ readonly skip?: Readonly<Record<string, string>>;
18
+ readonly faults?: boolean;
19
+ }): void;
20
+ //# sourceMappingURL=describe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/conformance/api-keys/describe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EAGb,MAAM,SAAS,CAAC;AAEjB,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,SAAS,UAAU,EAG/C,CAAC;AAEF,iFAAiF;AACjF,wBAAsB,aAAa,CAClC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,aAAa,GACpB,OAAO,CAAC;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;CAAE,CAAC,CAcnE;AAkCD,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACpC,uEAAuE;IACvE,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,IAAI,CASP"}
@@ -0,0 +1,4 @@
1
+ import type { ApiKeyRecord } from '../../auth/port/types';
2
+ /** A standing key; override what a case is about. */
3
+ export declare function apiKey(overrides?: Partial<ApiKeyRecord>): ApiKeyRecord;
4
+ //# sourceMappingURL=fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/conformance/api-keys/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,qDAAqD;AACrD,wBAAgB,MAAM,CAAC,SAAS,GAAE,OAAO,CAAC,YAAY,CAAM,GAAG,YAAY,CAY1E"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The conformance suite of the API key store port — what an adapter author
3
+ * runs against `ApiKeyStore`, as `describeRelationStores` is run against the
4
+ * relation port.
5
+ *
6
+ * ```ts
7
+ * import { describe, it } from 'bun:test';
8
+ * import { describeApiKeyStores } from '@softistx/janus/conformance';
9
+ *
10
+ * describeApiKeyStores({ name: 'my adapter', harness, runner: { describe, it } });
11
+ * ```
12
+ */
13
+ export { apiKeyStoreCases } from './cases';
14
+ export { apiKeyOutageCases } from './cases/outage';
15
+ export { allApiKeyCases, describeApiKeyStores, runApiKeyCase, } from './describe';
16
+ export { referenceApiKeyHarness } from './reference';
17
+ export type { ApiKeyCase, ApiKeyContext, ApiKeyFaults, ApiKeyHarness, ApiKeyMethod, ApiKeyNeed, OpenedApiKeys, } from './types';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conformance/api-keys/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACN,cAAc,EACd,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,EACV,aAAa,GACb,MAAM,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ApiKeyHarness } from './types';
2
+ /** The reference store, with faults: what the suite proves itself against. */
3
+ export declare function referenceApiKeyHarness(): ApiKeyHarness;
4
+ //# sourceMappingURL=reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/conformance/api-keys/reference.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,8EAA8E;AAC9E,wBAAgB,sBAAsB,IAAI,aAAa,CA8BtD"}
@@ -0,0 +1,42 @@
1
+ import type { ApiKeyStore } from '../../auth/port/types';
2
+ /** A method of the API key store. */
3
+ export type ApiKeyMethod = keyof ApiKeyStore & string;
4
+ /** How the suite makes one API key store method fail, for the outage cases. */
5
+ export interface ApiKeyFaults {
6
+ /**
7
+ * Fails `method`, and only it: the other methods keep answering, because
8
+ * the outage cases read the store back to prove a rejected write changed
9
+ * nothing.
10
+ */
11
+ fail(method: ApiKeyMethod): Promise<void>;
12
+ }
13
+ export interface OpenedApiKeys {
14
+ /** Empty: every case writes what it reads. */
15
+ readonly store: ApiKeyStore;
16
+ readonly faults?: ApiKeyFaults;
17
+ close?(): Promise<void>;
18
+ }
19
+ export interface ApiKeyHarness {
20
+ /** Called once per case, so no case sees another's keys. */
21
+ open(): Promise<OpenedApiKeys>;
22
+ }
23
+ export interface ApiKeyContext {
24
+ readonly store: ApiKeyStore;
25
+ readonly faults: ApiKeyFaults | null;
26
+ }
27
+ /**
28
+ * What a case needs beyond the required methods: the harness's `faults`, or
29
+ * one of the store's optional capabilities — `bound` (`listBoundApiKeys` and
30
+ * `revokeBoundApiKeys`) or `expiryNotice` (`listExpiringApiKeys` and
31
+ * `markApiKeyExpiryNotified`). A store without it skips the case, with the
32
+ * reason.
33
+ */
34
+ export type ApiKeyNeed = 'faults' | 'bound' | 'userBound' | 'expiryNotice';
35
+ export interface ApiKeyCase {
36
+ readonly id: string;
37
+ readonly group: 'apiKeys' | 'outage';
38
+ readonly name: string;
39
+ readonly needs?: ApiKeyNeed | readonly ApiKeyNeed[];
40
+ run(context: ApiKeyContext): Promise<void>;
41
+ }
42
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conformance/api-keys/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qCAAqC;AACrC,MAAM,MAAM,YAAY,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC;AAEtD,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC5B;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,aAAa;IAC7B,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAC/B,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC7B,4DAA4D;IAC5D,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CACrC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,CAAC;AAE3E,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,UAAU,EAAE,CAAC;IACpD,GAAG,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The suite's five assertions.
3
+ *
4
+ * **No assertion library, no test framework**: `bun:test` in the dependency
5
+ * graph of a published library is a dependency every consumer installs, and an
6
+ * adapter author on vitest could not run the suite at all. Each throws a plain
7
+ * `Error` whose message names the port method and what it should have answered
8
+ * — the sentence an adapter author reads first.
9
+ */
10
+ /** Fails unless `actual` deep-equals `expected`: dates by instant, `1` never `'1'`. */
11
+ export declare function equal(actual: unknown, expected: unknown, what: string): void;
12
+ /** Fails unless `actual` is `null` — not `undefined`, which is a store that forgot to answer. */
13
+ export declare function isNull(actual: unknown, what: string): void;
14
+ /** Fails unless `condition` holds. */
15
+ export declare function ok(condition: boolean, what: string): void;
16
+ /**
17
+ * The rejection of `promise`, or a failure when it resolves.
18
+ *
19
+ * **Settled where it is created**, with `.then(ok, ko)`: a rejection awaited
20
+ * too late is counted unhandled by Bun and fails the case with the very error
21
+ * it was checking — measured in nxgt-data, where a loaded CI runner failed
22
+ * where an idle laptop passed.
23
+ */
24
+ export declare function rejects(promise: Promise<unknown>, what: string): Promise<unknown>;
25
+ /**
26
+ * The `instanceof` probe: a class that is named like this package's but is not
27
+ * this package's class means **two copies of `@softistx/janus`** are installed —
28
+ * the adapter depends on it instead of peering it. Then `StoreConflict` stops
29
+ * passing through the core, and a login that is taken is answered as an
30
+ * outage.
31
+ *
32
+ * The probe says what breaks; `verify:artifacts` says whether a duplicate is
33
+ * present. Both are needed.
34
+ *
35
+ * `name` is the error's own `name` field, passed rather than read from
36
+ * `cls.name`: a bundler renames a class that collides — `StoreFailure2` in
37
+ * `dist` — and the probe would then never recognise the duplicate.
38
+ */
39
+ export declare function isOurs<T>(error: unknown, cls: abstract new (...args: never[]) => T, name: string, what: string): asserts error is T;
40
+ //# sourceMappingURL=assert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/conformance/assert.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,uFAAuF;AACvF,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAO5E;AAED,iGAAiG;AACjG,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAM1D;AAED,sCAAsC;AACtC,wBAAgB,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAEzD;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACtB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EACzB,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,OAAO,CAAC,CAOlB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACvB,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,KAAK,IAAI,CAAC,CAWpB"}
@@ -0,0 +1,3 @@
1
+ import type { ConformanceCase } from '../types';
2
+ export declare const outageCases: readonly ConformanceCase[];
3
+ //# sourceMappingURL=outage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outage.d.ts","sourceRoot":"","sources":["../../../src/conformance/cases/outage.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAe,eAAe,EAAc,MAAM,UAAU,CAAC;AAuFzE,eAAO,MAAM,WAAW,EAAE,SAAS,eAAe,EAsIjD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { JanusStores } from '../../auth/port/types';
2
+ import type { Id } from '../../ids/id';
3
+ import type { CaseContext, ConformanceCase, PortMethod } from '../types';
4
+ /** The outage case builder of `./outage`, passed in so the two files do not import each other. */
5
+ type OutageCase = <S extends keyof JanusStores>(slot: S, method: PortMethod<S>, call: (context: CaseContext) => Promise<unknown>, seed: (context: CaseContext) => Promise<void>) => ConformanceCase;
6
+ /**
7
+ * One outage case per method of the optional passkey store, each needing the
8
+ * slot as well as `faults`. The seeding is the slot's own: a passkey of `userId`.
9
+ */
10
+ export declare function passkeyOutageCases(outage: OutageCase, userId: Id, now: Date): readonly ConformanceCase[];
11
+ export {};
12
+ //# sourceMappingURL=outage.passkeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outage.passkeys.d.ts","sourceRoot":"","sources":["../../../src/conformance/cases/outage.passkeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEzE,kGAAkG;AAClG,KAAK,UAAU,GAAG,CAAC,CAAC,SAAS,MAAM,WAAW,EAC7C,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,EAChD,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,KACzC,eAAe,CAAC;AAErB;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,EAAE,EACV,GAAG,EAAE,IAAI,GACP,SAAS,eAAe,EAAE,CAgD5B"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /** What a rename and a deletion change, and what they leave. */
3
+ export declare const passkeyDeletionCases: readonly ConformanceCase[];
4
+ //# sourceMappingURL=deletion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deletion.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/passkeys/deletion.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,SAAS,eAAe,EAsH1D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /**
3
+ * Every case of the optional passkey store, in the order they are described.
4
+ * Each needs `stores.passkeys`, and is skipped — with its reason — when the
5
+ * harness opens stores without it.
6
+ */
7
+ export declare const passkeyStoreCases: readonly ConformanceCase[];
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/passkeys/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAMnD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAKvD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /** Insert-if-absent: the credential id is unique, and the loser is answered the holder. */
3
+ export declare const passkeyInsertCases: readonly ConformanceCase[];
4
+ //# sourceMappingURL=inserts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inserts.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/passkeys/inserts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EA4FxD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /** What a passkey's reads answer: the record verbatim, nothing as `null` or `[]`. */
3
+ export declare const passkeyReadCases: readonly ConformanceCase[];
4
+ //# sourceMappingURL=reads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reads.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/passkeys/reads.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD,qFAAqF;AACrF,eAAO,MAAM,gBAAgB,EAAE,SAAS,eAAe,EAqGtD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /** Recording a use is conditional on the counter, so a replayed assertion cannot pass twice. */
3
+ export declare const passkeyUseCases: readonly ConformanceCase[];
4
+ //# sourceMappingURL=uses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uses.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/passkeys/uses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAOnD,gGAAgG;AAChG,eAAO,MAAM,eAAe,EAAE,SAAS,eAAe,EAwHrD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /** What a deletion of sessions removes — a user’s, or the lapsed ones — and what it leaves. */
3
+ export declare const sessionDeletionCases: readonly ConformanceCase[];
4
+ //# sourceMappingURL=deletion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deletion.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/sessions/deletion.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,EAAE,SAAS,eAAe,EAoF1D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /** What an extension moves, and the revoked session it never brings back. */
3
+ export declare const sessionExtensionCases: readonly ConformanceCase[];
4
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/sessions/extension.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,EAAE,SAAS,eAAe,EAwE3D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceCase } from '../../types';
2
+ /** Every case of the session store, in the order they are described. */
3
+ export declare const sessionStoreCases: readonly ConformanceCase[];
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/conformance/cases/sessions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AASnD,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAQvD,CAAC"}