@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.
- package/LICENSE +21 -0
- package/README.md +2928 -2
- package/dist/auth/api-keys/authenticate-key.d.ts +21 -0
- package/dist/auth/api-keys/authenticate-key.d.ts.map +1 -0
- package/dist/auth/api-keys/bound.d.ts +11 -0
- package/dist/auth/api-keys/bound.d.ts.map +1 -0
- package/dist/auth/api-keys/count.d.ts +8 -0
- package/dist/auth/api-keys/count.d.ts.map +1 -0
- package/dist/auth/api-keys/create/checks.d.ts +42 -0
- package/dist/auth/api-keys/create/checks.d.ts.map +1 -0
- package/dist/auth/api-keys/create/index.d.ts +10 -0
- package/dist/auth/api-keys/create/index.d.ts.map +1 -0
- package/dist/auth/api-keys/events.d.ts +22 -0
- package/dist/auth/api-keys/events.d.ts.map +1 -0
- package/dist/auth/api-keys/expiry.d.ts +11 -0
- package/dist/auth/api-keys/expiry.d.ts.map +1 -0
- package/dist/auth/api-keys/flows.d.ts +13 -0
- package/dist/auth/api-keys/flows.d.ts.map +1 -0
- package/dist/auth/api-keys/index.d.ts +11 -0
- package/dist/auth/api-keys/index.d.ts.map +1 -0
- package/dist/auth/api-keys/read.d.ts +10 -0
- package/dist/auth/api-keys/read.d.ts.map +1 -0
- package/dist/auth/api-keys/shape.d.ts +24 -0
- package/dist/auth/api-keys/shape.d.ts.map +1 -0
- package/dist/auth/api-keys/to-api-key.d.ts +8 -0
- package/dist/auth/api-keys/to-api-key.d.ts.map +1 -0
- package/dist/auth/api-keys/token.d.ts +23 -0
- package/dist/auth/api-keys/token.d.ts.map +1 -0
- package/dist/auth/api-keys/user-bound.d.ts +10 -0
- package/dist/auth/api-keys/user-bound.d.ts.map +1 -0
- package/dist/auth/at.d.ts +9 -0
- package/dist/auth/at.d.ts.map +1 -0
- package/dist/auth/avatar/any-type.d.ts +13 -0
- package/dist/auth/avatar/any-type.d.ts.map +1 -0
- package/dist/auth/avatar/flows.d.ts +7 -0
- package/dist/auth/avatar/flows.d.ts.map +1 -0
- package/dist/auth/avatar/id.d.ts +10 -0
- package/dist/auth/avatar/id.d.ts.map +1 -0
- package/dist/auth/avatar/index.d.ts +7 -0
- package/dist/auth/avatar/index.d.ts.map +1 -0
- package/dist/auth/avatar/remove.d.ts +10 -0
- package/dist/auth/avatar/remove.d.ts.map +1 -0
- package/dist/auth/avatar/set.d.ts +12 -0
- package/dist/auth/avatar/set.d.ts.map +1 -0
- package/dist/auth/concurrency-limit.d.ts +13 -0
- package/dist/auth/concurrency-limit.d.ts.map +1 -0
- package/dist/auth/config/api-keys-config.d.ts +33 -0
- package/dist/auth/config/api-keys-config.d.ts.map +1 -0
- package/dist/auth/config/hasher.d.ts +22 -0
- package/dist/auth/config/hasher.d.ts.map +1 -0
- package/dist/auth/config/index.d.ts +24 -0
- package/dist/auth/config/index.d.ts.map +1 -0
- package/dist/auth/config/invitations-config.d.ts +74 -0
- package/dist/auth/config/invitations-config.d.ts.map +1 -0
- package/dist/auth/config/janus-config.d.ts +233 -0
- package/dist/auth/config/janus-config.d.ts.map +1 -0
- package/dist/auth/config/magic-link-config.d.ts +6 -0
- package/dist/auth/config/magic-link-config.d.ts.map +1 -0
- package/dist/auth/config/names.d.ts +9 -0
- package/dist/auth/config/names.d.ts.map +1 -0
- package/dist/auth/config/normalize.d.ts +26 -0
- package/dist/auth/config/normalize.d.ts.map +1 -0
- package/dist/auth/config/passkeys-config.d.ts +49 -0
- package/dist/auth/config/passkeys-config.d.ts.map +1 -0
- package/dist/auth/config/password-config.d.ts +22 -0
- package/dist/auth/config/password-config.d.ts.map +1 -0
- package/dist/auth/config/reserved.d.ts +14 -0
- package/dist/auth/config/reserved.d.ts.map +1 -0
- package/dist/auth/config/resolve-api-keys.d.ts +5 -0
- package/dist/auth/config/resolve-api-keys.d.ts.map +1 -0
- package/dist/auth/config/resolve-config.d.ts +9 -0
- package/dist/auth/config/resolve-config.d.ts.map +1 -0
- package/dist/auth/config/resolve-cookie.d.ts +5 -0
- package/dist/auth/config/resolve-cookie.d.ts.map +1 -0
- package/dist/auth/config/resolve-devices.d.ts +5 -0
- package/dist/auth/config/resolve-devices.d.ts.map +1 -0
- package/dist/auth/config/resolve-invitation-types.d.ts +5 -0
- package/dist/auth/config/resolve-invitation-types.d.ts.map +1 -0
- package/dist/auth/config/resolve-invitations.d.ts +5 -0
- package/dist/auth/config/resolve-invitations.d.ts.map +1 -0
- package/dist/auth/config/resolve-magic-link.d.ts +4 -0
- package/dist/auth/config/resolve-magic-link.d.ts.map +1 -0
- package/dist/auth/config/resolve-passkeys.d.ts +5 -0
- package/dist/auth/config/resolve-passkeys.d.ts.map +1 -0
- package/dist/auth/config/resolve-second-factor.d.ts +5 -0
- package/dist/auth/config/resolve-second-factor.d.ts.map +1 -0
- package/dist/auth/config/resolve-social.d.ts +17 -0
- package/dist/auth/config/resolve-social.d.ts.map +1 -0
- package/dist/auth/config/resolve-throttle.d.ts +37 -0
- package/dist/auth/config/resolve-throttle.d.ts.map +1 -0
- package/dist/auth/config/resolve-type.d.ts +6 -0
- package/dist/auth/config/resolve-type.d.ts.map +1 -0
- package/dist/auth/config/resolved-config.d.ts +126 -0
- package/dist/auth/config/resolved-config.d.ts.map +1 -0
- package/dist/auth/config/social-config.d.ts +154 -0
- package/dist/auth/config/social-config.d.ts.map +1 -0
- package/dist/auth/config/user-type.d.ts +79 -0
- package/dist/auth/config/user-type.d.ts.map +1 -0
- package/dist/auth/config/warn-throttle-window.d.ts +14 -0
- package/dist/auth/config/warn-throttle-window.d.ts.map +1 -0
- package/dist/auth/context/create-context.d.ts +31 -0
- package/dist/auth/context/create-context.d.ts.map +1 -0
- package/dist/auth/context/index.d.ts +17 -0
- package/dist/auth/context/index.d.ts.map +1 -0
- package/dist/auth/context/logins.d.ts +28 -0
- package/dist/auth/context/logins.d.ts.map +1 -0
- package/dist/auth/context/password.d.ts +34 -0
- package/dist/auth/context/password.d.ts.map +1 -0
- package/dist/auth/context/records.d.ts +27 -0
- package/dist/auth/context/records.d.ts.map +1 -0
- package/dist/auth/context/user.d.ts +21 -0
- package/dist/auth/context/user.d.ts.map +1 -0
- package/dist/auth/context/validate-fields.d.ts +12 -0
- package/dist/auth/context/validate-fields.d.ts.map +1 -0
- package/dist/auth/counter-key.d.ts +20 -0
- package/dist/auth/counter-key.d.ts.map +1 -0
- package/dist/auth/derived-keys.d.ts +9 -0
- package/dist/auth/derived-keys.d.ts.map +1 -0
- package/dist/auth/devices/cookie.d.ts +56 -0
- package/dist/auth/devices/cookie.d.ts.map +1 -0
- package/dist/auth/devices/hint.d.ts +42 -0
- package/dist/auth/devices/hint.d.ts.map +1 -0
- package/dist/auth/devices/index.d.ts +11 -0
- package/dist/auth/devices/index.d.ts.map +1 -0
- package/dist/auth/devices/report.d.ts +11 -0
- package/dist/auth/devices/report.d.ts.map +1 -0
- package/dist/auth/devices/token.d.ts +13 -0
- package/dist/auth/devices/token.d.ts.map +1 -0
- package/dist/auth/email-flows/any-type-change-email.d.ts +18 -0
- package/dist/auth/email-flows/any-type-change-email.d.ts.map +1 -0
- package/dist/auth/email-flows/any-type-reset-password.d.ts +19 -0
- package/dist/auth/email-flows/any-type-reset-password.d.ts.map +1 -0
- package/dist/auth/email-flows/any-type-verify-email.d.ts +18 -0
- package/dist/auth/email-flows/any-type-verify-email.d.ts.map +1 -0
- package/dist/auth/email-flows/change-email-token.d.ts +47 -0
- package/dist/auth/email-flows/change-email-token.d.ts.map +1 -0
- package/dist/auth/email-flows/change-email.d.ts +17 -0
- package/dist/auth/email-flows/change-email.d.ts.map +1 -0
- package/dist/auth/email-flows/confirm-reset.d.ts +16 -0
- package/dist/auth/email-flows/confirm-reset.d.ts.map +1 -0
- package/dist/auth/email-flows/email-token.d.ts +30 -0
- package/dist/auth/email-flows/email-token.d.ts.map +1 -0
- package/dist/auth/email-flows/flows.d.ts +13 -0
- package/dist/auth/email-flows/flows.d.ts.map +1 -0
- package/dist/auth/email-flows/index.d.ts +10 -0
- package/dist/auth/email-flows/index.d.ts.map +1 -0
- package/dist/auth/email-flows/owner-of.d.ts +17 -0
- package/dist/auth/email-flows/owner-of.d.ts.map +1 -0
- package/dist/auth/email-flows/prove-first.d.ts +45 -0
- package/dist/auth/email-flows/prove-first.d.ts.map +1 -0
- package/dist/auth/email-flows/reset-password.d.ts +17 -0
- package/dist/auth/email-flows/reset-password.d.ts.map +1 -0
- package/dist/auth/email-flows/set-email-verified.d.ts +19 -0
- package/dist/auth/email-flows/set-email-verified.d.ts.map +1 -0
- package/dist/auth/email-flows/verify-email.d.ts +25 -0
- package/dist/auth/email-flows/verify-email.d.ts.map +1 -0
- package/dist/auth/email-sign-in.d.ts +51 -0
- package/dist/auth/email-sign-in.d.ts.map +1 -0
- package/dist/auth/events.d.ts +166 -0
- package/dist/auth/events.d.ts.map +1 -0
- package/dist/auth/first-proof.d.ts +43 -0
- package/dist/auth/first-proof.d.ts.map +1 -0
- package/dist/auth/hashers.d.ts +52 -0
- package/dist/auth/hashers.d.ts.map +1 -0
- package/dist/auth/index.d.ts +22 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/invitations/accept.d.ts +10 -0
- package/dist/auth/invitations/accept.d.ts.map +1 -0
- package/dist/auth/invitations/change-pending.d.ts +17 -0
- package/dist/auth/invitations/change-pending.d.ts.map +1 -0
- package/dist/auth/invitations/claim.d.ts +31 -0
- package/dist/auth/invitations/claim.d.ts.map +1 -0
- package/dist/auth/invitations/events.d.ts +46 -0
- package/dist/auth/invitations/events.d.ts.map +1 -0
- package/dist/auth/invitations/find-invitee.d.ts +20 -0
- package/dist/auth/invitations/find-invitee.d.ts.map +1 -0
- package/dist/auth/invitations/find-pending.d.ts +5 -0
- package/dist/auth/invitations/find-pending.d.ts.map +1 -0
- package/dist/auth/invitations/flows.d.ts +7 -0
- package/dist/auth/invitations/flows.d.ts.map +1 -0
- package/dist/auth/invitations/history-input.d.ts +29 -0
- package/dist/auth/invitations/history-input.d.ts.map +1 -0
- package/dist/auth/invitations/history.d.ts +10 -0
- package/dist/auth/invitations/history.d.ts.map +1 -0
- package/dist/auth/invitations/index.d.ts +11 -0
- package/dist/auth/invitations/index.d.ts.map +1 -0
- package/dist/auth/invitations/input.d.ts +30 -0
- package/dist/auth/invitations/input.d.ts.map +1 -0
- package/dist/auth/invitations/invited-type.d.ts +22 -0
- package/dist/auth/invitations/invited-type.d.ts.map +1 -0
- package/dist/auth/invitations/invitee.d.ts +11 -0
- package/dist/auth/invitations/invitee.d.ts.map +1 -0
- package/dist/auth/invitations/issue.d.ts +9 -0
- package/dist/auth/invitations/issue.d.ts.map +1 -0
- package/dist/auth/invitations/limit.d.ts +7 -0
- package/dist/auth/invitations/limit.d.ts.map +1 -0
- package/dist/auth/invitations/password-invitee.d.ts +18 -0
- package/dist/auth/invitations/password-invitee.d.ts.map +1 -0
- package/dist/auth/invitations/passwordless-invitee.d.ts +13 -0
- package/dist/auth/invitations/passwordless-invitee.d.ts.map +1 -0
- package/dist/auth/invitations/preview.d.ts +8 -0
- package/dist/auth/invitations/preview.d.ts.map +1 -0
- package/dist/auth/invitations/read.d.ts +10 -0
- package/dist/auth/invitations/read.d.ts.map +1 -0
- package/dist/auth/invitations/resend.d.ts +12 -0
- package/dist/auth/invitations/resend.d.ts.map +1 -0
- package/dist/auth/invitations/to-invitation.d.ts +11 -0
- package/dist/auth/invitations/to-invitation.d.ts.map +1 -0
- package/dist/auth/invitations/write.d.ts +17 -0
- package/dist/auth/invitations/write.d.ts.map +1 -0
- package/dist/auth/issuers/cache.d.ts +21 -0
- package/dist/auth/issuers/cache.d.ts.map +1 -0
- package/dist/auth/issuers/create.d.ts +18 -0
- package/dist/auth/issuers/create.d.ts.map +1 -0
- package/dist/auth/issuers/index.d.ts +3 -0
- package/dist/auth/issuers/index.d.ts.map +1 -0
- package/dist/auth/issuers/types.d.ts +45 -0
- package/dist/auth/issuers/types.d.ts.map +1 -0
- package/dist/auth/janus.d.ts +39 -0
- package/dist/auth/janus.d.ts.map +1 -0
- package/dist/auth/magic-link.d.ts +25 -0
- package/dist/auth/magic-link.d.ts.map +1 -0
- package/dist/auth/mail-requests.d.ts +55 -0
- package/dist/auth/mail-requests.d.ts.map +1 -0
- package/dist/auth/one-time/codes.d.ts +46 -0
- package/dist/auth/one-time/codes.d.ts.map +1 -0
- package/dist/auth/one-time/index.d.ts +15 -0
- package/dist/auth/one-time/index.d.ts.map +1 -0
- package/dist/auth/one-time/issue.d.ts +45 -0
- package/dist/auth/one-time/issue.d.ts.map +1 -0
- package/dist/auth/one-time/refusals.d.ts +26 -0
- package/dist/auth/one-time/refusals.d.ts.map +1 -0
- package/dist/auth/one-time/spend.d.ts +24 -0
- package/dist/auth/one-time/spend.d.ts.map +1 -0
- package/dist/auth/one-time/window.d.ts +50 -0
- package/dist/auth/one-time/window.d.ts.map +1 -0
- package/dist/auth/outage.d.ts +66 -0
- package/dist/auth/outage.d.ts.map +1 -0
- package/dist/auth/parse-sealing-keys.d.ts +26 -0
- package/dist/auth/parse-sealing-keys.d.ts.map +1 -0
- package/dist/auth/passkeys/assert.d.ts +51 -0
- package/dist/auth/passkeys/assert.d.ts.map +1 -0
- package/dist/auth/passkeys/assertion-options.d.ts +9 -0
- package/dist/auth/passkeys/assertion-options.d.ts.map +1 -0
- package/dist/auth/passkeys/challenge.d.ts +19 -0
- package/dist/auth/passkeys/challenge.d.ts.map +1 -0
- package/dist/auth/passkeys/commit.d.ts +33 -0
- package/dist/auth/passkeys/commit.d.ts.map +1 -0
- package/dist/auth/passkeys/flows.d.ts +13 -0
- package/dist/auth/passkeys/flows.d.ts.map +1 -0
- package/dist/auth/passkeys/index.d.ts +12 -0
- package/dist/auth/passkeys/index.d.ts.map +1 -0
- package/dist/auth/passkeys/manage.d.ts +11 -0
- package/dist/auth/passkeys/manage.d.ts.map +1 -0
- package/dist/auth/passkeys/name.d.ts +4 -0
- package/dist/auth/passkeys/name.d.ts.map +1 -0
- package/dist/auth/passkeys/register.d.ts +20 -0
- package/dist/auth/passkeys/register.d.ts.map +1 -0
- package/dist/auth/passkeys/registration-options.d.ts +22 -0
- package/dist/auth/passkeys/registration-options.d.ts.map +1 -0
- package/dist/auth/passkeys/remove-all.d.ts +26 -0
- package/dist/auth/passkeys/remove-all.d.ts.map +1 -0
- package/dist/auth/passkeys/sign-in-options.d.ts +12 -0
- package/dist/auth/passkeys/sign-in-options.d.ts.map +1 -0
- package/dist/auth/passkeys/sign-in.d.ts +21 -0
- package/dist/auth/passkeys/sign-in.d.ts.map +1 -0
- package/dist/auth/passkeys/verifier.d.ts +113 -0
- package/dist/auth/passkeys/verifier.d.ts.map +1 -0
- package/dist/auth/passkeys/view.d.ts +5 -0
- package/dist/auth/passkeys/view.d.ts.map +1 -0
- package/dist/auth/passkeys/wiring.d.ts +24 -0
- package/dist/auth/passkeys/wiring.d.ts.map +1 -0
- package/dist/auth/password-written.d.ts +55 -0
- package/dist/auth/password-written.d.ts.map +1 -0
- package/dist/auth/port/assert-api-keys.d.ts +21 -0
- package/dist/auth/port/assert-api-keys.d.ts.map +1 -0
- package/dist/auth/port/assert-invitations.d.ts +15 -0
- package/dist/auth/port/assert-invitations.d.ts.map +1 -0
- package/dist/auth/port/assert-stores.d.ts +16 -0
- package/dist/auth/port/assert-stores.d.ts.map +1 -0
- package/dist/auth/port/memory/api-keys/capabilities.d.ts +8 -0
- package/dist/auth/port/memory/api-keys/capabilities.d.ts.map +1 -0
- package/dist/auth/port/memory/api-keys/index.d.ts +13 -0
- package/dist/auth/port/memory/api-keys/index.d.ts.map +1 -0
- package/dist/auth/port/memory/api-keys/pages.d.ts +7 -0
- package/dist/auth/port/memory/api-keys/pages.d.ts.map +1 -0
- package/dist/auth/port/memory/copy.d.ts +6 -0
- package/dist/auth/port/memory/copy.d.ts.map +1 -0
- package/dist/auth/port/memory/index.d.ts +10 -0
- package/dist/auth/port/memory/index.d.ts.map +1 -0
- package/dist/auth/port/memory/invitations-pending.d.ts +6 -0
- package/dist/auth/port/memory/invitations-pending.d.ts.map +1 -0
- package/dist/auth/port/memory/invitations.d.ts +12 -0
- package/dist/auth/port/memory/invitations.d.ts.map +1 -0
- package/dist/auth/port/memory/passkeys.d.ts +9 -0
- package/dist/auth/port/memory/passkeys.d.ts.map +1 -0
- package/dist/auth/port/memory/sessions.d.ts +4 -0
- package/dist/auth/port/memory/sessions.d.ts.map +1 -0
- package/dist/auth/port/memory/social-links.d.ts +10 -0
- package/dist/auth/port/memory/social-links.d.ts.map +1 -0
- package/dist/auth/port/memory/stores.d.ts +26 -0
- package/dist/auth/port/memory/stores.d.ts.map +1 -0
- package/dist/auth/port/memory/tokens.d.ts +4 -0
- package/dist/auth/port/memory/tokens.d.ts.map +1 -0
- package/dist/auth/port/memory/user-index.d.ts +20 -0
- package/dist/auth/port/memory/user-index.d.ts.map +1 -0
- package/dist/auth/port/memory/user-update.d.ts +10 -0
- package/dist/auth/port/memory/user-update.d.ts.map +1 -0
- package/dist/auth/port/memory/users.d.ts +4 -0
- package/dist/auth/port/memory/users.d.ts.map +1 -0
- package/dist/auth/port/types/api-keys.d.ts +199 -0
- package/dist/auth/port/types/api-keys.d.ts.map +1 -0
- package/dist/auth/port/types/credentials.d.ts +46 -0
- package/dist/auth/port/types/credentials.d.ts.map +1 -0
- package/dist/auth/port/types/index.d.ts +75 -0
- package/dist/auth/port/types/index.d.ts.map +1 -0
- package/dist/auth/port/types/invitations/index.d.ts +15 -0
- package/dist/auth/port/types/invitations/index.d.ts.map +1 -0
- package/dist/auth/port/types/invitations/page.d.ts +52 -0
- package/dist/auth/port/types/invitations/page.d.ts.map +1 -0
- package/dist/auth/port/types/invitations/records.d.ts +101 -0
- package/dist/auth/port/types/invitations/records.d.ts.map +1 -0
- package/dist/auth/port/types/invitations/store.d.ts +82 -0
- package/dist/auth/port/types/invitations/store.d.ts.map +1 -0
- package/dist/auth/port/types/json.d.ts +27 -0
- package/dist/auth/port/types/json.d.ts.map +1 -0
- package/dist/auth/port/types/passkeys.d.ts +94 -0
- package/dist/auth/port/types/passkeys.d.ts.map +1 -0
- package/dist/auth/port/types/sessions.d.ts +142 -0
- package/dist/auth/port/types/sessions.d.ts.map +1 -0
- package/dist/auth/port/types/social-links.d.ts +64 -0
- package/dist/auth/port/types/social-links.d.ts.map +1 -0
- package/dist/auth/port/types/stores.d.ts +48 -0
- package/dist/auth/port/types/stores.d.ts.map +1 -0
- package/dist/auth/port/types/tokens.d.ts +168 -0
- package/dist/auth/port/types/tokens.d.ts.map +1 -0
- package/dist/auth/port/types/users.d.ts +260 -0
- package/dist/auth/port/types/users.d.ts.map +1 -0
- package/dist/auth/prepared.d.ts +21 -0
- package/dist/auth/prepared.d.ts.map +1 -0
- package/dist/auth/proven-sign-in.d.ts +22 -0
- package/dist/auth/proven-sign-in.d.ts.map +1 -0
- package/dist/auth/sealer-for.d.ts +44 -0
- package/dist/auth/sealer-for.d.ts.map +1 -0
- package/dist/auth/sealing.d.ts +36 -0
- package/dist/auth/sealing.d.ts.map +1 -0
- package/dist/auth/second-factor/activate.d.ts +9 -0
- package/dist/auth/second-factor/activate.d.ts.map +1 -0
- package/dist/auth/second-factor/app-code-attempts.d.ts +47 -0
- package/dist/auth/second-factor/app-code-attempts.d.ts.map +1 -0
- package/dist/auth/second-factor/challenge.d.ts +15 -0
- package/dist/auth/second-factor/challenge.d.ts.map +1 -0
- package/dist/auth/second-factor/codes-left.d.ts +14 -0
- package/dist/auth/second-factor/codes-left.d.ts.map +1 -0
- package/dist/auth/second-factor/disable.d.ts +10 -0
- package/dist/auth/second-factor/disable.d.ts.map +1 -0
- package/dist/auth/second-factor/enroll.d.ts +6 -0
- package/dist/auth/second-factor/enroll.d.ts.map +1 -0
- package/dist/auth/second-factor/factor.d.ts +33 -0
- package/dist/auth/second-factor/factor.d.ts.map +1 -0
- package/dist/auth/second-factor/flows.d.ts +36 -0
- package/dist/auth/second-factor/flows.d.ts.map +1 -0
- package/dist/auth/second-factor/lifecycle.d.ts +14 -0
- package/dist/auth/second-factor/lifecycle.d.ts.map +1 -0
- package/dist/auth/second-factor/passkey-confirm.d.ts +21 -0
- package/dist/auth/second-factor/passkey-confirm.d.ts.map +1 -0
- package/dist/auth/second-factor/recovery-codes.d.ts +36 -0
- package/dist/auth/second-factor/recovery-codes.d.ts.map +1 -0
- package/dist/auth/second-factor/recovery.d.ts +20 -0
- package/dist/auth/second-factor/recovery.d.ts.map +1 -0
- package/dist/auth/second-factor/redeem.d.ts +42 -0
- package/dist/auth/second-factor/redeem.d.ts.map +1 -0
- package/dist/auth/second-factor/refusal.d.ts +6 -0
- package/dist/auth/second-factor/refusal.d.ts.map +1 -0
- package/dist/auth/second-factor/regenerate.d.ts +12 -0
- package/dist/auth/second-factor/regenerate.d.ts.map +1 -0
- package/dist/auth/second-factor/reseal.d.ts +17 -0
- package/dist/auth/second-factor/reseal.d.ts.map +1 -0
- package/dist/auth/second-factor/spend-recovery-code.d.ts +15 -0
- package/dist/auth/second-factor/spend-recovery-code.d.ts.map +1 -0
- package/dist/auth/secrets.d.ts +17 -0
- package/dist/auth/secrets.d.ts.map +1 -0
- package/dist/auth/sessions/amr.d.ts +36 -0
- package/dist/auth/sessions/amr.d.ts.map +1 -0
- package/dist/auth/sessions/authenticate.d.ts +12 -0
- package/dist/auth/sessions/authenticate.d.ts.map +1 -0
- package/dist/auth/sessions/collect-expired.d.ts +15 -0
- package/dist/auth/sessions/collect-expired.d.ts.map +1 -0
- package/dist/auth/sessions/cookie.d.ts +9 -0
- package/dist/auth/sessions/cookie.d.ts.map +1 -0
- package/dist/auth/sessions/fresh.d.ts +35 -0
- package/dist/auth/sessions/fresh.d.ts.map +1 -0
- package/dist/auth/sessions/index.d.ts +12 -0
- package/dist/auth/sessions/index.d.ts.map +1 -0
- package/dist/auth/sessions/open-session.d.ts +22 -0
- package/dist/auth/sessions/open-session.d.ts.map +1 -0
- package/dist/auth/sessions/presented-token.d.ts +25 -0
- package/dist/auth/sessions/presented-token.d.ts.map +1 -0
- package/dist/auth/sessions/shared-api.d.ts +17 -0
- package/dist/auth/sessions/shared-api.d.ts.map +1 -0
- package/dist/auth/sessions/standing.d.ts +32 -0
- package/dist/auth/sessions/standing.d.ts.map +1 -0
- package/dist/auth/shared-api.d.ts +139 -0
- package/dist/auth/shared-api.d.ts.map +1 -0
- package/dist/auth/sign-in-attempts.d.ts +45 -0
- package/dist/auth/sign-in-attempts.d.ts.map +1 -0
- package/dist/auth/sign-in-code.d.ts +26 -0
- package/dist/auth/sign-in-code.d.ts.map +1 -0
- package/dist/auth/social/attach.d.ts +31 -0
- package/dist/auth/social/attach.d.ts.map +1 -0
- package/dist/auth/social/begin.d.ts +30 -0
- package/dist/auth/social/begin.d.ts.map +1 -0
- package/dist/auth/social/complete-link.d.ts +17 -0
- package/dist/auth/social/complete-link.d.ts.map +1 -0
- package/dist/auth/social/complete.d.ts +54 -0
- package/dist/auth/social/complete.d.ts.map +1 -0
- package/dist/auth/social/cookie.d.ts +16 -0
- package/dist/auth/social/cookie.d.ts.map +1 -0
- package/dist/auth/social/find-provider.d.ts +23 -0
- package/dist/auth/social/find-provider.d.ts.map +1 -0
- package/dist/auth/social/finish.d.ts +60 -0
- package/dist/auth/social/finish.d.ts.map +1 -0
- package/dist/auth/social/flow-cookie-value.d.ts +26 -0
- package/dist/auth/social/flow-cookie-value.d.ts.map +1 -0
- package/dist/auth/social/flow-secret.d.ts +40 -0
- package/dist/auth/social/flow-secret.d.ts.map +1 -0
- package/dist/auth/social/index.d.ts +19 -0
- package/dist/auth/social/index.d.ts.map +1 -0
- package/dist/auth/social/link-holder.d.ts +33 -0
- package/dist/auth/social/link-holder.d.ts.map +1 -0
- package/dist/auth/social/provider-call.d.ts +31 -0
- package/dist/auth/social/provider-call.d.ts.map +1 -0
- package/dist/auth/social/redeem.d.ts +45 -0
- package/dist/auth/social/redeem.d.ts.map +1 -0
- package/dist/auth/social/return-to.d.ts +18 -0
- package/dist/auth/social/return-to.d.ts.map +1 -0
- package/dist/auth/social/sign-in.d.ts +41 -0
- package/dist/auth/social/sign-in.d.ts.map +1 -0
- package/dist/auth/social/sign-up.d.ts +37 -0
- package/dist/auth/social/sign-up.d.ts.map +1 -0
- package/dist/auth/social/start.d.ts +21 -0
- package/dist/auth/social/start.d.ts.map +1 -0
- package/dist/auth/social/step-up-proof.d.ts +26 -0
- package/dist/auth/social/step-up-proof.d.ts.map +1 -0
- package/dist/auth/social/step-up-request.d.ts +28 -0
- package/dist/auth/social/step-up-request.d.ts.map +1 -0
- package/dist/auth/social/step-up.d.ts +19 -0
- package/dist/auth/social/step-up.d.ts.map +1 -0
- package/dist/auth/social/types-of.d.ts +12 -0
- package/dist/auth/social/types-of.d.ts.map +1 -0
- package/dist/auth/social/unlink.d.ts +16 -0
- package/dist/auth/social/unlink.d.ts.map +1 -0
- package/dist/auth/social/wiring.d.ts +10 -0
- package/dist/auth/social/wiring.d.ts.map +1 -0
- package/dist/auth/standard-schema.d.ts +41 -0
- package/dist/auth/standard-schema.d.ts.map +1 -0
- package/dist/auth/step-up/codes.d.ts +35 -0
- package/dist/auth/step-up/codes.d.ts.map +1 -0
- package/dist/auth/step-up/flows.d.ts +18 -0
- package/dist/auth/step-up/flows.d.ts.map +1 -0
- package/dist/auth/step-up/open.d.ts +23 -0
- package/dist/auth/step-up/open.d.ts.map +1 -0
- package/dist/auth/step-up/passkey.d.ts +31 -0
- package/dist/auth/step-up/passkey.d.ts.map +1 -0
- package/dist/auth/step-up/request.d.ts +15 -0
- package/dist/auth/step-up/request.d.ts.map +1 -0
- package/dist/auth/step-up/spend.d.ts +4 -0
- package/dist/auth/step-up/spend.d.ts.map +1 -0
- package/dist/auth/totp.d.ts +36 -0
- package/dist/auth/totp.d.ts.map +1 -0
- package/dist/auth/types/api-keys-of.d.ts +19 -0
- package/dist/auth/types/api-keys-of.d.ts.map +1 -0
- package/dist/auth/types/api-keys.d.ts +164 -0
- package/dist/auth/types/api-keys.d.ts.map +1 -0
- package/dist/auth/types/avatar.d.ts +72 -0
- package/dist/auth/types/avatar.d.ts.map +1 -0
- package/dist/auth/types/change-email.d.ts +82 -0
- package/dist/auth/types/change-email.d.ts.map +1 -0
- package/dist/auth/types/checks.d.ts +147 -0
- package/dist/auth/types/checks.d.ts.map +1 -0
- package/dist/auth/types/email-flows.d.ts +117 -0
- package/dist/auth/types/email-flows.d.ts.map +1 -0
- package/dist/auth/types/find-by-email.d.ts +31 -0
- package/dist/auth/types/find-by-email.d.ts.map +1 -0
- package/dist/auth/types/find-or-create.d.ts +59 -0
- package/dist/auth/types/find-or-create.d.ts.map +1 -0
- package/dist/auth/types/index.d.ts +38 -0
- package/dist/auth/types/index.d.ts.map +1 -0
- package/dist/auth/types/inference.d.ts +62 -0
- package/dist/auth/types/inference.d.ts.map +1 -0
- package/dist/auth/types/invitations/api.d.ts +203 -0
- package/dist/auth/types/invitations/api.d.ts.map +1 -0
- package/dist/auth/types/invitations/history.d.ts +87 -0
- package/dist/auth/types/invitations/history.d.ts.map +1 -0
- package/dist/auth/types/invitations/index.d.ts +10 -0
- package/dist/auth/types/invitations/index.d.ts.map +1 -0
- package/dist/auth/types/invitations/invitation.d.ts +76 -0
- package/dist/auth/types/invitations/invitation.d.ts.map +1 -0
- package/dist/auth/types/invitations/issue-type.d.ts +15 -0
- package/dist/auth/types/invitations/issue-type.d.ts.map +1 -0
- package/dist/auth/types/invitations-of.d.ts +26 -0
- package/dist/auth/types/invitations-of.d.ts.map +1 -0
- package/dist/auth/types/janus.d.ts +51 -0
- package/dist/auth/types/janus.d.ts.map +1 -0
- package/dist/auth/types/magic-link.d.ts +69 -0
- package/dist/auth/types/magic-link.d.ts.map +1 -0
- package/dist/auth/types/passkeys.d.ts +183 -0
- package/dist/auth/types/passkeys.d.ts.map +1 -0
- package/dist/auth/types/password.d.ts +113 -0
- package/dist/auth/types/password.d.ts.map +1 -0
- package/dist/auth/types/prepared.d.ts +68 -0
- package/dist/auth/types/prepared.d.ts.map +1 -0
- package/dist/auth/types/proven-sign-in.d.ts +43 -0
- package/dist/auth/types/proven-sign-in.d.ts.map +1 -0
- package/dist/auth/types/reset-password.d.ts +46 -0
- package/dist/auth/types/reset-password.d.ts.map +1 -0
- package/dist/auth/types/second-factor.d.ts +164 -0
- package/dist/auth/types/second-factor.d.ts.map +1 -0
- package/dist/auth/types/session.d.ts +68 -0
- package/dist/auth/types/session.d.ts.map +1 -0
- package/dist/auth/types/shared-api.d.ts +96 -0
- package/dist/auth/types/shared-api.d.ts.map +1 -0
- package/dist/auth/types/sign-in.d.ts +102 -0
- package/dist/auth/types/sign-in.d.ts.map +1 -0
- package/dist/auth/types/social-flow.d.ts +28 -0
- package/dist/auth/types/social-flow.d.ts.map +1 -0
- package/dist/auth/types/social-step-up.d.ts +38 -0
- package/dist/auth/types/social-step-up.d.ts.map +1 -0
- package/dist/auth/types/social.d.ts +193 -0
- package/dist/auth/types/social.d.ts.map +1 -0
- package/dist/auth/types/step-up.d.ts +133 -0
- package/dist/auth/types/step-up.d.ts.map +1 -0
- package/dist/auth/types/type-api.d.ts +29 -0
- package/dist/auth/types/type-api.d.ts.map +1 -0
- package/dist/auth/types/user-type.d.ts +106 -0
- package/dist/auth/types/user-type.d.ts.map +1 -0
- package/dist/auth/types/user.d.ts +62 -0
- package/dist/auth/types/user.d.ts.map +1 -0
- package/dist/auth/types/verify-email.d.ts +190 -0
- package/dist/auth/types/verify-email.d.ts.map +1 -0
- package/dist/auth/users/any-type-api.d.ts +6 -0
- package/dist/auth/users/any-type-api.d.ts.map +1 -0
- package/dist/auth/users/by-login.d.ts +10 -0
- package/dist/auth/users/by-login.d.ts.map +1 -0
- package/dist/auth/users/change-password.d.ts +26 -0
- package/dist/auth/users/change-password.d.ts.map +1 -0
- package/dist/auth/users/delete.d.ts +10 -0
- package/dist/auth/users/delete.d.ts.map +1 -0
- package/dist/auth/users/email-move-guard.d.ts +20 -0
- package/dist/auth/users/email-move-guard.d.ts.map +1 -0
- package/dist/auth/users/email-prefix.d.ts +23 -0
- package/dist/auth/users/email-prefix.d.ts.map +1 -0
- package/dist/auth/users/fields-patch.d.ts +21 -0
- package/dist/auth/users/fields-patch.d.ts.map +1 -0
- package/dist/auth/users/find-by-email.d.ts +11 -0
- package/dist/auth/users/find-by-email.d.ts.map +1 -0
- package/dist/auth/users/find-many.d.ts +29 -0
- package/dist/auth/users/find-many.d.ts.map +1 -0
- package/dist/auth/users/find-or-create.d.ts +12 -0
- package/dist/auth/users/find-or-create.d.ts.map +1 -0
- package/dist/auth/users/flow-types.d.ts +15 -0
- package/dist/auth/users/flow-types.d.ts.map +1 -0
- package/dist/auth/users/index.d.ts +9 -0
- package/dist/auth/users/index.d.ts.map +1 -0
- package/dist/auth/users/insert.d.ts +15 -0
- package/dist/auth/users/insert.d.ts.map +1 -0
- package/dist/auth/users/name-prefix.d.ts +19 -0
- package/dist/auth/users/name-prefix.d.ts.map +1 -0
- package/dist/auth/users/password-flows.d.ts +11 -0
- package/dist/auth/users/password-flows.d.ts.map +1 -0
- package/dist/auth/users/record-flows.d.ts +11 -0
- package/dist/auth/users/record-flows.d.ts.map +1 -0
- package/dist/auth/users/sign-in.d.ts +24 -0
- package/dist/auth/users/sign-in.d.ts.map +1 -0
- package/dist/auth/users/sign-up.d.ts +13 -0
- package/dist/auth/users/sign-up.d.ts.map +1 -0
- package/dist/auth/users/type-api.d.ts +10 -0
- package/dist/auth/users/type-api.d.ts.map +1 -0
- package/dist/auth/users/update.d.ts +16 -0
- package/dist/auth/users/update.d.ts.map +1 -0
- package/dist/background/background.d.ts +22 -0
- package/dist/background/background.d.ts.map +1 -0
- package/dist/chunks/index-2ttdcz7n.js +354 -0
- package/dist/chunks/index-2ttdcz7n.js.map +16 -0
- package/dist/chunks/index-5dxynm32.js +85 -0
- package/dist/chunks/index-5dxynm32.js.map +10 -0
- package/dist/chunks/index-ftz0ne6j.js +127 -0
- package/dist/chunks/index-ftz0ne6j.js.map +11 -0
- package/dist/chunks/index-k6y18nx9.js +724 -0
- package/dist/chunks/index-k6y18nx9.js.map +24 -0
- package/dist/chunks/index-n8jxmxeg.js +64 -0
- package/dist/chunks/index-n8jxmxeg.js.map +11 -0
- package/dist/conformance/api-keys/cases/bound.d.ts +3 -0
- package/dist/conformance/api-keys/cases/bound.d.ts.map +1 -0
- package/dist/conformance/api-keys/cases/expiry.d.ts +3 -0
- package/dist/conformance/api-keys/cases/expiry.d.ts.map +1 -0
- package/dist/conformance/api-keys/cases/index.d.ts +4 -0
- package/dist/conformance/api-keys/cases/index.d.ts.map +1 -0
- package/dist/conformance/api-keys/cases/insert.d.ts +3 -0
- package/dist/conformance/api-keys/cases/insert.d.ts.map +1 -0
- package/dist/conformance/api-keys/cases/outage.d.ts +3 -0
- package/dist/conformance/api-keys/cases/outage.d.ts.map +1 -0
- package/dist/conformance/api-keys/cases/revoke.d.ts +3 -0
- package/dist/conformance/api-keys/cases/revoke.d.ts.map +1 -0
- package/dist/conformance/api-keys/cases/touch.d.ts +3 -0
- package/dist/conformance/api-keys/cases/touch.d.ts.map +1 -0
- package/dist/conformance/api-keys/cases/user-bound.d.ts +3 -0
- package/dist/conformance/api-keys/cases/user-bound.d.ts.map +1 -0
- package/dist/conformance/api-keys/describe.d.ts +20 -0
- package/dist/conformance/api-keys/describe.d.ts.map +1 -0
- package/dist/conformance/api-keys/fixtures.d.ts +4 -0
- package/dist/conformance/api-keys/fixtures.d.ts.map +1 -0
- package/dist/conformance/api-keys/index.d.ts +18 -0
- package/dist/conformance/api-keys/index.d.ts.map +1 -0
- package/dist/conformance/api-keys/reference.d.ts +4 -0
- package/dist/conformance/api-keys/reference.d.ts.map +1 -0
- package/dist/conformance/api-keys/types.d.ts +42 -0
- package/dist/conformance/api-keys/types.d.ts.map +1 -0
- package/dist/conformance/assert.d.ts +40 -0
- package/dist/conformance/assert.d.ts.map +1 -0
- package/dist/conformance/cases/outage.d.ts +3 -0
- package/dist/conformance/cases/outage.d.ts.map +1 -0
- package/dist/conformance/cases/outage.passkeys.d.ts +12 -0
- package/dist/conformance/cases/outage.passkeys.d.ts.map +1 -0
- package/dist/conformance/cases/passkeys/deletion.d.ts +4 -0
- package/dist/conformance/cases/passkeys/deletion.d.ts.map +1 -0
- package/dist/conformance/cases/passkeys/index.d.ts +8 -0
- package/dist/conformance/cases/passkeys/index.d.ts.map +1 -0
- package/dist/conformance/cases/passkeys/inserts.d.ts +4 -0
- package/dist/conformance/cases/passkeys/inserts.d.ts.map +1 -0
- package/dist/conformance/cases/passkeys/reads.d.ts +4 -0
- package/dist/conformance/cases/passkeys/reads.d.ts.map +1 -0
- package/dist/conformance/cases/passkeys/uses.d.ts +4 -0
- package/dist/conformance/cases/passkeys/uses.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/deletion.d.ts +4 -0
- package/dist/conformance/cases/sessions/deletion.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/extension.d.ts +4 -0
- package/dist/conformance/cases/sessions/extension.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/index.d.ts +4 -0
- package/dist/conformance/cases/sessions/index.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/inserts.d.ts +4 -0
- package/dist/conformance/cases/sessions/inserts.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/list.d.ts +4 -0
- package/dist/conformance/cases/sessions/list.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/reads.d.ts +4 -0
- package/dist/conformance/cases/sessions/reads.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/reauthentication.d.ts +4 -0
- package/dist/conformance/cases/sessions/reauthentication.d.ts.map +1 -0
- package/dist/conformance/cases/sessions/revocation.d.ts +4 -0
- package/dist/conformance/cases/sessions/revocation.d.ts.map +1 -0
- package/dist/conformance/cases/social-links/deletion.d.ts +4 -0
- package/dist/conformance/cases/social-links/deletion.d.ts.map +1 -0
- package/dist/conformance/cases/social-links/index.d.ts +8 -0
- package/dist/conformance/cases/social-links/index.d.ts.map +1 -0
- package/dist/conformance/cases/social-links/inserts.d.ts +4 -0
- package/dist/conformance/cases/social-links/inserts.d.ts.map +1 -0
- package/dist/conformance/cases/social-links/reads.d.ts +4 -0
- package/dist/conformance/cases/social-links/reads.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/attempts.d.ts +7 -0
- package/dist/conformance/cases/tokens/attempts.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/change-email.d.ts +8 -0
- package/dist/conformance/cases/tokens/change-email.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/deletion.d.ts +4 -0
- package/dist/conformance/cases/tokens/deletion.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/index.d.ts +4 -0
- package/dist/conformance/cases/tokens/index.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/inserts.d.ts +7 -0
- package/dist/conformance/cases/tokens/inserts.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/kinds.d.ts +7 -0
- package/dist/conformance/cases/tokens/kinds.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/redemption.d.ts +7 -0
- package/dist/conformance/cases/tokens/redemption.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/social-flow.d.ts +8 -0
- package/dist/conformance/cases/tokens/social-flow.d.ts.map +1 -0
- package/dist/conformance/cases/tokens/spending.d.ts +7 -0
- package/dist/conformance/cases/tokens/spending.d.ts.map +1 -0
- package/dist/conformance/cases/users/avatar.d.ts +8 -0
- package/dist/conformance/cases/users/avatar.d.ts.map +1 -0
- package/dist/conformance/cases/users/batch.d.ts +8 -0
- package/dist/conformance/cases/users/batch.d.ts.map +1 -0
- package/dist/conformance/cases/users/deletion.d.ts +4 -0
- package/dist/conformance/cases/users/deletion.d.ts.map +1 -0
- package/dist/conformance/cases/users/index.d.ts +4 -0
- package/dist/conformance/cases/users/index.d.ts.map +1 -0
- package/dist/conformance/cases/users/inserts.d.ts +4 -0
- package/dist/conformance/cases/users/inserts.d.ts.map +1 -0
- package/dist/conformance/cases/users/listing.d.ts +4 -0
- package/dist/conformance/cases/users/listing.d.ts.map +1 -0
- package/dist/conformance/cases/users/patches.d.ts +7 -0
- package/dist/conformance/cases/users/patches.d.ts.map +1 -0
- package/dist/conformance/cases/users/reads.d.ts +7 -0
- package/dist/conformance/cases/users/reads.d.ts.map +1 -0
- package/dist/conformance/cases/users/second-factor.d.ts +16 -0
- package/dist/conformance/cases/users/second-factor.d.ts.map +1 -0
- package/dist/conformance/cases/users/versions.d.ts +7 -0
- package/dist/conformance/cases/users/versions.d.ts.map +1 -0
- package/dist/conformance/describe.d.ts +82 -0
- package/dist/conformance/describe.d.ts.map +1 -0
- package/dist/conformance/fixtures.d.ts +31 -0
- package/dist/conformance/fixtures.d.ts.map +1 -0
- package/dist/conformance/index.d.ts +46 -0
- package/dist/conformance/index.d.ts.map +1 -0
- package/dist/conformance/index.js +4411 -0
- package/dist/conformance/index.js.map +86 -0
- package/dist/conformance/invitations/cases/actors.d.ts +3 -0
- package/dist/conformance/invitations/cases/actors.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/find-pending.d.ts +3 -0
- package/dist/conformance/invitations/cases/find-pending.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/imported.d.ts +3 -0
- package/dist/conformance/invitations/cases/imported.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/index.d.ts +4 -0
- package/dist/conformance/invitations/cases/index.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/insert.d.ts +3 -0
- package/dist/conformance/invitations/cases/insert.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/list-lapsed.d.ts +3 -0
- package/dist/conformance/invitations/cases/list-lapsed.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/list-status.d.ts +3 -0
- package/dist/conformance/invitations/cases/list-status.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/list.d.ts +3 -0
- package/dist/conformance/invitations/cases/list.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/outage.d.ts +3 -0
- package/dist/conformance/invitations/cases/outage.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/scope.d.ts +3 -0
- package/dist/conformance/invitations/cases/scope.d.ts.map +1 -0
- package/dist/conformance/invitations/cases/update.d.ts +3 -0
- package/dist/conformance/invitations/cases/update.d.ts.map +1 -0
- package/dist/conformance/invitations/describe.d.ts +20 -0
- package/dist/conformance/invitations/describe.d.ts.map +1 -0
- package/dist/conformance/invitations/fixtures.d.ts +4 -0
- package/dist/conformance/invitations/fixtures.d.ts.map +1 -0
- package/dist/conformance/invitations/index.d.ts +18 -0
- package/dist/conformance/invitations/index.d.ts.map +1 -0
- package/dist/conformance/invitations/reference.d.ts +4 -0
- package/dist/conformance/invitations/reference.d.ts.map +1 -0
- package/dist/conformance/invitations/types.d.ts +34 -0
- package/dist/conformance/invitations/types.d.ts.map +1 -0
- package/dist/conformance/reference.d.ts +13 -0
- package/dist/conformance/reference.d.ts.map +1 -0
- package/dist/conformance/relations/cases/deletion.d.ts +4 -0
- package/dist/conformance/relations/cases/deletion.d.ts.map +1 -0
- package/dist/conformance/relations/cases/holders.d.ts +9 -0
- package/dist/conformance/relations/cases/holders.d.ts.map +1 -0
- package/dist/conformance/relations/cases/index.d.ts +4 -0
- package/dist/conformance/relations/cases/index.d.ts.map +1 -0
- package/dist/conformance/relations/cases/outage.d.ts +3 -0
- package/dist/conformance/relations/cases/outage.d.ts.map +1 -0
- package/dist/conformance/relations/cases/reads.d.ts +8 -0
- package/dist/conformance/relations/cases/reads.d.ts.map +1 -0
- package/dist/conformance/relations/cases/traversal.d.ts +7 -0
- package/dist/conformance/relations/cases/traversal.d.ts.map +1 -0
- package/dist/conformance/relations/cases/writes.d.ts +4 -0
- package/dist/conformance/relations/cases/writes.d.ts.map +1 -0
- package/dist/conformance/relations/describe.d.ts +20 -0
- package/dist/conformance/relations/describe.d.ts.map +1 -0
- package/dist/conformance/relations/fixtures.d.ts +8 -0
- package/dist/conformance/relations/fixtures.d.ts.map +1 -0
- package/dist/conformance/relations/index.d.ts +18 -0
- package/dist/conformance/relations/index.d.ts.map +1 -0
- package/dist/conformance/relations/reference.d.ts +4 -0
- package/dist/conformance/relations/reference.d.ts.map +1 -0
- package/dist/conformance/relations/types.d.ts +34 -0
- package/dist/conformance/relations/types.d.ts.map +1 -0
- package/dist/conformance/types.d.ts +79 -0
- package/dist/conformance/types.d.ts.map +1 -0
- package/dist/errors/janus-error/base.d.ts +47 -0
- package/dist/errors/janus-error/base.d.ts.map +1 -0
- package/dist/errors/janus-error/codes.credentials.d.ts +36 -0
- package/dist/errors/janus-error/codes.credentials.d.ts.map +1 -0
- package/dist/errors/janus-error/codes.d.ts +23 -0
- package/dist/errors/janus-error/codes.d.ts.map +1 -0
- package/dist/errors/janus-error/codes.invitations.d.ts +52 -0
- package/dist/errors/janus-error/codes.invitations.d.ts.map +1 -0
- package/dist/errors/janus-error/codes.one-time.d.ts +63 -0
- package/dist/errors/janus-error/codes.one-time.d.ts.map +1 -0
- package/dist/errors/janus-error/codes.records.d.ts +86 -0
- package/dist/errors/janus-error/codes.records.d.ts.map +1 -0
- package/dist/errors/janus-error/codes.social.d.ts +88 -0
- package/dist/errors/janus-error/codes.social.d.ts.map +1 -0
- package/dist/errors/janus-error/index.d.ts +17 -0
- package/dist/errors/janus-error/index.d.ts.map +1 -0
- package/dist/errors/janus-error/options.d.ts +105 -0
- package/dist/errors/janus-error/options.d.ts.map +1 -0
- package/dist/errors/janus-error/refusals.d.ts +151 -0
- package/dist/errors/janus-error/refusals.d.ts.map +1 -0
- package/dist/errors/janus-error/status.d.ts +21 -0
- package/dist/errors/janus-error/status.d.ts.map +1 -0
- package/dist/errors/janus-error/store.d.ts +36 -0
- package/dist/errors/janus-error/store.d.ts.map +1 -0
- package/dist/ids/derived.d.ts +25 -0
- package/dist/ids/derived.d.ts.map +1 -0
- package/dist/ids/id.d.ts +55 -0
- package/dist/ids/id.d.ts.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6933 -0
- package/dist/index.js.map +208 -0
- package/dist/pagination/cursor-page.d.ts +53 -0
- package/dist/pagination/cursor-page.d.ts.map +1 -0
- package/dist/permissions/bound-model.d.ts +10 -0
- package/dist/permissions/bound-model.d.ts.map +1 -0
- package/dist/permissions/can.d.ts +13 -0
- package/dist/permissions/can.d.ts.map +1 -0
- package/dist/permissions/engine.d.ts +49 -0
- package/dist/permissions/engine.d.ts.map +1 -0
- package/dist/permissions/holders.d.ts +12 -0
- package/dist/permissions/holders.d.ts.map +1 -0
- package/dist/permissions/index.d.ts +36 -0
- package/dist/permissions/index.d.ts.map +1 -0
- package/dist/permissions/index.js +924 -0
- package/dist/permissions/index.js.map +28 -0
- package/dist/permissions/input.d.ts +43 -0
- package/dist/permissions/input.d.ts.map +1 -0
- package/dist/permissions/list.d.ts +16 -0
- package/dist/permissions/list.d.ts.map +1 -0
- package/dist/permissions/model/can.d.ts +41 -0
- package/dist/permissions/model/can.d.ts.map +1 -0
- package/dist/permissions/model/config.d.ts +36 -0
- package/dist/permissions/model/config.d.ts.map +1 -0
- package/dist/permissions/model/constraint.d.ts +37 -0
- package/dist/permissions/model/constraint.d.ts.map +1 -0
- package/dist/permissions/model/ctx.d.ts +23 -0
- package/dist/permissions/model/ctx.d.ts.map +1 -0
- package/dist/permissions/model/define.d.ts +78 -0
- package/dist/permissions/model/define.d.ts.map +1 -0
- package/dist/permissions/model/from-field.d.ts +31 -0
- package/dist/permissions/model/from-field.d.ts.map +1 -0
- package/dist/permissions/model/grant.d.ts +81 -0
- package/dist/permissions/model/grant.d.ts.map +1 -0
- package/dist/permissions/model/list.d.ts +48 -0
- package/dist/permissions/model/list.d.ts.map +1 -0
- package/dist/permissions/model/names.d.ts +51 -0
- package/dist/permissions/model/names.d.ts.map +1 -0
- package/dist/permissions/model/permissions.d.ts +48 -0
- package/dist/permissions/model/permissions.d.ts.map +1 -0
- package/dist/permissions/model/refs.d.ts +36 -0
- package/dist/permissions/model/refs.d.ts.map +1 -0
- package/dist/permissions/model/refusal.d.ts +13 -0
- package/dist/permissions/model/refusal.d.ts.map +1 -0
- package/dist/permissions/model/unions.d.ts +3 -0
- package/dist/permissions/model/unions.d.ts.map +1 -0
- package/dist/permissions/model/when.d.ts +16 -0
- package/dist/permissions/model/when.d.ts.map +1 -0
- package/dist/permissions/port/holders.d.ts +38 -0
- package/dist/permissions/port/holders.d.ts.map +1 -0
- package/dist/permissions/port/memory.d.ts +17 -0
- package/dist/permissions/port/memory.d.ts.map +1 -0
- package/dist/permissions/port/types.d.ts +101 -0
- package/dist/permissions/port/types.d.ts.map +1 -0
- package/dist/permissions/replace.d.ts +25 -0
- package/dist/permissions/replace.d.ts.map +1 -0
- package/dist/permissions/resolve/declared-names.d.ts +24 -0
- package/dist/permissions/resolve/declared-names.d.ts.map +1 -0
- package/dist/permissions/resolve/refuse-data-beyond-root.d.ts +11 -0
- package/dist/permissions/resolve/refuse-data-beyond-root.d.ts.map +1 -0
- package/dist/permissions/resolve/refuse-loops.d.ts +10 -0
- package/dist/permissions/resolve/refuse-loops.d.ts.map +1 -0
- package/dist/permissions/resolve/resolve-model.d.ts +13 -0
- package/dist/permissions/resolve/resolve-model.d.ts.map +1 -0
- package/dist/permissions/resolve/resolve-relation.d.ts +9 -0
- package/dist/permissions/resolve/resolve-relation.d.ts.map +1 -0
- package/dist/permissions/resolve/resolve-rule.d.ts +12 -0
- package/dist/permissions/resolve/resolve-rule.d.ts.map +1 -0
- package/dist/permissions/resolve/resolved.d.ts +52 -0
- package/dist/permissions/resolve/resolved.d.ts.map +1 -0
- package/dist/permissions/resolve/step.d.ts +4 -0
- package/dist/permissions/resolve/step.d.ts.map +1 -0
- package/dist/permissions/reverse.d.ts +53 -0
- package/dist/permissions/reverse.d.ts.map +1 -0
- package/dist/permissions/walk.d.ts +29 -0
- package/dist/permissions/walk.d.ts.map +1 -0
- package/dist/stores/guard.d.ts +24 -0
- package/dist/stores/guard.d.ts.map +1 -0
- package/dist/stores/storable.d.ts +15 -0
- package/dist/stores/storable.d.ts.map +1 -0
- package/dist/subjects/notation.d.ts +39 -0
- package/dist/subjects/notation.d.ts.map +1 -0
- package/dist/subjects/subject.d.ts +128 -0
- package/dist/subjects/subject.d.ts.map +1 -0
- package/dist/testing/index.d.ts +12 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +26 -0
- package/dist/testing/index.js.map +10 -0
- package/dist/time/clock.d.ts +31 -0
- package/dist/time/clock.d.ts.map +1 -0
- package/dist/time/duration.d.ts +23 -0
- package/dist/time/duration.d.ts.map +1 -0
- package/docs/README.md +46 -0
- package/docs/guide/adapters.md +858 -0
- package/docs/guide/api-keys.md +316 -0
- package/docs/guide/avatars.md +334 -0
- package/docs/guide/devices.md +441 -0
- package/docs/guide/email-flows.md +880 -0
- package/docs/guide/errors.md +180 -0
- package/docs/guide/events.md +467 -0
- package/docs/guide/invitations.md +465 -0
- package/docs/guide/issuers.md +107 -0
- package/docs/guide/magic-link.md +580 -0
- package/docs/guide/migrating-invitations.md +142 -0
- package/docs/guide/passkeys.md +425 -0
- package/docs/guide/passwords.md +325 -0
- package/docs/guide/permissions.md +719 -0
- package/docs/guide/second-factor.md +1124 -0
- package/docs/guide/sessions.md +521 -0
- package/docs/guide/sign-in-code.md +631 -0
- package/docs/guide/social.md +639 -0
- package/docs/guide/step-up.md +262 -0
- package/docs/guide/users.md +557 -0
- package/docs/guide/vocabulary.md +316 -0
- package/docs/roadmap.md +101 -0
- package/docs/troubleshooting.md +3305 -0
- package/package.json +77 -5
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an instance with several user types answers at its root for a
|
|
3
|
+
* verification link: the confirmation, whatever the user's type.
|
|
4
|
+
*
|
|
5
|
+
* Part of what `janus()` hands back; `./index` gathers it.
|
|
6
|
+
*/
|
|
7
|
+
import type { IssuedToken } from './email-flows';
|
|
8
|
+
import type { PreparedRequest } from './prepared';
|
|
9
|
+
import type { UserRef, WriteOptions } from './user';
|
|
10
|
+
/**
|
|
11
|
+
* What an instance with several user types answers at its root when at least
|
|
12
|
+
* one has an e-mail: the confirmation of a verification link, whatever the
|
|
13
|
+
* user's type.
|
|
14
|
+
*/
|
|
15
|
+
export interface AnyTypeVerifyEmailApi<U> {
|
|
16
|
+
readonly verifyEmail: {
|
|
17
|
+
/**
|
|
18
|
+
* Confirms an e-mail for a page that does not know the user's type:
|
|
19
|
+
* spends the link's token, reads the user it was issued to, whatever
|
|
20
|
+
* their type, and then does what that type's `confirm` does — the same
|
|
21
|
+
* write, events and refusals. The answer's `type` says which type it
|
|
22
|
+
* was.
|
|
23
|
+
*
|
|
24
|
+
* **Call it from a `POST`**, never from the `GET` of the link. An
|
|
25
|
+
* unknown, spent or lapsed token is `TOKEN_UNKNOWN`, `TOKEN_SPENT` or
|
|
26
|
+
* `TOKEN_EXPIRED`; a user gone since, or of a type with no e-mail, is
|
|
27
|
+
* `TOKEN_UNKNOWN`; a user whose e-mail is no longer the one the link
|
|
28
|
+
* was sent to is `TOKEN_STALE`. A user written in between is
|
|
29
|
+
* `VERSION_CONFLICT`.
|
|
30
|
+
*
|
|
31
|
+
* `options.firstProof` works as on each type's `confirm`. `options.user`
|
|
32
|
+
* binds the link to that user, whatever the type: a token issued to
|
|
33
|
+
* another user is `TOKEN_UNKNOWN`, not spent, and nothing is written.
|
|
34
|
+
*
|
|
35
|
+
* `send` and `proveFirst` stay on each type:
|
|
36
|
+
* `janus.admin.verifyEmail.send(...)`.
|
|
37
|
+
*/
|
|
38
|
+
confirm(token: string, options?: VerifyEmailOptions): Promise<U>;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** What a user type with an e-mail answers besides. */
|
|
42
|
+
export interface VerifyEmailApi<U> {
|
|
43
|
+
/**
|
|
44
|
+
* **An administrator's flag**: sets `emailVerified` to `verified`, for an
|
|
45
|
+
* address checked out of band, and nothing else. It is `update` for that
|
|
46
|
+
* one field: the password, avatar and second factor are kept, and no
|
|
47
|
+
* session, API key or token is revoked or spent. Sends `user.emailVerified`
|
|
48
|
+
* when it turned the flag on; turning it off sends nothing. A flag already
|
|
49
|
+
* as asked is no write and no event. Works on an inactive user.
|
|
50
|
+
*
|
|
51
|
+
* **It does not do what `verifyEmail.proveFirst` does.** `proveFirst` is
|
|
52
|
+
* the first proof of an address by the application's own proof of the
|
|
53
|
+
* inbox, and it removes whatever somebody who signed up with that address
|
|
54
|
+
* before its owner set: password, avatar, second factor, sessions. Use it
|
|
55
|
+
* when the address was proved by you for a person signing in; use
|
|
56
|
+
* `setEmailVerified` when an administrator vouches for an address of an
|
|
57
|
+
* account that stays as it is. Marking an address verified here lets
|
|
58
|
+
* anything that trusts a verified e-mail (a link, a code, a social
|
|
59
|
+
* match) act on it without the takeover-proofing, so call it only for an
|
|
60
|
+
* address you checked, with an id your server chose.
|
|
61
|
+
*
|
|
62
|
+
* Turning the flag off makes the next first sign-in by link or code
|
|
63
|
+
* apply the first proof again. `ifVersion` in `options` makes a user
|
|
64
|
+
* written in between a `VERSION_CONFLICT`; an unknown id is `NOT_FOUND`.
|
|
65
|
+
*/
|
|
66
|
+
setEmailVerified(user: UserRef, verified: boolean, options?: WriteOptions): Promise<U>;
|
|
67
|
+
readonly verifyEmail: {
|
|
68
|
+
/**
|
|
69
|
+
* Issues a token for the user's current e-mail. Sending it is yours.
|
|
70
|
+
* **Throttled per user**: past five in 10 minutes
|
|
71
|
+
* (`janus({ mail: { throttle } })`), `MAIL_THROTTLED` with
|
|
72
|
+
* `retryAfter`, and no token.
|
|
73
|
+
*/
|
|
74
|
+
send(user: UserRef): Promise<IssuedToken>;
|
|
75
|
+
/**
|
|
76
|
+
* An anonymous resend of the verification, in two steps: counts the
|
|
77
|
+
* address — **per address**, `MAIL_THROTTLED` with `retryAfter` past
|
|
78
|
+
* the limit — and looks nobody up. `send()` on the answer, run off the
|
|
79
|
+
* request, issues a token for the active user of this type who holds
|
|
80
|
+
* the address and has not verified it, and answers `null` for anybody
|
|
81
|
+
* else (nobody, an inactive user, an address already verified), so the
|
|
82
|
+
* visitor's answer is the same whichever it was. Sending it is yours.
|
|
83
|
+
*/
|
|
84
|
+
prepare(email: string): Promise<PreparedRequest<IssuedToken & {
|
|
85
|
+
readonly user: U;
|
|
86
|
+
}>>;
|
|
87
|
+
/**
|
|
88
|
+
* Redeems a token and marks the e-mail verified. A token sent to an
|
|
89
|
+
* e-mail the user has since changed is `TOKEN_STALE`.
|
|
90
|
+
*
|
|
91
|
+
* **With several user types**, a token issued to a user of another type
|
|
92
|
+
* is `TOKEN_UNKNOWN` here, and it is spent. A page that does not know
|
|
93
|
+
* the type — an anonymous confirmation page — calls the root's
|
|
94
|
+
* `janus.verifyEmail.confirm` instead.
|
|
95
|
+
*
|
|
96
|
+
* **`{ user }` binds the link to the signed-in user.** Without it, anyone
|
|
97
|
+
* holding the link confirms: somebody who signs up with another person's
|
|
98
|
+
* address and asks for a link has the real owner verify the squatter's
|
|
99
|
+
* account. With the user the page knows, a link issued to somebody else is
|
|
100
|
+
* `TOKEN_UNKNOWN`, **not spent**, and nothing is written.
|
|
101
|
+
*
|
|
102
|
+
* **`{ firstProof: true }` makes the link a first proof of the
|
|
103
|
+
* address.** With open sign-up, somebody can register an address they
|
|
104
|
+
* do not own and choose its password; the real owner then follows the
|
|
105
|
+
* link. For an e-mail never proved, the option applies what
|
|
106
|
+
* `magicLink.confirm` does: one write marks it verified and drops the
|
|
107
|
+
* password, the avatar and the second factor (active or waiting, with its
|
|
108
|
+
* recovery codes), every session is revoked and the reset links and
|
|
109
|
+
* second-factor challenges are spent, before and after the write; it
|
|
110
|
+
* sends `user.emailVerified`, then `user.passwordChanged` and
|
|
111
|
+
* `user.secondFactorDisabled` when they apply. The owner then sets a
|
|
112
|
+
* new password through `resetPassword`. An e-mail already proved is
|
|
113
|
+
* confirmed as without the option, and nothing is dropped. Without the
|
|
114
|
+
* option, the password and factor are kept, as before. A write landing
|
|
115
|
+
* between the read and the proof is a `VERSION_CONFLICT` with nothing
|
|
116
|
+
* proved and the link spent (no retry, unlike `proveFirst`: ask for a new
|
|
117
|
+
* link).
|
|
118
|
+
*/
|
|
119
|
+
confirm(token: string, options?: VerifyEmailOptions): Promise<U>;
|
|
120
|
+
/**
|
|
121
|
+
* Applies the first proof of the user's e-mail **the application made
|
|
122
|
+
* itself** — an invitation token it issued to the address and the
|
|
123
|
+
* person followed: exactly what `magicLink.confirm` and
|
|
124
|
+
* `signInCode.confirm` do to an e-mail never proved, with no link and
|
|
125
|
+
* no code. In one write it marks the e-mail verified and drops the
|
|
126
|
+
* password, the avatar and the second factor — active or waiting, with its
|
|
127
|
+
* recovery codes — and it revokes every session and spends the reset
|
|
128
|
+
* links and second-factor challenges, before the write and after it.
|
|
129
|
+
* Sends `user.emailVerified`, then `user.passwordChanged` when a
|
|
130
|
+
* password was dropped and `user.secondFactorDisabled` when an active
|
|
131
|
+
* factor was. Answers `{ user, proved: true }`.
|
|
132
|
+
*
|
|
133
|
+
* An e-mail already proved changes nothing and sends nothing:
|
|
134
|
+
* `{ user, proved: false }`.
|
|
135
|
+
*
|
|
136
|
+
* **Privileged: janus checks no credential.** Call it only after your
|
|
137
|
+
* server verified its own proof of the inbox, with the user from that
|
|
138
|
+
* proof's record — never with an id a request supplied: whoever
|
|
139
|
+
* chooses it drops anybody's password, second factor and avatar.
|
|
140
|
+
*
|
|
141
|
+
* **Call it before `setPassword` and before `signInProven`**: it drops
|
|
142
|
+
* the password and revokes every session, so a password set or a
|
|
143
|
+
* session opened before it is gone after it.
|
|
144
|
+
*
|
|
145
|
+
* Counts nothing in the mail or the sign-in throttle, sends no e-mail
|
|
146
|
+
* and issues no token. An inactive user is `USER_INACTIVE`; a
|
|
147
|
+
* malformed id, an unknown one or one of another type is `NOT_FOUND`;
|
|
148
|
+
* a user written between the read and the proof is read again and the
|
|
149
|
+
* proof retried **once**: `proved: false` when that write proved the
|
|
150
|
+
* e-mail, `VERSION_CONFLICT` with nothing proved when it changed the
|
|
151
|
+
* address (the proof you hold is for the address you read) or when
|
|
152
|
+
* the retry conflicts too, `USER_INACTIVE` when it deactivated the
|
|
153
|
+
* user. Running the proof twice is harmless.
|
|
154
|
+
*
|
|
155
|
+
* **The address you hold is checked.** Given a `User` — an object
|
|
156
|
+
* carrying the type's e-mail field — it compares that address,
|
|
157
|
+
* normalised as e-mails are, with the one it reads, on the first read
|
|
158
|
+
* and on the retry read: a different one is `VERSION_CONFLICT` and
|
|
159
|
+
* nothing is proved. Given a bare id, or an object without the e-mail
|
|
160
|
+
* field, it proves the current address.
|
|
161
|
+
*/
|
|
162
|
+
proveFirst(user: UserRef): Promise<FirstProof<U>>;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/** Options of `verifyEmail.confirm`. */
|
|
166
|
+
export interface VerifyEmailOptions {
|
|
167
|
+
/** Treat the link as the first proof of an address never proved: drop the password, second factor and avatar set before it. */
|
|
168
|
+
readonly firstProof?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Binds the confirmation to one user: the signed-in user, in the same
|
|
171
|
+
* shape `send(user)` takes. A token issued to another user (or, at the
|
|
172
|
+
* root, one that resolves to another user) is `TOKEN_UNKNOWN`, as an
|
|
173
|
+
* unknown token is; **it is not spent and nothing is written**, so its
|
|
174
|
+
* rightful owner can still use it. The check is part of the store's spend,
|
|
175
|
+
* not a read before it. Left out, any holder of the link confirms. A `user` key that is present but holds `undefined` or `null` (`{ user: session?.user }` with no session) is refused as `TOKEN_UNKNOWN` and **never confirms unbound**.
|
|
176
|
+
*/
|
|
177
|
+
readonly user?: UserRef;
|
|
178
|
+
}
|
|
179
|
+
/** What `verifyEmail.proveFirst` answers: the user, and whether this call proved the e-mail. */
|
|
180
|
+
export interface FirstProof<U> {
|
|
181
|
+
/** The user after the call: `emailVerified` is `true` either way. */
|
|
182
|
+
readonly user: U;
|
|
183
|
+
/**
|
|
184
|
+
* `true` when the e-mail had never been proved and this call proved it,
|
|
185
|
+
* dropping the password, the second factor and the avatar and revoking every
|
|
186
|
+
* session; `false` when it was already proved, and nothing changed.
|
|
187
|
+
*/
|
|
188
|
+
readonly proved: boolean;
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=verify-email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-email.d.ts","sourceRoot":"","sources":["../../../src/auth/types/verify-email.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE;QACrB;;;;;;;;;;;;;;;;;;;;WAoBG;QACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;KACjE,CAAC;CACF;AAED,uDAAuD;AACvD,MAAM,WAAW,cAAc,CAAC,CAAC;IAChC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,gBAAgB,CACf,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,CAAC,CAAC,CAAC;IACd,QAAQ,CAAC,WAAW,EAAE;QACrB;;;;;WAKG;QACH,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QAC1C;;;;;;;;WAQG;QACH,OAAO,CACN,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,eAAe,CAAC,WAAW,GAAG;YAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC,CAAC;QAChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+BG;QACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAyCG;QACH,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KAClD,CAAC;CACF;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IAClC,+HAA+H;IAC/H,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,gGAAgG;AAChG,MAAM,WAAW,UAAU,CAAC,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AnyUser } from '../context';
|
|
2
|
+
import type { AvatarApi, ChangeEmailApi, FindByEmailApi, FindOrCreateApi, MagicLinkApi, PasskeyFirstFactorApi, PasskeySignInApi, PasskeysApi, PasswordApi, ProvenSignInApi, ResetPasswordApi, SecondFactorApi, SignInCodeApi, SignInResult, SignUpPrepareApi, StepUpApi, StepUpByApp, StepUpByEmail, StepUpPasskeyApi, UserTypeApi, VerifyEmailApi } from '../types';
|
|
3
|
+
import type { Input } from './flow-types';
|
|
4
|
+
/** Everything one user type answers. Which flows it has is decided by its types; all are built. */
|
|
5
|
+
export type AnyTypeApi = UserTypeApi<AnyUser, Input> & AvatarApi<AnyUser> & PasswordApi<AnyUser, Input, string, SignInResult<AnyUser>> & SignUpPrepareApi<AnyUser, Input> & SecondFactorApi<AnyUser> & PasskeysApi<AnyUser> & PasskeySignInApi<AnyUser> & PasskeyFirstFactorApi<AnyUser> & ProvenSignInApi<AnyUser, SignInResult<AnyUser>> & SignInCodeApi<AnyUser, SignInResult<AnyUser>> & MagicLinkApi<AnyUser, SignInResult<AnyUser>> & StepUpApi<AnyUser, StepUpByEmail<AnyUser> | StepUpByApp<AnyUser>> & StepUpPasskeyApi<AnyUser> & VerifyEmailApi<AnyUser> & ChangeEmailApi<AnyUser> & FindByEmailApi<AnyUser> & FindOrCreateApi<AnyUser, Input> & ResetPasswordApi<AnyUser>;
|
|
6
|
+
//# sourceMappingURL=any-type-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any-type-api.d.ts","sourceRoot":"","sources":["../../../src/auth/users/any-type-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EACX,SAAS,EACT,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,mGAAmG;AACnG,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,GACnD,SAAS,CAAC,OAAO,CAAC,GAClB,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,GAC1D,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,GAChC,eAAe,CAAC,OAAO,CAAC,GACxB,WAAW,CAAC,OAAO,CAAC,GACpB,gBAAgB,CAAC,OAAO,CAAC,GACzB,qBAAqB,CAAC,OAAO,CAAC,GAC9B,eAAe,CAAC,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,GAC/C,aAAa,CAAC,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,GAC7C,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,GAC5C,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GACjE,gBAAgB,CAAC,OAAO,CAAC,GACzB,cAAc,CAAC,OAAO,CAAC,GACvB,cAAc,CAAC,OAAO,CAAC,GACvB,cAAc,CAAC,OAAO,CAAC,GACvB,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,GAC/B,gBAAgB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import type { Context } from '../context';
|
|
3
|
+
import type { UserRecord } from '../port/types';
|
|
4
|
+
/**
|
|
5
|
+
* The user holding this normalised login, or `null`. A login no store can
|
|
6
|
+
* keep is nobody's: answered as an absence, without asking a store that
|
|
7
|
+
* would fail on it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const byLogin: (context: Context, type: ResolvedType, login: string) => Promise<UserRecord | null>;
|
|
10
|
+
//# sourceMappingURL=by-login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"by-login.d.ts","sourceRoot":"","sources":["../../../src/auth/users/by-login.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GACnB,SAAS,OAAO,EAChB,MAAM,YAAY,EAClB,OAAO,MAAM,KACX,OAAO,CAAC,UAAU,GAAG,IAAI,CAGpB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import { type Context } from '../context';
|
|
3
|
+
import type { UserRecord } from '../port/types';
|
|
4
|
+
import type { UserRef, WriteOptions } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Replaces the password after checking the current one, in the write that
|
|
7
|
+
* replaces it — so the check is made on the very record the write replaces.
|
|
8
|
+
*
|
|
9
|
+
* Each call counts one attempt in the sign-in throttle of the user's login,
|
|
10
|
+
* the one `signIn` counts in, so a caller holding a session cannot try
|
|
11
|
+
* current passwords without limit, and the wrong guesses of both add up. The
|
|
12
|
+
* attempt is counted on the record the write reads, before the password is
|
|
13
|
+
* compared (a user with no password included, so the answer does not tell
|
|
14
|
+
* the two apart); past the limit the call is refused with `retryAfter`, the
|
|
15
|
+
* right password included, and nothing is compared or written. The write
|
|
16
|
+
* runs its callback once, so a call counts exactly once. A user with no login
|
|
17
|
+
* string, or the throttle off, counts nothing. A change that is written
|
|
18
|
+
* restarts the count, as a sign-in that opens a session does — after
|
|
19
|
+
* {@link passwordChanged}, so an outage restarting it cannot skip what the
|
|
20
|
+
* old password opened.
|
|
21
|
+
*/
|
|
22
|
+
export declare function changePassword(context: Context, type: ResolvedType, user: UserRef, change: {
|
|
23
|
+
readonly current: string;
|
|
24
|
+
readonly next: string;
|
|
25
|
+
}, options: WriteOptions | undefined, where: string): Promise<UserRecord>;
|
|
26
|
+
//# sourceMappingURL=change-password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-password.d.ts","sourceRoot":"","sources":["../../../src/auth/users/change-password.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACN,KAAK,OAAO,EAMZ,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,OAAO,EACb,MAAM,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAC3D,OAAO,EAAE,YAAY,GAAG,SAAS,EACjC,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,UAAU,CAAC,CA0CrB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import { type Context } from '../context';
|
|
3
|
+
import type { UserRef } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Deletes the user, then every session, token, API key, social link, passkey and tuple naming them. `true`
|
|
6
|
+
* when this call deleted them; a replay finds nobody, answers `false`, and
|
|
7
|
+
* still deletes what was left.
|
|
8
|
+
*/
|
|
9
|
+
export declare function deleteUser(context: Context, type: ResolvedType, user: UserRef): Promise<boolean>;
|
|
10
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/auth/users/delete.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,YAAY,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC;;;;GAIG;AACH,wBAAsB,UAAU,CAC/B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,OAAO,GACX,OAAO,CAAC,OAAO,CAAC,CAiClB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import type { Context } from '../context';
|
|
3
|
+
import type { UserRecord } from '../port/types';
|
|
4
|
+
/**
|
|
5
|
+
* Refuses an `update` that moves the e-mail of a user who holds a second
|
|
6
|
+
* factor (active or waiting) or at least one passkey, before anything is
|
|
7
|
+
* written. The new address is unproved, and the first proof of an e-mail drops
|
|
8
|
+
* what stands on the account: `changeEmail` proves the new address first and
|
|
9
|
+
* keeps both.
|
|
10
|
+
*
|
|
11
|
+
* A user who had no e-mail has nothing to move with `changeEmail`: the
|
|
12
|
+
* message then says to remove the factor and the passkeys first. Only called
|
|
13
|
+
* for a new e-mail that is set: clearing it is allowed.
|
|
14
|
+
*
|
|
15
|
+
* Called from the write's own callback, after the record is read and right
|
|
16
|
+
* before the version-checked write, so the factor is the one the write
|
|
17
|
+
* replaces and the passkeys are listed at the latest moment the core can.
|
|
18
|
+
*/
|
|
19
|
+
export declare function assertCanMoveEmail(context: Context, type: ResolvedType, record: UserRecord, hadEmail: boolean, where: string): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=email-move-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-move-guard.d.ts","sourceRoot":"","sources":["../../../src/auth/users/email-move-guard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAcf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** What a store is asked for, from the `emailPrefix` a caller wrote. */
|
|
2
|
+
export type PrefixFilter = {
|
|
3
|
+
readonly kind: 'all';
|
|
4
|
+
} | {
|
|
5
|
+
readonly kind: 'none';
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: 'prefix';
|
|
8
|
+
readonly loginPrefix: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The login prefix a store is given, from the `emailPrefix` of a `list` or
|
|
12
|
+
* `count` call.
|
|
13
|
+
*
|
|
14
|
+
* The prefix is normalised with the rule every e-mail is stored under, so the
|
|
15
|
+
* store compares bytes. `undefined`, and a prefix that is empty once
|
|
16
|
+
* normalised, filter nothing. A prefix no store can hold (a NUL, half a
|
|
17
|
+
* surrogate pair) matches no user, and is answered without reaching the store.
|
|
18
|
+
*
|
|
19
|
+
* A bare `TypeError` for a prefix that is not a string: it is written in the
|
|
20
|
+
* application's own code.
|
|
21
|
+
*/
|
|
22
|
+
export declare function prefixFilter(emailPrefix: unknown, where: string): PrefixFilter;
|
|
23
|
+
//# sourceMappingURL=email-prefix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-prefix.d.ts","sourceRoot":"","sources":["../../../src/auth/users/email-prefix.ts"],"names":[],"mappings":"AAGA,wEAAwE;AACxE,MAAM,MAAM,YAAY,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC3B,WAAW,EAAE,OAAO,EACpB,KAAK,EAAE,MAAM,GACX,YAAY,CAUd"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ResolvedType } from '../config';
|
|
2
|
+
import type { JsonObject, UserRecord } from '../port/types';
|
|
3
|
+
import type { Input } from './flow-types';
|
|
4
|
+
/**
|
|
5
|
+
* Whether the e-mail differs between two sets of fields, compared normalised:
|
|
6
|
+
* `Ada@Example.com` for `ada@example.com` is no change. The one test behind
|
|
7
|
+
* both the new e-mail's verification reset and `user.emailChanged`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function emailChanged(type: ResolvedType, before: JsonObject, after: JsonObject): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* What `update` writes: the patch merged over the stored fields, the whole
|
|
12
|
+
* result validated, and the logins derived again from it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function fieldsPatch(type: ResolvedType, record: UserRecord, patch: Input, where: string): Promise<{
|
|
15
|
+
emailVerifiedAt?: null;
|
|
16
|
+
fields: JsonObject;
|
|
17
|
+
logins: string[];
|
|
18
|
+
nameKey: string | null;
|
|
19
|
+
schemaVersion: string;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=fields-patch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields-patch.d.ts","sourceRoot":"","sources":["../../../src/auth/users/fields-patch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAK1C;;;;GAIG;AACH,wBAAgB,YAAY,CAC3B,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,UAAU,GACf,OAAO,CAET;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAChC,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM;;;;;;GAkBb"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import { type AnyUser, type Context } from '../context';
|
|
3
|
+
import type { FindByEmailApi } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* `findByEmail` for one user type: the holder the e-mail flows would find —
|
|
6
|
+
* the same normalisation, the same comparison with the stored address — with
|
|
7
|
+
* nothing counted, issued or written. A value that is no address is
|
|
8
|
+
* nobody's, as a malformed id is for `find`, and the store is not asked.
|
|
9
|
+
*/
|
|
10
|
+
export declare function findByEmailFlows(context: Context, type: ResolvedType): FindByEmailApi<AnyUser>;
|
|
11
|
+
//# sourceMappingURL=find-by-email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-by-email.d.ts","sourceRoot":"","sources":["../../../src/auth/users/find-by-email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,YAAY,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,GAChB,cAAc,CAAC,OAAO,CAAC,CASzB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `findMany`: several users of one type by id, in one query when the users
|
|
3
|
+
* store implements the optional `findUsers`, and with `findUser`, a few ids at
|
|
4
|
+
* a time, when it does not.
|
|
5
|
+
*/
|
|
6
|
+
import type { Context } from '../context';
|
|
7
|
+
import type { UserRecord } from '../port/types';
|
|
8
|
+
/**
|
|
9
|
+
* The most ids one `findUsers` call is given. A longer list is read in
|
|
10
|
+
* several calls, one after another, so no query grows with the caller's list.
|
|
11
|
+
*/
|
|
12
|
+
export declare const FIND_MANY_BATCH = 100;
|
|
13
|
+
/**
|
|
14
|
+
* How many `findUser` calls run at once when the store has no `findUsers`:
|
|
15
|
+
* enough to keep a 100-row list quick, few enough to leave the connection
|
|
16
|
+
* pool to the rest of the application.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FIND_MANY_CONCURRENCY = 10;
|
|
19
|
+
/**
|
|
20
|
+
* The users of this type holding these ids, **in the order the ids were
|
|
21
|
+
* given**, each once — at its first occurrence. An id that is malformed, held
|
|
22
|
+
* by nobody or held by a user of another type is left out: an absence is a
|
|
23
|
+
* shorter list, never a rejection. A failure throws.
|
|
24
|
+
*
|
|
25
|
+
* An empty list — or one with no well-formed id — answers `[]` without
|
|
26
|
+
* reaching the store.
|
|
27
|
+
*/
|
|
28
|
+
export declare function findManyRecords(context: Context, ids: readonly string[], type: string, where: string): Promise<UserRecord[]>;
|
|
29
|
+
//# sourceMappingURL=find-many.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-many.d.ts","sourceRoot":"","sources":["../../../src/auth/users/find-many.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,UAAU,EAAE,CAAC,CAuBvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { At } from '../at';
|
|
2
|
+
import { type ResolvedType } from '../config';
|
|
3
|
+
import { type AnyUser, type Context } from '../context';
|
|
4
|
+
import type { FindOrCreateApi } from '../types';
|
|
5
|
+
import type { Input } from './flow-types';
|
|
6
|
+
/**
|
|
7
|
+
* `findOrCreate` for one user type: the lookup by login (e-mail on a type
|
|
8
|
+
* with no password), and when nobody holds the key, `input()` and the
|
|
9
|
+
* creation `create` does — once more the lookup if the write lost a race.
|
|
10
|
+
*/
|
|
11
|
+
export declare function findOrCreateFlows(context: Context, type: ResolvedType, at: At): FindOrCreateApi<AnyUser, Input>;
|
|
12
|
+
//# sourceMappingURL=find-or-create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-or-create.d.ts","sourceRoot":"","sources":["../../../src/auth/users/find-or-create.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,YAAY,CAAC;AAG/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAqD1C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,EAAE,GACJ,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,CA0BjC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types every flow in `users/` shares: what a flow receives and how a
|
|
3
|
+
* sign-in finishes.
|
|
4
|
+
*/
|
|
5
|
+
import type { AnyUser } from '../context';
|
|
6
|
+
import type { DeviceHint } from '../devices';
|
|
7
|
+
import type { UserRecord } from '../port/types';
|
|
8
|
+
import type { SignInResult } from '../types';
|
|
9
|
+
/** A user's fields as a flow receives them, before any schema read them. */
|
|
10
|
+
export type Input = Record<string, unknown>;
|
|
11
|
+
/** What a sign-in answers once the user proved who they are: `secondFactorFlows`'s `finish`. */
|
|
12
|
+
export type Finish = (record: UserRecord, where: string, device: DeviceHint,
|
|
13
|
+
/** What the sign-in proved, as `SessionRecord.amr`; none when omitted. */
|
|
14
|
+
amr?: readonly string[]) => Promise<SignInResult<AnyUser>>;
|
|
15
|
+
//# sourceMappingURL=flow-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-types.d.ts","sourceRoot":"","sources":["../../../src/auth/users/flow-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,4EAA4E;AAC5E,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5C,gGAAgG;AAChG,MAAM,MAAM,MAAM,GAAG,CACpB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,UAAU;AAClB,0EAA0E;AAC1E,GAAG,CAAC,EAAE,SAAS,MAAM,EAAE,KACnB,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What one user type answers, gathered from the files beside this one:
|
|
3
|
+
* `type-api.ts` assembles it from the record flows (`record-flows.ts`) and
|
|
4
|
+
* the password flows (`password-flows.ts`), whose longer steps have files of
|
|
5
|
+
* their own.
|
|
6
|
+
*/
|
|
7
|
+
export type { AnyTypeApi } from './any-type-api';
|
|
8
|
+
export { typeApi } from './type-api';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/users/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import { type Context } from '../context';
|
|
3
|
+
import type { JsonObject, UserRecord } from '../port/types';
|
|
4
|
+
import type { Input } from './flow-types';
|
|
5
|
+
/**
|
|
6
|
+
* Validates, hashes, writes once. What `create`, `signUp` and `findOrCreate`
|
|
7
|
+
* share. `accept` sees the validated fields and may throw to refuse before
|
|
8
|
+
* anything is written; it is `findOrCreate`'s check that the input names the
|
|
9
|
+
* key it was asked for. `emailVerified` writes the user with their e-mail
|
|
10
|
+
* proved — the provider of a social sign-up vouched for it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function insert(context: Context, type: ResolvedType, input: Input, where: string, accept?: (fields: JsonObject) => void, options?: {
|
|
13
|
+
readonly emailVerified?: boolean;
|
|
14
|
+
}): Promise<UserRecord>;
|
|
15
|
+
//# sourceMappingURL=insert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../src/auth/users/insert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACN,KAAK,OAAO,EAMZ,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;GAMG;AACH,wBAAsB,MAAM,CAC3B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,EACrC,OAAO,GAAE;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GAChD,OAAO,CAAC,UAAU,CAAC,CAqCrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** What a store is asked for, from the `namePrefix` a caller wrote. */
|
|
2
|
+
export type NamePrefixFilter = {
|
|
3
|
+
readonly kind: 'all';
|
|
4
|
+
} | {
|
|
5
|
+
readonly kind: 'none';
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: 'prefix';
|
|
8
|
+
readonly namePrefix: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The name prefix a store is given, from the `namePrefix` of a `list` or
|
|
12
|
+
* `count` call, folded as a display name is when it is stored. `undefined`,
|
|
13
|
+
* and a prefix that is blank once folded, filter nothing. A prefix no store
|
|
14
|
+
* can hold matches no user, and is answered without reaching the store.
|
|
15
|
+
*
|
|
16
|
+
* A bare `TypeError` for a prefix that is not a string.
|
|
17
|
+
*/
|
|
18
|
+
export declare function namePrefixFilter(namePrefix: unknown, where: string): NamePrefixFilter;
|
|
19
|
+
//# sourceMappingURL=name-prefix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name-prefix.d.ts","sourceRoot":"","sources":["../../../src/auth/users/name-prefix.ts"],"names":[],"mappings":"AAGA,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC/B,UAAU,EAAE,OAAO,EACnB,KAAK,EAAE,MAAM,GACX,gBAAgB,CASlB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { At } from '../at';
|
|
2
|
+
import type { ResolvedType } from '../config';
|
|
3
|
+
import { type AnyUser, type Context } from '../context';
|
|
4
|
+
import type { PasswordApi, SignInResult, SignUpPrepareApi } from '../types';
|
|
5
|
+
import type { Finish, Input } from './flow-types';
|
|
6
|
+
/**
|
|
7
|
+
* The password flows of one user type: signing up and in, finding a user by
|
|
8
|
+
* the login they sign in with, and setting or changing their password.
|
|
9
|
+
*/
|
|
10
|
+
export declare function passwordFlows(context: Context, type: ResolvedType, at: At, finish: Finish): PasswordApi<AnyUser, Input, string, SignInResult<AnyUser>> & SignUpPrepareApi<AnyUser, Input>;
|
|
11
|
+
//# sourceMappingURL=password-flows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-flows.d.ts","sourceRoot":"","sources":["../../../src/auth/users/password-flows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,OAAO,EAMZ,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EACX,WAAW,EAEX,YAAY,EACZ,gBAAgB,EAChB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAKlD;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,GACZ,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,GAC5D,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CA+DhC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { At } from '../at';
|
|
2
|
+
import type { ResolvedType } from '../config';
|
|
3
|
+
import { type AnyUser, type Context } from '../context';
|
|
4
|
+
import type { UserTypeApi } from '../types';
|
|
5
|
+
import type { Input } from './flow-types';
|
|
6
|
+
/**
|
|
7
|
+
* The flows every user type has, whatever its configuration: creating,
|
|
8
|
+
* reading, listing, updating, deactivating and deleting its users.
|
|
9
|
+
*/
|
|
10
|
+
export declare function recordFlows(context: Context, type: ResolvedType, at: At): UserTypeApi<AnyUser, Input>;
|
|
11
|
+
//# sourceMappingURL=record-flows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-flows.d.ts","sourceRoot":"","sources":["../../../src/auth/users/record-flows.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,OAAO,EAKZ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAK1C;;;GAGG;AACH,wBAAgB,WAAW,CAC1B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,EAAE,GACJ,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAwF7B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import { type AnyUser, type Context } from '../context';
|
|
3
|
+
import { type DeviceHint } from '../devices';
|
|
4
|
+
import type { UserRecord } from '../port/types';
|
|
5
|
+
import type { SignInResult } from '../types';
|
|
6
|
+
import type { Finish, Input } from './flow-types';
|
|
7
|
+
/**
|
|
8
|
+
* Checks the password and answers what `finish` answers for the user. One
|
|
9
|
+
* refusal for an unknown login, no password, a wrong one and a login past
|
|
10
|
+
* its attempts; `USER_INACTIVE` only once the password matched.
|
|
11
|
+
*/
|
|
12
|
+
export declare function signIn(context: Context, type: ResolvedType, finish: Finish, input: Input, call: {
|
|
13
|
+
readonly where: string;
|
|
14
|
+
readonly device: DeviceHint;
|
|
15
|
+
}): Promise<SignInResult<AnyUser>>;
|
|
16
|
+
/**
|
|
17
|
+
* What is refused only once the password matched, so only somebody who
|
|
18
|
+
* knows it is told: an inactive account (`USER_INACTIVE`) and, with
|
|
19
|
+
* `password.requireVerifiedEmail`, an address never verified
|
|
20
|
+
* (`EMAIL_UNVERIFIED`). Either way no session opens. A passkey sign-in
|
|
21
|
+
* (`passkeys.signIn`) refuses the same two once its assertion verified.
|
|
22
|
+
*/
|
|
23
|
+
export declare function refuseAfterPassword(type: ResolvedType, record: UserRecord, where: string): void;
|
|
24
|
+
//# sourceMappingURL=sign-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in.d.ts","sourceRoot":"","sources":["../../../src/auth/users/sign-in.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,OAAO,EAMZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAElD;;;;GAIG;AACH,wBAAsB,MAAM,CAC3B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GAC3D,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CA6DhC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,GACX,IAAI,CAmBN"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import { type AnyUser, type Context } from '../context';
|
|
3
|
+
import type { PreparedSignUp } from '../types';
|
|
4
|
+
import type { Input } from './flow-types';
|
|
5
|
+
/**
|
|
6
|
+
* `signUp.prepare`: validates the fields and the password against the policy,
|
|
7
|
+
* and counts the attempt per e-mail address — all before anybody is looked
|
|
8
|
+
* up, with the same store calls whatever the address. Its `send()` creates
|
|
9
|
+
* the user and issues a verification token, or finds the login taken
|
|
10
|
+
* (`prepared.ts`: once).
|
|
11
|
+
*/
|
|
12
|
+
export declare function prepareSignUp(context: Context, type: ResolvedType, input: Input, where: string): Promise<PreparedSignUp<AnyUser>>;
|
|
13
|
+
//# sourceMappingURL=sign-up.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../../src/auth/users/sign-up.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,OAAO,EAOZ,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,UAAU,CAAC;AAE9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C;;;;;;GAMG;AACH,wBAAsB,aAAa,CAClC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CA4BlC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import type { Context } from '../context';
|
|
3
|
+
import type { AnyTypeApi } from './any-type-api';
|
|
4
|
+
/**
|
|
5
|
+
* Everything one user type answers, gathered from its flows: its records,
|
|
6
|
+
* its password, its sign-in on the application's proof, its second factor,
|
|
7
|
+
* its sign-in code and link, its step-up, its e-mails, the lookup by e-mail and the lookup that creates.
|
|
8
|
+
*/
|
|
9
|
+
export declare function typeApi(context: Context, type: ResolvedType): AnyTypeApi;
|
|
10
|
+
//# sourceMappingURL=type-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-api.d.ts","sourceRoot":"","sources":["../../../src/auth/users/type-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAQ1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAMjD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,GAAG,UAAU,CAsBxE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ResolvedType } from '../config';
|
|
2
|
+
import { type Context } from '../context';
|
|
3
|
+
import type { UserRecord } from '../port/types';
|
|
4
|
+
import type { UserRef, WriteOptions } from '../types';
|
|
5
|
+
import type { Input } from './flow-types';
|
|
6
|
+
/**
|
|
7
|
+
* `update`: the patch written over the stored fields — refused with
|
|
8
|
+
* `EMAIL_CHANGE_NEEDS_PROOF` when it would move the e-mail of a user who holds
|
|
9
|
+
* a second factor or a passkey, since `changeEmail` proves the new address —
|
|
10
|
+
* then — when it changed
|
|
11
|
+
* the e-mail — `user.emailChanged`, carrying the address the write replaced,
|
|
12
|
+
* which nothing keeps once it landed, and the user's pending `changeEmail`
|
|
13
|
+
* links spent.
|
|
14
|
+
*/
|
|
15
|
+
export declare function update(context: Context, type: ResolvedType, user: UserRef, patch: Input, options: WriteOptions | undefined, where: string): Promise<UserRecord>;
|
|
16
|
+
//# sourceMappingURL=update.d.ts.map
|