@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,23 @@
|
|
|
1
|
+
import type { CredentialCode } from './codes.credentials';
|
|
2
|
+
import type { KeyAndInvitationCode } from './codes.invitations';
|
|
3
|
+
import type { OneTimeCode } from './codes.one-time';
|
|
4
|
+
import type { RecordCode } from './codes.records';
|
|
5
|
+
import type { SocialAndPasskeyCode } from './codes.social';
|
|
6
|
+
/**
|
|
7
|
+
* What this package refuses, as a string a caller can switch on.
|
|
8
|
+
*
|
|
9
|
+
* Every code is a **refusal at call time, on a value that could have come from
|
|
10
|
+
* a request** — which is the rule that decides whether something belongs here
|
|
11
|
+
* or stays a bare `TypeError`. A refusal that can only come from how the
|
|
12
|
+
* application was wired (`janus()` with no schema, a lifespan that is
|
|
13
|
+
* not a duration, a store missing a method) throws a plain `TypeError`
|
|
14
|
+
* instead: no request handler should ever answer one, so no handler needs to
|
|
15
|
+
* tell it apart from the others.
|
|
16
|
+
*
|
|
17
|
+
* The codes are `SCREAMING_SNAKE`, and that is not an exception to this
|
|
18
|
+
* repository's camelCase rule — they are data values, not API identifiers, the
|
|
19
|
+
* same shape `code` has in `@softistx/mongo` and `@softistx/redis`. Every *key* in
|
|
20
|
+
* this package is camelCase.
|
|
21
|
+
*/
|
|
22
|
+
export type JanusErrorCode = RecordCode | CredentialCode | OneTimeCode | KeyAndInvitationCode | SocialAndPasskeyCode;
|
|
23
|
+
//# sourceMappingURL=codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GACvB,UAAU,GACV,cAAc,GACd,WAAW,GACX,oBAAoB,GACpB,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** What API keys and invitations refuse. */
|
|
2
|
+
export type KeyAndInvitationCode =
|
|
3
|
+
/**
|
|
4
|
+
* The user already holds `maxActive` standing API keys: `apiKeys.create`
|
|
5
|
+
* made none (a key inserted by a race is revoked again). Revoke one, then
|
|
6
|
+
* create. Carries `maxActive` and `userId`.
|
|
7
|
+
*/
|
|
8
|
+
'API_KEY_LIMIT'
|
|
9
|
+
/**
|
|
10
|
+
* The name, lifetime, scopes or bound object given to `apiKeys.create` is
|
|
11
|
+
* not acceptable: a name that is empty or longer than 100 characters once
|
|
12
|
+
* trimmed, a lifetime `janus({ apiKeys: { lifetimes } })` does not list,
|
|
13
|
+
* scopes that are not 1 to 32 scope tokens, or a bound object that is not
|
|
14
|
+
* `{ type, id }`. Nothing was written. Carries `field`: `'name'`,
|
|
15
|
+
* `'lifetime'`, `'scopes'` or `'bound'`.
|
|
16
|
+
*/
|
|
17
|
+
| 'API_KEY_INVALID'
|
|
18
|
+
/**
|
|
19
|
+
* The invitation is not one to act on: `invitations.preview` or `accept`
|
|
20
|
+
* was given a code that names no pending invitation (unknown, malformed,
|
|
21
|
+
* accepted, revoked or lapsed — **one code for all**, so a response cannot
|
|
22
|
+
* tell which codes exist; `accept` also answers it for a deactivated user,
|
|
23
|
+
* and to the loser of a race over the same invitation), or `invitations.issue` was given a field it cannot
|
|
24
|
+
* keep. Nothing was written. For an input, `field` names it.
|
|
25
|
+
*/
|
|
26
|
+
| 'INVITATION_INVALID'
|
|
27
|
+
/**
|
|
28
|
+
* The scope already holds `maxPending` pending invitations that have not
|
|
29
|
+
* lapsed: `invitations.issue` made none. Revoke one, or wait for one to
|
|
30
|
+
* lapse. Carries `maxActive`, the limit.
|
|
31
|
+
*/
|
|
32
|
+
| 'INVITATION_LIMIT'
|
|
33
|
+
/**
|
|
34
|
+
* The application's `invitations.beforeAccept` hook refused the
|
|
35
|
+
* acceptance, before anything was written: the invitation is still
|
|
36
|
+
* pending, no user was made or changed, and it can be accepted later.
|
|
37
|
+
*/
|
|
38
|
+
| 'INVITATION_REFUSED'
|
|
39
|
+
/**
|
|
40
|
+
* `invitations.resend` or `invitations.revoke` named an invitation that is
|
|
41
|
+
* accepted or revoked, so there is nothing to send again or take back.
|
|
42
|
+
* Nothing was written.
|
|
43
|
+
*/
|
|
44
|
+
| 'INVITATION_NOT_PENDING'
|
|
45
|
+
/**
|
|
46
|
+
* `invitations.accept` needs a password and was given none: the invitee
|
|
47
|
+
* has no usable account yet (a new user, or an e-mail never proved), so
|
|
48
|
+
* the password they choose is what they sign in with. The invitation is
|
|
49
|
+
* left pending and can be accepted again with one.
|
|
50
|
+
*/
|
|
51
|
+
| 'PASSWORD_REQUIRED';
|
|
52
|
+
//# sourceMappingURL=codes.invitations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.invitations.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/codes.invitations.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,MAAM,oBAAoB;AAC/B;;;;GAIG;AACD,eAAe;AACjB;;;;;;;GAOG;GACD,iBAAiB;AACnB;;;;;;;GAOG;GACD,oBAAoB;AACtB;;;;GAIG;GACD,kBAAkB;AACpB;;;;GAIG;GACD,oBAAoB;AACtB;;;;GAIG;GACD,wBAAwB;AAC1B;;;;;GAKG;GACD,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/** What a token, a one-time code, a second factor and a step-up refuse. */
|
|
2
|
+
export type OneTimeCode =
|
|
3
|
+
/** No token holds that secret. */
|
|
4
|
+
'TOKEN_UNKNOWN'
|
|
5
|
+
/**
|
|
6
|
+
* The token was already spent. Told apart from `TOKEN_UNKNOWN` for the
|
|
7
|
+
* message only — both are refusals, and the outcome is the same.
|
|
8
|
+
*/
|
|
9
|
+
| 'TOKEN_SPENT'
|
|
10
|
+
/**
|
|
11
|
+
* The token existed and its expiry has passed. It is spent all the same,
|
|
12
|
+
* so it cannot be retried.
|
|
13
|
+
*/
|
|
14
|
+
| 'TOKEN_EXPIRED'
|
|
15
|
+
/**
|
|
16
|
+
* The token was sent to an e-mail the user no longer has — or, for
|
|
17
|
+
* `changeEmail`, asked while the user held an e-mail they no longer have.
|
|
18
|
+
* Confirming it would verify an address nobody holds any more, so it is
|
|
19
|
+
* spent and refused.
|
|
20
|
+
*/
|
|
21
|
+
| 'TOKEN_STALE'
|
|
22
|
+
/**
|
|
23
|
+
* A one-time code that does not match: a wrong TOTP code, or one already
|
|
24
|
+
* used. Carries `attemptsLeft` when the code was checked against a
|
|
25
|
+
* challenge: what is left of its attempts, and `0` once the last one spent
|
|
26
|
+
* it — or against `regenerateRecoveryCodes`' window: what is left of the
|
|
27
|
+
* user's five, and `0` past them, when no code is compared at all — then
|
|
28
|
+
* with `reason: 'throttled'` and `retryAfter`, the seconds until the
|
|
29
|
+
* window frees, which a new challenge does not shorten. A challenge whose
|
|
30
|
+
* own tries are spent carries neither.
|
|
31
|
+
*/
|
|
32
|
+
| 'CODE_INVALID'
|
|
33
|
+
/**
|
|
34
|
+
* Too many e-mails asked for one address — or for one user, once signed
|
|
35
|
+
* in — in this window: `magicLink.request`, `signInCode.request`,
|
|
36
|
+
* `resetPassword.request`, `verifyEmail.send`, `changeEmail.send`, or `stepUp.request` by
|
|
37
|
+
* e-mail. Nothing was issued, so there is nothing to send. Carries
|
|
38
|
+
* `retryAfter`, the seconds until the next window. An address nobody
|
|
39
|
+
* holds is refused alike, so a response may carry it without telling who
|
|
40
|
+
* has an account.
|
|
41
|
+
*/
|
|
42
|
+
| 'MAIL_THROTTLED'
|
|
43
|
+
/**
|
|
44
|
+
* `magicLink.request`, `prepare` or `confirm` while `janus({ magicLink: {
|
|
45
|
+
* enabled: false } })` switches magic-link sign-in off. Refused before any
|
|
46
|
+
* store access: nothing was issued, counted or sent, and no token spent.
|
|
47
|
+
*/
|
|
48
|
+
| 'MAGIC_LINK_DISABLED'
|
|
49
|
+
/** `activate` before `enroll`: the user has no second factor waiting. */
|
|
50
|
+
| 'SECOND_FACTOR_NOT_ENROLLED'
|
|
51
|
+
/**
|
|
52
|
+
* `enroll` or `activate` on a user whose second factor is already active.
|
|
53
|
+
* `disable` it first: enrolling again must not quietly switch it off.
|
|
54
|
+
*/
|
|
55
|
+
| 'SECOND_FACTOR_ACTIVE'
|
|
56
|
+
/**
|
|
57
|
+
* The session proved who it is longer ago than the action asks —
|
|
58
|
+
* `assertFresh`, and `fresh()` in `@softistx/janus-hono`. Not a denial: ask
|
|
59
|
+
* for a step-up, and the same request goes through once it is confirmed.
|
|
60
|
+
* Carries `userId`.
|
|
61
|
+
*/
|
|
62
|
+
| 'STEP_UP_REQUIRED';
|
|
63
|
+
//# sourceMappingURL=codes.one-time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.one-time.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/codes.one-time.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,MAAM,WAAW;AACtB,kCAAkC;AAChC,eAAe;AACjB;;;GAGG;GACD,aAAa;AACf;;;GAGG;GACD,eAAe;AACjB;;;;;GAKG;GACD,aAAa;AACf;;;;;;;;;GASG;GACD,cAAc;AAChB;;;;;;;;GAQG;GACD,gBAAgB;AAClB;;;;GAIG;GACD,qBAAqB;AACvB,yEAAyE;GACvE,4BAA4B;AAC9B;;;GAGG;GACD,sBAAsB;AACxB;;;;;GAKG;GACD,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/** What a store and a record read or write refuse, the capabilities a call needs, and a permission check that could not decide. */
|
|
2
|
+
export type RecordCode =
|
|
3
|
+
/**
|
|
4
|
+
* The store could not answer — a refused connection, a timeout, a primary
|
|
5
|
+
* stepping down, a deserialisation failure, a bug in the adapter.
|
|
6
|
+
*
|
|
7
|
+
* **Never a negative answer.** A handler answers 503 and lets the visitor
|
|
8
|
+
* retry. Mapping this to a 404, to `null` or to `false` turns an outage
|
|
9
|
+
* into a silent lockout: every user is told they do not exist.
|
|
10
|
+
* That failure has been measured twice in this organisation, two days
|
|
11
|
+
* apart, and it is the reason this package's port is specified rather than
|
|
12
|
+
* merely documented.
|
|
13
|
+
*/
|
|
14
|
+
'STORE_FAILED'
|
|
15
|
+
/**
|
|
16
|
+
* The store answered, and there is no such record.
|
|
17
|
+
*
|
|
18
|
+
* Raised by the `get*` calls, never by the `find*` calls — those return
|
|
19
|
+
* `null`, which is a value the caller decides what to do with.
|
|
20
|
+
*/
|
|
21
|
+
| 'NOT_FOUND'
|
|
22
|
+
/**
|
|
23
|
+
* The login — an e-mail, a username — is already held by another user of
|
|
24
|
+
* the same type.
|
|
25
|
+
*
|
|
26
|
+
* Raised by the **store's own unique constraint** and surfaced here, never
|
|
27
|
+
* decided by reading first: two concurrent sign-ups both pass a read, and
|
|
28
|
+
* only a constraint refuses one of them. Carries `login` and `userType`.
|
|
29
|
+
* Also by `changeEmail.confirm`, when the new address was taken since the
|
|
30
|
+
* link was sent: the token is spent, and nothing is written.
|
|
31
|
+
*/
|
|
32
|
+
| 'LOGIN_TAKEN'
|
|
33
|
+
/**
|
|
34
|
+
* `update` would move the e-mail of a user who holds a second factor
|
|
35
|
+
* (active or waiting) or a passkey: the new address is unproved, and its
|
|
36
|
+
* first proof would drop them. **Nothing was written.** Use `changeEmail`,
|
|
37
|
+
* which proves the new address and keeps the factor. Carries `userId` and
|
|
38
|
+
* `userType`.
|
|
39
|
+
*/
|
|
40
|
+
| 'EMAIL_CHANGE_NEEDS_PROOF'
|
|
41
|
+
/**
|
|
42
|
+
* The record changed since it was read: the version it was expected to
|
|
43
|
+
* hold is no longer the version it holds, and **nothing was written**.
|
|
44
|
+
* Read it again and retry. Carries `expectedVersion` and `actualVersion`.
|
|
45
|
+
*/
|
|
46
|
+
| 'VERSION_CONFLICT'
|
|
47
|
+
/**
|
|
48
|
+
* Another pending invitation already holds the same scope and address, so
|
|
49
|
+
* a write that would make one pending again was refused and **nothing was
|
|
50
|
+
* written**. Thrown by an invitation store as `StoreConflict('pending')`.
|
|
51
|
+
*/
|
|
52
|
+
| 'INVITATION_PENDING'
|
|
53
|
+
/**
|
|
54
|
+
* The fields failed the user type's schema. Carries `issues`, whose paths
|
|
55
|
+
* are the fields' own, so a handler can answer 400 field by field.
|
|
56
|
+
*/
|
|
57
|
+
| 'USER_INVALID'
|
|
58
|
+
/**
|
|
59
|
+
* The avatar id given to `avatar.set` is not a non-empty string of at most
|
|
60
|
+
* 512 characters that every store can keep (no NUL, no lone surrogate).
|
|
61
|
+
* Nothing was read or written. Reports the shape, never the id.
|
|
62
|
+
*/
|
|
63
|
+
| 'AVATAR_ID_INVALID'
|
|
64
|
+
/** A cursor this store did not mint, or one written for another ordering.
|
|
65
|
+
* Never a silent first page: a caller paging a list would loop for ever. */
|
|
66
|
+
| 'INVALID_CURSOR'
|
|
67
|
+
/**
|
|
68
|
+
* A cursor a list issued, passed back with another filter or order than
|
|
69
|
+
* the one it was issued for. Never a page of the other list.
|
|
70
|
+
*/
|
|
71
|
+
| 'CURSOR_FILTER_MISMATCH'
|
|
72
|
+
/**
|
|
73
|
+
* The wired store does not implement the optional capability this call
|
|
74
|
+
* needs. Names the method and the slot, so the sentence says which store to
|
|
75
|
+
* change or which call to stop making.
|
|
76
|
+
*/
|
|
77
|
+
| 'UNSUPPORTED'
|
|
78
|
+
/**
|
|
79
|
+
* A permission check walked deeper than `maxDepth` relations without an
|
|
80
|
+
* answer. **Not a refusal**: an evaluation that stopped half-way has not
|
|
81
|
+
* decided anything, and answering `false` would hide a model that is too
|
|
82
|
+
* deep behind denials nobody can explain. A cycle in the data is not this —
|
|
83
|
+
* it is cut, silently. Carries `permission` and `maxDepth`.
|
|
84
|
+
*/
|
|
85
|
+
| 'PERMISSION_DEPTH';
|
|
86
|
+
//# sourceMappingURL=codes.records.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.records.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/codes.records.ts"],"names":[],"mappings":"AAAA,mIAAmI;AACnI,MAAM,MAAM,UAAU;AACrB;;;;;;;;;;GAUG;AACD,cAAc;AAChB;;;;;GAKG;GACD,WAAW;AACb;;;;;;;;;GASG;GACD,aAAa;AACf;;;;;;GAMG;GACD,0BAA0B;AAC5B;;;;GAIG;GACD,kBAAkB;AACpB;;;;GAIG;GACD,oBAAoB;AACtB;;;GAGG;GACD,cAAc;AAChB;;;;GAIG;GACD,mBAAmB;AACrB;4EAC4E;GAC1E,gBAAgB;AAClB;;;GAGG;GACD,wBAAwB;AAC1B;;;;GAIG;GACD,aAAa;AACf;;;;;;GAMG;GACD,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** What a social flow and a passkey refuse. */
|
|
2
|
+
export type SocialAndPasskeyCode =
|
|
3
|
+
/**
|
|
4
|
+
* The social flow named by the cookie is unknown, already used, or lapsed
|
|
5
|
+
* (`tokens.socialFlow`, ten minutes by default): start the sign-in or the
|
|
6
|
+
* link again. The flow is spent either way.
|
|
7
|
+
*/
|
|
8
|
+
'FLOW_EXPIRED'
|
|
9
|
+
/**
|
|
10
|
+
* The callback does not belong to the flow the cookie holds: no cookie, a
|
|
11
|
+
* `state` that is not this flow's, a cookie whose contents were changed, or
|
|
12
|
+
* a link flow completed by someone other than the user who started it.
|
|
13
|
+
*/
|
|
14
|
+
| 'FLOW_MISMATCH'
|
|
15
|
+
/**
|
|
16
|
+
* `social.complete` was told the `purpose` it expects (`'signIn'` or
|
|
17
|
+
* `'link'`) and the flow is of the other kind. The flow is spent; nothing
|
|
18
|
+
* was exchanged with the provider, linked or signed in. Carries
|
|
19
|
+
* `flowSpent`.
|
|
20
|
+
*/
|
|
21
|
+
| 'FLOW_PURPOSE_MISMATCH'
|
|
22
|
+
/**
|
|
23
|
+
* The `returnTo` given to `social.start` or `social.link` is not a path of
|
|
24
|
+
* this site: it must start with a single `/`, with no `\`, no empty or `.`
|
|
25
|
+
* segment and no scheme. Nothing was started.
|
|
26
|
+
*/
|
|
27
|
+
| 'RETURN_TO_INVALID'
|
|
28
|
+
/**
|
|
29
|
+
* The provider failed or refused: an error at its authorization endpoint,
|
|
30
|
+
* a token exchange that failed, an ID token that did not verify, an
|
|
31
|
+
* unreachable provider. **502**; carries `reason` (`denied`, `refused` or
|
|
32
|
+
* `unreachable`) for your logs, never for a response body.
|
|
33
|
+
*/
|
|
34
|
+
| 'PROVIDER_ERROR'
|
|
35
|
+
/**
|
|
36
|
+
* The provider name is not one the user type configures under
|
|
37
|
+
* `social.providers`. Carries `provider`.
|
|
38
|
+
*/
|
|
39
|
+
| 'SOCIAL_PROVIDER_UNKNOWN'
|
|
40
|
+
/**
|
|
41
|
+
* The flow asked for a step-up (`stepUp: { acrValues, maxAge }`) and the
|
|
42
|
+
* identity the provider answered does not prove it: no `acr`, one that was
|
|
43
|
+
* not asked for, no `authTime` or one that is too old; or the provider no
|
|
44
|
+
* longer supports it. **403**; the flow is spent, nobody signed in or
|
|
45
|
+
* linked. Carries `provider`, `returnTo` and `flowSpent`; `reason`
|
|
46
|
+
* (`acr` or `authTime`) is for your logs, never for a response body.
|
|
47
|
+
*/
|
|
48
|
+
| 'SOCIAL_STEP_UP_UNMET'
|
|
49
|
+
/**
|
|
50
|
+
* Nobody holds the e-mail of this social account, and the user type does
|
|
51
|
+
* not configure `social.signUp`: no account was created.
|
|
52
|
+
*/
|
|
53
|
+
| 'SIGN_UP_DISABLED'
|
|
54
|
+
/**
|
|
55
|
+
* A user of this type holds the provider's e-mail, but the provider or the
|
|
56
|
+
* local account does not vouch for it: linking them would hand the account
|
|
57
|
+
* to whoever controls the unverified side. Nothing was linked. Carries
|
|
58
|
+
* `provider`.
|
|
59
|
+
*/
|
|
60
|
+
| 'EMAIL_NOT_VERIFIED_FOR_LINK'
|
|
61
|
+
/**
|
|
62
|
+
* The social account is already linked to another user, or to a user of
|
|
63
|
+
* another type: one account links to one user. Carries `provider`.
|
|
64
|
+
*/
|
|
65
|
+
| 'SOCIAL_ACCOUNT_TAKEN'
|
|
66
|
+
/**
|
|
67
|
+
* `social.unlink` would leave the user no way to sign in: no password, no
|
|
68
|
+
* other link, and no verified e-mail to sign in with on a passwordless
|
|
69
|
+
* type. Nothing was deleted. Carries `provider`.
|
|
70
|
+
*/
|
|
71
|
+
| 'LAST_SIGN_IN_METHOD'
|
|
72
|
+
/**
|
|
73
|
+
* The response a passkey registration was given does not verify (`reason`
|
|
74
|
+
* says why: a wrong challenge or origin, a bad attestation, …), or the name
|
|
75
|
+
* given to `passkeys.register` or `passkeys.rename` is not acceptable
|
|
76
|
+
* (`field: 'name'`). The registration's challenge is spent in the first
|
|
77
|
+
* case: ask for new options.
|
|
78
|
+
*/
|
|
79
|
+
| 'PASSKEY_INVALID'
|
|
80
|
+
/** The credential is already registered: by this user or by another. Nothing was stored. */
|
|
81
|
+
| 'PASSKEY_TAKEN'
|
|
82
|
+
/**
|
|
83
|
+
* The user already holds `passkeys.maxPerUser` passkeys: `passkeys.register`
|
|
84
|
+
* stored none and spent nothing. Remove one, then register. Carries
|
|
85
|
+
* `maxActive` and `userId`.
|
|
86
|
+
*/
|
|
87
|
+
| 'PASSKEY_LIMIT';
|
|
88
|
+
//# sourceMappingURL=codes.social.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.social.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/codes.social.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,oBAAoB;AAC/B;;;;GAIG;AACD,cAAc;AAChB;;;;GAIG;GACD,eAAe;AACjB;;;;;GAKG;GACD,uBAAuB;AACzB;;;;GAIG;GACD,mBAAmB;AACrB;;;;;GAKG;GACD,gBAAgB;AAClB;;;GAGG;GACD,yBAAyB;AAC3B;;;;;;;GAOG;GACD,sBAAsB;AACxB;;;GAGG;GACD,kBAAkB;AACpB;;;;;GAKG;GACD,6BAA6B;AAC/B;;;GAGG;GACD,sBAAsB;AACxB;;;;GAIG;GACD,qBAAqB;AACvB;;;;;;GAMG;GACD,iBAAiB;AACnB,4FAA4F;GAC1F,eAAe;AACjB;;;;GAIG;GACD,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything this package throws at call time, gathered from the files beside
|
|
3
|
+
* this one: the codes a caller switches on (`codes.ts`), what an error carries
|
|
4
|
+
* beside its code (`options.ts`), the base class (`base.ts`), what a store
|
|
5
|
+
* throws (`store.ts`), what a flow refuses (`refusals.ts`) and the HTTP
|
|
6
|
+
* status each code deserves (`status.ts`).
|
|
7
|
+
*
|
|
8
|
+
* Each class is defined once, in one of those files; this one only re-exports
|
|
9
|
+
* them, so `instanceof` still holds whichever path a module imports from.
|
|
10
|
+
*/
|
|
11
|
+
export { JanusError } from './base';
|
|
12
|
+
export type { JanusErrorCode } from './codes';
|
|
13
|
+
export type { CredentialRefusal, InvitationRefusal, Issue, JanusErrorOptions, ProviderRefusal, } from './options';
|
|
14
|
+
export { ApiKeyInvalidError, ApiKeyLimitError, AvatarIdInvalidError, CredentialError, CursorFilterMismatchError, EmailChangeNeedsProofError, EmailUnverifiedError, InvalidCursorError, InvitationInvalidError, InvitationLimitError, InvitationNotPendingError, InvitationRefusedError, MagicLinkDisabledError, MailThrottledError, PasskeyError, PasskeyLimitError, PasswordRequiredError, PermissionDepthError, SecondFactorError, SocialError, StepUpRequiredError, TokenError, UnsupportedError, UserInactiveError, UserInvalidError, } from './refusals';
|
|
15
|
+
export { type JanusErrorStatus, statusOf } from './status';
|
|
16
|
+
export { NotFoundError, StoreConflict, StoreFailure } from './store';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EACX,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,EACL,iBAAiB,EACjB,eAAe,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { PasskeyRefusalReason } from '../../auth/passkeys/verifier';
|
|
2
|
+
/** One thing that was wrong with a user's fields, at one path. */
|
|
3
|
+
export interface Issue {
|
|
4
|
+
/** The path inside the fields, as the schema reported it: `['address', 'city']`. */
|
|
5
|
+
readonly path: readonly (string | number)[];
|
|
6
|
+
readonly message: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Why a sign-in was refused, for your logs and rate limiter. `throttled`:
|
|
10
|
+
* too many passwords tried at the login in this window, and none compared.
|
|
11
|
+
*
|
|
12
|
+
* **Never put it in a response body.** `unknownLogin` is an account
|
|
13
|
+
* enumeration oracle.
|
|
14
|
+
*/
|
|
15
|
+
export type CredentialRefusal = 'unknownLogin' | 'noPassword' | 'wrongPassword' | 'passkey' | 'throttled';
|
|
16
|
+
/**
|
|
17
|
+
* Why the provider of a social flow failed, for your logs: `denied` when the
|
|
18
|
+
* user or the provider refused the authorization (`access_denied`),
|
|
19
|
+
* `refused` for any other protocol failure, `unreachable` when the provider
|
|
20
|
+
* could not be reached. **Never belongs in a response body.**
|
|
21
|
+
*/
|
|
22
|
+
export type ProviderRefusal = 'denied' | 'refused' | 'unreachable';
|
|
23
|
+
/**
|
|
24
|
+
* Why an invitation code was refused, on `INVITATION_INVALID` for a `code`:
|
|
25
|
+
* `unknown` (no such code, or one nothing tells from it), `expired`
|
|
26
|
+
* (pending, past its lifetime), `accepted` or `revoked`. The code is the
|
|
27
|
+
* invitee's own secret, so naming the reason discloses nothing they do not
|
|
28
|
+
* hold; `janus-graphql` puts it in `extensions.reason`.
|
|
29
|
+
*/
|
|
30
|
+
export type InvitationRefusal = 'unknown' | 'expired' | 'accepted' | 'revoked';
|
|
31
|
+
/**
|
|
32
|
+
* What an error may carry beside its code.
|
|
33
|
+
*
|
|
34
|
+
* **No field here ever holds a secret.** Not a password, not a hash, not a
|
|
35
|
+
* session token, not a token secret, not a token's hash, and not a connection
|
|
36
|
+
* URI — a connection string holds a password, and the specs assert its absence
|
|
37
|
+
* from every message. Nor a login: a message reports a shape, never a value,
|
|
38
|
+
* and a conflict carries the login in `login`.
|
|
39
|
+
*/
|
|
40
|
+
export interface JanusErrorOptions {
|
|
41
|
+
readonly userId?: string;
|
|
42
|
+
readonly userType?: string;
|
|
43
|
+
/** The login a conflict names: an address, never a secret. */
|
|
44
|
+
readonly login?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Why a sign-in was refused; `'throttled'` on a `CODE_INVALID` the user's
|
|
47
|
+
* app-code window refused — wait `retryAfter`, a new challenge does not
|
|
48
|
+
* help; or `'apiKey'` on `STEP_UP_REQUIRED`, when the caller is an API key,
|
|
49
|
+
* which can never be fresh; or, on `PASSKEY_INVALID`, why the browser's
|
|
50
|
+
* response did not verify; or, on `INVITATION_INVALID` for a `code`, why
|
|
51
|
+
* the code was refused; or, on `SOCIAL_STEP_UP_UNMET`, which part of the
|
|
52
|
+
* step-up was not proven (`'acr'` or `'authTime'`).
|
|
53
|
+
*/
|
|
54
|
+
readonly reason?: CredentialRefusal | ProviderRefusal | PasskeyRefusalReason | InvitationRefusal | 'acr' | 'authTime' | 'apiKey';
|
|
55
|
+
/** The social provider a refusal names: the application's own name for it. Never an account id. */
|
|
56
|
+
readonly provider?: string;
|
|
57
|
+
/**
|
|
58
|
+
* On a refusal of `social.complete` raised after the flow was
|
|
59
|
+
* authenticated: the path the flow was started with, so a redirect can send
|
|
60
|
+
* the visitor back where they were — or `null` for none. **Not for logs**,
|
|
61
|
+
* and never set on `FLOW_MISMATCH` or `FLOW_EXPIRED`, whose cookie nobody
|
|
62
|
+
* vouched for.
|
|
63
|
+
*/
|
|
64
|
+
readonly returnTo?: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* On a refusal of `social.complete`: whether the flow was spent. `false` for
|
|
67
|
+
* a cookie or `state` refused before anything was spent — keep the cookie,
|
|
68
|
+
* the real callback may still come; `true` once it was, so clear it.
|
|
69
|
+
*/
|
|
70
|
+
readonly flowSpent?: boolean;
|
|
71
|
+
/** The prefix of a hash whose format is unknown. Never the hash. */
|
|
72
|
+
readonly hashPrefix?: string;
|
|
73
|
+
readonly expectedVersion?: number;
|
|
74
|
+
readonly actualVersion?: number;
|
|
75
|
+
readonly issues?: readonly Issue[];
|
|
76
|
+
/** The minimum the policy requires. Never the password that failed it. */
|
|
77
|
+
readonly minLength?: number;
|
|
78
|
+
/** The port method being called: `insertUser`, `consumeToken`. */
|
|
79
|
+
readonly operation?: string;
|
|
80
|
+
/** Which store slot: the sentence should say which store to change. */
|
|
81
|
+
readonly slot?: 'users' | 'sessions' | 'tokens' | 'relations' | 'apiKeys' | 'invitations' | 'socialLinks' | 'passkeys';
|
|
82
|
+
/** The permission being checked, in the notation: `record:r1#view`. */
|
|
83
|
+
readonly permission?: string;
|
|
84
|
+
/** The depth a check may walk. */
|
|
85
|
+
readonly maxDepth?: number;
|
|
86
|
+
/** The standing API keys one user may hold. */
|
|
87
|
+
readonly maxActive?: number;
|
|
88
|
+
/** Which input `API_KEY_INVALID` or `INVITATION_INVALID` refuses. */
|
|
89
|
+
readonly field?: 'name' | 'lifetime' | 'scopes' | 'bound' | 'scope' | 'email' | 'role' | 'locale' | 'invitedBy' | 'ref' | 'type' | 'code';
|
|
90
|
+
/**
|
|
91
|
+
* What is left of a challenge's attempts after a code that did not match
|
|
92
|
+
* — or of the user's window, for `regenerateRecoveryCodes`.
|
|
93
|
+
*/
|
|
94
|
+
readonly attemptsLeft?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Seconds until a throttled request may be made again — a sign-in past
|
|
97
|
+
* its passwords, an app's code past the user's window, or a request past
|
|
98
|
+
* its e-mails: the end of the window,
|
|
99
|
+
* rounded up. A client may read it; the `Retry-After` header takes it as
|
|
100
|
+
* it is.
|
|
101
|
+
*/
|
|
102
|
+
readonly retryAfter?: number;
|
|
103
|
+
readonly cause?: unknown;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,kEAAkE;AAClE,MAAM,WAAW,KAAK;IACrB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAC1B,cAAc,GACd,YAAY,GACZ,eAAe,GACf,SAAS,GACT,WAAW,CAAC;AAEf;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAE/E;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,CAAC,EACb,iBAAiB,GACjB,eAAe,GACf,oBAAoB,GACpB,iBAAiB,GACjB,KAAK,GACL,UAAU,GACV,QAAQ,CAAC;IACZ,mGAAmG;IACnG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,CAAC,EACX,OAAO,GACP,UAAU,GACV,QAAQ,GACR,WAAW,GACX,SAAS,GACT,aAAa,GACb,aAAa,GACb,UAAU,CAAC;IACd,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,kCAAkC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,KAAK,CAAC,EACZ,MAAM,GACN,UAAU,GACV,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,GACP,MAAM,GACN,QAAQ,GACR,WAAW,GACX,KAAK,GACL,MAAM,GACN,MAAM,CAAC;IACV;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { JanusError } from './base';
|
|
2
|
+
import type { JanusErrorCode } from './codes';
|
|
3
|
+
import type { JanusErrorOptions } from './options';
|
|
4
|
+
/** The fields failed the user type's schema. */
|
|
5
|
+
export declare class UserInvalidError extends JanusError {
|
|
6
|
+
name: string;
|
|
7
|
+
readonly code: "USER_INVALID";
|
|
8
|
+
}
|
|
9
|
+
/** The avatar id given to `avatar.set` is not an acceptable id. */
|
|
10
|
+
export declare class AvatarIdInvalidError extends JanusError {
|
|
11
|
+
name: string;
|
|
12
|
+
readonly code: "AVATAR_ID_INVALID";
|
|
13
|
+
}
|
|
14
|
+
/** A password too short, credentials that do not match, or a hash format nobody reads. */
|
|
15
|
+
export declare class CredentialError extends JanusError {
|
|
16
|
+
name: string;
|
|
17
|
+
readonly code: JanusErrorCode;
|
|
18
|
+
constructor(code: Extract<JanusErrorCode, 'PASSWORD_TOO_SHORT' | 'CREDENTIALS_INVALID' | 'HASH_UNSUPPORTED'>, message: string, options?: JanusErrorOptions);
|
|
19
|
+
}
|
|
20
|
+
/** The user is inactive, and the password given was the right one. */
|
|
21
|
+
export declare class UserInactiveError extends JanusError {
|
|
22
|
+
name: string;
|
|
23
|
+
readonly code: "USER_INACTIVE";
|
|
24
|
+
}
|
|
25
|
+
/** The password was right, the e-mail was never verified, and the user type requires it. */
|
|
26
|
+
export declare class EmailUnverifiedError extends JanusError {
|
|
27
|
+
name: string;
|
|
28
|
+
readonly code: "EMAIL_UNVERIFIED";
|
|
29
|
+
}
|
|
30
|
+
/** `update` would move the e-mail of a user who holds a second factor or a passkey (`EMAIL_CHANGE_NEEDS_PROOF`, 409). */
|
|
31
|
+
export declare class EmailChangeNeedsProofError extends JanusError {
|
|
32
|
+
name: string;
|
|
33
|
+
readonly code: "EMAIL_CHANGE_NEEDS_PROOF";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A one-time token that is unknown, already spent, lapsed, or sent to an
|
|
37
|
+
* e-mail the user no longer has — or a one-time code that does not match.
|
|
38
|
+
*/
|
|
39
|
+
export declare class TokenError extends JanusError {
|
|
40
|
+
name: string;
|
|
41
|
+
readonly code: JanusErrorCode;
|
|
42
|
+
constructor(code: Extract<JanusErrorCode, 'TOKEN_UNKNOWN' | 'TOKEN_SPENT' | 'TOKEN_EXPIRED' | 'TOKEN_STALE' | 'CODE_INVALID'>, message: string, options?: JanusErrorOptions);
|
|
43
|
+
}
|
|
44
|
+
/** A second factor asked to change from a state it is not in. */
|
|
45
|
+
export declare class SecondFactorError extends JanusError {
|
|
46
|
+
name: string;
|
|
47
|
+
readonly code: JanusErrorCode;
|
|
48
|
+
constructor(code: Extract<JanusErrorCode, 'SECOND_FACTOR_NOT_ENROLLED' | 'SECOND_FACTOR_ACTIVE'>, message: string, options?: JanusErrorOptions);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The session proved who it is longer ago than the action asks: confirm it
|
|
52
|
+
* with a step-up, then send the request again.
|
|
53
|
+
*/
|
|
54
|
+
export declare class StepUpRequiredError extends JanusError {
|
|
55
|
+
name: string;
|
|
56
|
+
readonly code: "STEP_UP_REQUIRED";
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Too many e-mails asked for one address, or one user, in this window:
|
|
60
|
+
* nothing was issued. Wait `retryAfter` seconds, then ask again.
|
|
61
|
+
*/
|
|
62
|
+
export declare class MailThrottledError extends JanusError {
|
|
63
|
+
name: string;
|
|
64
|
+
readonly code: "MAIL_THROTTLED";
|
|
65
|
+
}
|
|
66
|
+
/** A cursor this store did not mint, or one for another ordering. */
|
|
67
|
+
export declare class InvalidCursorError extends JanusError {
|
|
68
|
+
name: string;
|
|
69
|
+
readonly code: "INVALID_CURSOR";
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A cursor replayed against a filter other than the one it was issued for
|
|
73
|
+
* (another scope, status, role, ref or order). Refused, never read as a page
|
|
74
|
+
* of the other list.
|
|
75
|
+
*/
|
|
76
|
+
export declare class CursorFilterMismatchError extends JanusError {
|
|
77
|
+
name: string;
|
|
78
|
+
readonly code: "CURSOR_FILTER_MISMATCH";
|
|
79
|
+
}
|
|
80
|
+
/** The wired store does not implement the optional capability asked for. */
|
|
81
|
+
export declare class UnsupportedError extends JanusError {
|
|
82
|
+
name: string;
|
|
83
|
+
readonly code: "UNSUPPORTED";
|
|
84
|
+
}
|
|
85
|
+
/** A permission check walked deeper than `maxDepth` without an answer. */
|
|
86
|
+
export declare class PermissionDepthError extends JanusError {
|
|
87
|
+
name: string;
|
|
88
|
+
readonly code: "PERMISSION_DEPTH";
|
|
89
|
+
}
|
|
90
|
+
/** The user already holds `maxActive` standing API keys; none was made. */
|
|
91
|
+
export declare class ApiKeyLimitError extends JanusError {
|
|
92
|
+
name: string;
|
|
93
|
+
readonly code: "API_KEY_LIMIT";
|
|
94
|
+
}
|
|
95
|
+
/** The name, lifetime, scopes or bound object given to `apiKeys.create` is not acceptable. */
|
|
96
|
+
export declare class ApiKeyInvalidError extends JanusError {
|
|
97
|
+
name: string;
|
|
98
|
+
readonly code: "API_KEY_INVALID";
|
|
99
|
+
}
|
|
100
|
+
/** The code or the input given to an `invitations` call is not acceptable. */
|
|
101
|
+
export declare class InvitationInvalidError extends JanusError {
|
|
102
|
+
name: string;
|
|
103
|
+
readonly code: "INVITATION_INVALID";
|
|
104
|
+
}
|
|
105
|
+
/** `invitations.beforeAccept` refused the acceptance: nothing was written, the invitation is still pending. */
|
|
106
|
+
export declare class InvitationRefusedError extends JanusError {
|
|
107
|
+
name: string;
|
|
108
|
+
readonly code: "INVITATION_REFUSED";
|
|
109
|
+
}
|
|
110
|
+
/** The scope already holds `maxPending` pending invitations; none was made. */
|
|
111
|
+
export declare class InvitationLimitError extends JanusError {
|
|
112
|
+
name: string;
|
|
113
|
+
readonly code: "INVITATION_LIMIT";
|
|
114
|
+
}
|
|
115
|
+
/** The invitation is accepted or revoked: it cannot be sent again or revoked. */
|
|
116
|
+
export declare class InvitationNotPendingError extends JanusError {
|
|
117
|
+
name: string;
|
|
118
|
+
readonly code: "INVITATION_NOT_PENDING";
|
|
119
|
+
}
|
|
120
|
+
/** `invitations.accept` was given no password where the invitee needs to choose one. */
|
|
121
|
+
export declare class PasswordRequiredError extends JanusError {
|
|
122
|
+
name: string;
|
|
123
|
+
readonly code: "PASSWORD_REQUIRED";
|
|
124
|
+
}
|
|
125
|
+
/** A magic-link call while `magicLink.enabled` is `false` (`MAGIC_LINK_DISABLED`, 404). */
|
|
126
|
+
export declare class MagicLinkDisabledError extends JanusError {
|
|
127
|
+
name: string;
|
|
128
|
+
readonly code: "MAGIC_LINK_DISABLED";
|
|
129
|
+
}
|
|
130
|
+
/** A social flow that is expired, mismatched, refused, or that the provider failed. */
|
|
131
|
+
export declare class SocialError extends JanusError {
|
|
132
|
+
name: string;
|
|
133
|
+
readonly code: JanusErrorCode;
|
|
134
|
+
constructor(code: Extract<JanusErrorCode, 'FLOW_EXPIRED' | 'FLOW_MISMATCH' | 'FLOW_PURPOSE_MISMATCH' | 'RETURN_TO_INVALID' | 'PROVIDER_ERROR' | 'SOCIAL_PROVIDER_UNKNOWN' | 'SOCIAL_STEP_UP_UNMET' | 'SIGN_UP_DISABLED' | 'EMAIL_NOT_VERIFIED_FOR_LINK' | 'SOCIAL_ACCOUNT_TAKEN' | 'LAST_SIGN_IN_METHOD'>, message: string, options?: JanusErrorOptions);
|
|
135
|
+
}
|
|
136
|
+
/** The user already holds `maxPerUser` passkeys; none was stored. */
|
|
137
|
+
export declare class PasskeyLimitError extends JanusError {
|
|
138
|
+
name: string;
|
|
139
|
+
readonly code: "PASSKEY_LIMIT";
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* A passkey registration or name that is refused (`PASSKEY_INVALID`, 400;
|
|
143
|
+
* `reason` says why a response did not verify, `field: 'name'` a bad name), or
|
|
144
|
+
* a credential that is already registered (`PASSKEY_TAKEN`, 409).
|
|
145
|
+
*/
|
|
146
|
+
export declare class PasskeyError extends JanusError {
|
|
147
|
+
name: string;
|
|
148
|
+
readonly code: JanusErrorCode;
|
|
149
|
+
constructor(code: Extract<JanusErrorCode, 'PASSKEY_INVALID' | 'PASSKEY_TAKEN'>, message: string, options?: JanusErrorOptions);
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=refusals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusals.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/refusals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,gDAAgD;AAChD,qBAAa,gBAAiB,SAAQ,UAAU;IACtC,IAAI,SAAsB;IACnC,SAAkB,IAAI,EAAG,cAAc,CAAU;CACjD;AAED,mEAAmE;AACnE,qBAAa,oBAAqB,SAAQ,UAAU;IAC1C,IAAI,SAA0B;IACvC,SAAkB,IAAI,EAAG,mBAAmB,CAAU;CACtD;AAED,0FAA0F;AAC1F,qBAAa,eAAgB,SAAQ,UAAU;IACrC,IAAI,SAAqB;IAClC,SAAkB,IAAI,EAAE,cAAc,CAAC;gBAGtC,IAAI,EAAE,OAAO,CACZ,cAAc,EACd,oBAAoB,GAAG,qBAAqB,GAAG,kBAAkB,CACjE,EACD,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB;CAK5B;AAED,sEAAsE;AACtE,qBAAa,iBAAkB,SAAQ,UAAU;IACvC,IAAI,SAAuB;IACpC,SAAkB,IAAI,EAAG,eAAe,CAAU;CAClD;AAED,4FAA4F;AAC5F,qBAAa,oBAAqB,SAAQ,UAAU;IAC1C,IAAI,SAA0B;IACvC,SAAkB,IAAI,EAAG,kBAAkB,CAAU;CACrD;AAED,yHAAyH;AACzH,qBAAa,0BAA2B,SAAQ,UAAU;IAChD,IAAI,SAAgC;IAC7C,SAAkB,IAAI,EAAG,0BAA0B,CAAU;CAC7D;AAED;;;GAGG;AACH,qBAAa,UAAW,SAAQ,UAAU;IAChC,IAAI,SAAgB;IAC7B,SAAkB,IAAI,EAAE,cAAc,CAAC;gBAGtC,IAAI,EAAE,OAAO,CACZ,cAAc,EACZ,eAAe,GACf,aAAa,GACb,eAAe,GACf,aAAa,GACb,cAAc,CAChB,EACD,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB;CAK5B;AAED,iEAAiE;AACjE,qBAAa,iBAAkB,SAAQ,UAAU;IACvC,IAAI,SAAuB;IACpC,SAAkB,IAAI,EAAE,cAAc,CAAC;gBAGtC,IAAI,EAAE,OAAO,CACZ,cAAc,EACd,4BAA4B,GAAG,sBAAsB,CACrD,EACD,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB;CAK5B;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,UAAU;IACzC,IAAI,SAAyB;IACtC,SAAkB,IAAI,EAAG,kBAAkB,CAAU;CACrD;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IACxC,IAAI,SAAwB;IACrC,SAAkB,IAAI,EAAG,gBAAgB,CAAU;CACnD;AAED,qEAAqE;AACrE,qBAAa,kBAAmB,SAAQ,UAAU;IACxC,IAAI,SAAwB;IACrC,SAAkB,IAAI,EAAG,gBAAgB,CAAU;CACnD;AAED;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,UAAU;IAC/C,IAAI,SAA+B;IAC5C,SAAkB,IAAI,EAAG,wBAAwB,CAAU;CAC3D;AAED,4EAA4E;AAC5E,qBAAa,gBAAiB,SAAQ,UAAU;IACtC,IAAI,SAAsB;IACnC,SAAkB,IAAI,EAAG,aAAa,CAAU;CAChD;AAED,0EAA0E;AAC1E,qBAAa,oBAAqB,SAAQ,UAAU;IAC1C,IAAI,SAA0B;IACvC,SAAkB,IAAI,EAAG,kBAAkB,CAAU;CACrD;AAED,2EAA2E;AAC3E,qBAAa,gBAAiB,SAAQ,UAAU;IACtC,IAAI,SAAsB;IACnC,SAAkB,IAAI,EAAG,eAAe,CAAU;CAClD;AAED,8FAA8F;AAC9F,qBAAa,kBAAmB,SAAQ,UAAU;IACxC,IAAI,SAAwB;IACrC,SAAkB,IAAI,EAAG,iBAAiB,CAAU;CACpD;AAED,8EAA8E;AAC9E,qBAAa,sBAAuB,SAAQ,UAAU;IAC5C,IAAI,SAA4B;IACzC,SAAkB,IAAI,EAAG,oBAAoB,CAAU;CACvD;AAED,+GAA+G;AAC/G,qBAAa,sBAAuB,SAAQ,UAAU;IAC5C,IAAI,SAA4B;IACzC,SAAkB,IAAI,EAAG,oBAAoB,CAAU;CACvD;AAED,+EAA+E;AAC/E,qBAAa,oBAAqB,SAAQ,UAAU;IAC1C,IAAI,SAA0B;IACvC,SAAkB,IAAI,EAAG,kBAAkB,CAAU;CACrD;AAED,iFAAiF;AACjF,qBAAa,yBAA0B,SAAQ,UAAU;IAC/C,IAAI,SAA+B;IAC5C,SAAkB,IAAI,EAAG,wBAAwB,CAAU;CAC3D;AAED,wFAAwF;AACxF,qBAAa,qBAAsB,SAAQ,UAAU;IAC3C,IAAI,SAA2B;IACxC,SAAkB,IAAI,EAAG,mBAAmB,CAAU;CACtD;AAED,2FAA2F;AAC3F,qBAAa,sBAAuB,SAAQ,UAAU;IAC5C,IAAI,SAA4B;IACzC,SAAkB,IAAI,EAAG,qBAAqB,CAAU;CACxD;AAED,uFAAuF;AACvF,qBAAa,WAAY,SAAQ,UAAU;IACjC,IAAI,SAAiB;IAC9B,SAAkB,IAAI,EAAE,cAAc,CAAC;gBAGtC,IAAI,EAAE,OAAO,CACZ,cAAc,EACZ,cAAc,GACd,eAAe,GACf,uBAAuB,GACvB,mBAAmB,GACnB,gBAAgB,GAChB,yBAAyB,GACzB,sBAAsB,GACtB,kBAAkB,GAClB,6BAA6B,GAC7B,sBAAsB,GACtB,qBAAqB,CACvB,EACD,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB;CAK5B;AAED,qEAAqE;AACrE,qBAAa,iBAAkB,SAAQ,UAAU;IACvC,IAAI,SAAuB;IACpC,SAAkB,IAAI,EAAG,eAAe,CAAU;CAClD;AAED;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAClC,IAAI,SAAkB;IAC/B,SAAkB,IAAI,EAAE,cAAc,CAAC;gBAGtC,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE,iBAAiB,GAAG,eAAe,CAAC,EAClE,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,iBAAiB;CAK5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { JanusErrorCode } from './codes';
|
|
2
|
+
/**
|
|
3
|
+
* Every HTTP status `statusOf` answers: a union of literals, so a framework
|
|
4
|
+
* whose response takes a narrower type than `number` accepts it as it is.
|
|
5
|
+
*/
|
|
6
|
+
export type JanusErrorStatus = 400 | 401 | 403 | 404 | 409 | 429 | 500 | 501 | 502 | 503;
|
|
7
|
+
/**
|
|
8
|
+
* The HTTP status each code deserves — the one table the integrations share,
|
|
9
|
+
* so a Hono route and a GraphQL field answer the same code the same way.
|
|
10
|
+
* Exhaustive: a code added to `JanusErrorCode` stops this file compiling
|
|
11
|
+
* instead of answering `undefined`.
|
|
12
|
+
*
|
|
13
|
+
* `STORE_FAILED` is 503 and nothing else — **an outage is not a negative
|
|
14
|
+
* answer**, and a 401 or a 404 would tell every user they do not exist.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* if (error instanceof JanusError) return Response.json({ code: error.code }, { status: statusOf(error.code) });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function statusOf(code: JanusErrorCode): JanusErrorStatus;
|
|
21
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/errors/janus-error/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACzB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AAEP;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CA6D/D"}
|