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