@cosmicdrift/kumiko-bundled-features 0.368.0 → 0.370.0
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/dist/account-security/constants.d.ts +4 -0
- package/dist/account-security/constants.js +5 -0
- package/dist/account-security/feature.d.ts +14 -0
- package/dist/account-security/feature.js +62 -0
- package/dist/account-security/i18n.d.ts +6 -0
- package/dist/account-security/i18n.js +6 -0
- package/dist/account-security/index.d.ts +3 -0
- package/dist/account-security/index.js +3 -0
- package/dist/admin-shell/feature.d.ts +1 -1
- package/dist/admin-shell/index.d.ts +4 -4
- package/dist/admin-shell/overview-panels.d.ts +1 -1
- package/dist/admin-shell/web/index.d.ts +1 -1
- package/dist/agent-tools/agent-manifest.d.ts +1 -1
- package/dist/agent-tools/index.d.ts +8 -8
- package/dist/agent-tools/manifest-deny-qns.d.ts +1 -1
- package/dist/agent-tools/tool-catalog.d.ts +1 -1
- package/dist/agent-tools/tool-dispatch.d.ts +1 -1
- package/dist/audit/handlers/resolve-audit-tenant.d.ts +1 -1
- package/dist/audit/index.d.ts +3 -3
- package/dist/audit/web/index.d.ts +1 -1
- package/dist/auth-email-password/bootstrap.d.ts +1 -1
- package/dist/auth-email-password/feature.d.ts +7 -6
- package/dist/auth-email-password/feature.js +3 -1
- package/dist/auth-email-password/handlers/confirm-token-flow.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.d.ts +2 -2
- package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-account-unlock.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-email-verification.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-password-reset.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-request.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/token-request-handler.d.ts +2 -2
- package/dist/auth-email-password/index.d.ts +13 -13
- package/dist/auth-email-password/lockout-store.d.ts +1 -1
- package/dist/auth-email-password/magic-link-mail.d.ts +1 -1
- package/dist/auth-email-password/seeding.d.ts +3 -3
- package/dist/auth-email-password/signed-token.d.ts +1 -1
- package/dist/auth-email-password/signup-token-store.d.ts +1 -1
- package/dist/auth-email-password/testing.d.ts +1 -1
- package/dist/auth-email-password/web/auth-gate.d.ts +1 -1
- package/dist/auth-email-password/web/client-plugin.d.ts +2 -2
- package/dist/auth-email-password/web/index.d.ts +42 -42
- package/dist/auth-email-password/web/session-bootstrap-error.d.ts +1 -1
- package/dist/auth-email-password/web/session.d.ts +1 -1
- package/dist/auth-email-password/web/signup-complete-screen.d.ts +1 -1
- package/dist/auth-foundation/feature.d.ts +2 -6
- package/dist/auth-foundation/feature.js +0 -2
- package/dist/auth-foundation/index.d.ts +3 -3
- package/dist/auth-foundation/index.js +1 -1
- package/dist/auth-foundation/resolve-anonymous-access.d.ts +1 -1
- package/dist/auth-mfa/env.d.ts +13 -0
- package/dist/auth-mfa/env.js +24 -0
- package/dist/auth-mfa/errors.d.ts +1 -1
- package/dist/auth-mfa/feature-exports.d.ts +12 -0
- package/dist/auth-mfa/feature-exports.js +72 -0
- package/dist/auth-mfa/feature.d.ts +6 -12
- package/dist/auth-mfa/feature.js +53 -70
- package/dist/auth-mfa/handlers/reencrypt.job.d.ts +1 -1
- package/dist/auth-mfa/index.d.ts +12 -9
- package/dist/auth-mfa/index.js +4 -2
- package/dist/auth-mfa/mfa-challenge-token.d.ts +1 -1
- package/dist/auth-mfa/mfa-preauth-setup-token.d.ts +1 -1
- package/dist/auth-mfa/mfa-status-checker.d.ts +1 -1
- package/dist/auth-mfa/mfa-verify-attempts.d.ts +1 -1
- package/dist/auth-mfa/testing.d.ts +1 -1
- package/dist/auth-mfa/token-secrets.d.ts +7 -0
- package/dist/auth-mfa/token-secrets.js +13 -0
- package/dist/auth-mfa/verify-factor.d.ts +1 -1
- package/dist/auth-mfa/web/index.d.ts +15 -15
- package/dist/auth-mfa/web/mfa-client.d.ts +1 -1
- package/dist/auth-mfa-user-data/index.d.ts +0 -4
- package/dist/auth-mfa-user-data/index.js +0 -2
- package/dist/billing-foundation/checkout-core.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/confirmation-mail.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/consent-gate.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/issue-confirmation.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/register-consent.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/register-termination.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +3 -3
- package/dist/billing-foundation/consumer-protection/termination-notify.d.ts +5 -5
- package/dist/billing-foundation/consumer-protection/termination-pages.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/termination-record.d.ts +3 -3
- package/dist/billing-foundation/consumer-protection/termination-request.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +2 -2
- package/dist/billing-foundation/feature.d.ts +1 -3
- package/dist/billing-foundation/feature.js +0 -2
- package/dist/billing-foundation/handlers/billing-plans.query.d.ts +1 -1
- package/dist/billing-foundation/handlers/create-checkout-session.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/create-portal-session.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/start-plan-checkout.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/switch-plan.write.d.ts +1 -1
- package/dist/billing-foundation/index.d.ts +16 -16
- package/dist/billing-foundation/index.js +1 -1
- package/dist/billing-foundation/plan-catalog.d.ts +1 -1
- package/dist/billing-foundation/subscription-tier-sync.d.ts +3 -1
- package/dist/billing-foundation/subscription-tier-sync.js +3 -2
- package/dist/billing-foundation/types.d.ts +3 -3
- package/dist/billing-foundation/validate-options.d.ts +1 -1
- package/dist/billing-foundation/web/checkout-consent-dialog.d.ts +1 -1
- package/dist/billing-foundation/web/index.d.ts +6 -6
- package/dist/cap-counter/calendar-cap-usage-reservation.d.ts +4 -4
- package/dist/cap-counter/cap-reservation.d.ts +1 -1
- package/dist/cap-counter/enforce-cap.d.ts +1 -1
- package/dist/cap-counter/feature.d.ts +0 -4
- package/dist/cap-counter/feature.js +0 -2
- package/dist/cap-counter/index.d.ts +13 -13
- package/dist/cap-counter/index.js +1 -1
- package/dist/cap-counter/value-cap-guard.d.ts +1 -1
- package/dist/cap-counter/with-cap-enforcement.d.ts +1 -1
- package/dist/cap-overview/feature.d.ts +1 -1
- package/dist/cap-overview/handlers/caps-usage.query.d.ts +1 -1
- package/dist/cap-overview/handlers/tenant-caps-list.query.d.ts +1 -1
- package/dist/cap-overview/index.d.ts +6 -6
- package/dist/cap-overview/screens.d.ts +1 -1
- package/dist/cap-overview/types.d.ts +1 -1
- package/dist/cap-overview/usage-math.d.ts +1 -1
- package/dist/cap-overview/web/cap-usage-bar.d.ts +1 -1
- package/dist/cap-overview/web/index.d.ts +4 -4
- package/dist/channel-discord/discord-channel.d.ts +1 -1
- package/dist/channel-discord/feature.d.ts +1 -1
- package/dist/channel-discord/index.d.ts +2 -2
- package/dist/channel-email/email-channel.d.ts +15 -7
- package/dist/channel-email/email-channel.js +17 -3
- package/dist/channel-email/env.d.ts +14 -0
- package/dist/channel-email/env.js +27 -0
- package/dist/channel-email/feature.d.ts +14 -3
- package/dist/channel-email/feature.js +6 -2
- package/dist/channel-email/index.d.ts +6 -5
- package/dist/channel-email/index.js +2 -1
- package/dist/channel-email/pii-guard.d.ts +1 -1
- package/dist/channel-email/smtp-transport.d.ts +1 -1
- package/dist/channel-email/types.d.ts +1 -1
- package/dist/channel-in-app/in-app-channel.d.ts +1 -1
- package/dist/channel-in-app/index.d.ts +4 -4
- package/dist/channel-push/feature.d.ts +1 -1
- package/dist/channel-push/index.d.ts +3 -3
- package/dist/channel-push/push-channel.d.ts +2 -2
- package/dist/channel-slack/feature.d.ts +1 -1
- package/dist/channel-slack/index.d.ts +2 -2
- package/dist/channel-slack/slack-channel.d.ts +1 -1
- package/dist/channel-teams/feature.d.ts +1 -1
- package/dist/channel-teams/index.d.ts +2 -2
- package/dist/channel-teams/teams-channel.d.ts +1 -1
- package/dist/channel-telegram/feature.d.ts +1 -1
- package/dist/channel-telegram/index.d.ts +2 -2
- package/dist/channel-telegram/telegram-channel.d.ts +1 -1
- package/dist/compliance-profiles/feature.d.ts +1 -1
- package/dist/compliance-profiles/index.d.ts +3 -3
- package/dist/compliance-profiles/web/index.d.ts +2 -2
- package/dist/compliance-profiles-ops/index.d.ts +0 -8
- package/dist/compliance-profiles-ops/index.js +0 -2
- package/dist/config/feature.d.ts +1 -1
- package/dist/config/handlers/reencrypt.job.d.ts +1 -1
- package/dist/config/index.d.ts +8 -8
- package/dist/config/web/client-plugin.d.ts +1 -1
- package/dist/config/web/i18n.js +1 -2
- package/dist/config/web/index.d.ts +2 -2
- package/dist/crypto-shredding/env/index.d.ts +21 -0
- package/dist/crypto-shredding/env/index.js +78 -0
- package/dist/crypto-shredding/feature.d.ts +17 -2
- package/dist/crypto-shredding/feature.js +5 -1
- package/dist/crypto-shredding/index.d.ts +4 -3
- package/dist/crypto-shredding/index.js +1 -0
- package/dist/custom-fields/feature.d.ts +0 -17
- package/dist/custom-fields/feature.js +0 -2
- package/dist/custom-fields/index.d.ts +10 -10
- package/dist/custom-fields/index.js +1 -1
- package/dist/custom-fields/lib/define-or-resurrect.d.ts +2 -2
- package/dist/custom-fields/lib/field-access.d.ts +1 -1
- package/dist/custom-fields/lib/field-definition-row.d.ts +1 -1
- package/dist/custom-fields/lib/quota.d.ts +1 -1
- package/dist/custom-fields/web/index.d.ts +3 -3
- package/dist/data-retention/_internal/parse-override.d.ts +1 -1
- package/dist/data-retention/feature.d.ts +7 -7
- package/dist/data-retention/handlers/policy-for.query.d.ts +1 -1
- package/dist/data-retention/index.d.ts +3 -3
- package/dist/data-retention/resolve-for-tenant.d.ts +2 -2
- package/dist/data-retention/resolve-tenant-preset.d.ts +1 -1
- package/dist/data-retention/resolver.d.ts +1 -1
- package/dist/data-retention/run-retention-cleanup.d.ts +2 -2
- package/dist/delivery/attachment-ref.d.ts +1 -1
- package/dist/delivery/attempt-log.d.ts +1 -1
- package/dist/delivery/channel-context.d.ts +2 -2
- package/dist/delivery/chat-webhook-channel.d.ts +2 -2
- package/dist/delivery/constants.d.ts +1 -1
- package/dist/delivery/delivery-service.d.ts +2 -2
- package/dist/delivery/feature.js +3 -1
- package/dist/delivery/handlers/log.query.d.ts +1 -1
- package/dist/delivery/handlers/unsubscribe-page-chrome.query.d.ts +5 -0
- package/dist/delivery/handlers/unsubscribe-page-chrome.query.js +44 -0
- package/dist/delivery/index.d.ts +20 -19
- package/dist/delivery/index.js +3 -2
- package/dist/delivery/notify-factory.d.ts +1 -1
- package/dist/delivery/public-names.d.ts +1 -0
- package/dist/delivery/public-names.js +1 -0
- package/dist/delivery/testing.d.ts +3 -3
- package/dist/delivery/types.d.ts +3 -3
- package/dist/delivery/unsubscribe-link.d.ts +1 -1
- package/dist/delivery/unsubscribe-page-strings.d.ts +4 -0
- package/dist/delivery/unsubscribe-page-strings.js +4 -0
- package/dist/delivery/unsubscribe-page.d.ts +27 -0
- package/dist/delivery/unsubscribe-page.js +192 -0
- package/dist/delivery/unsubscribe.d.ts +22 -1
- package/dist/delivery/unsubscribe.js +152 -65
- package/dist/delivery/web/index.d.ts +2 -2
- package/dist/derivatives-sharp/feature.d.ts +0 -4
- package/dist/derivatives-sharp/feature.js +0 -2
- package/dist/derivatives-sharp/index.d.ts +2 -2
- package/dist/derivatives-sharp/index.js +1 -1
- package/dist/document-ingest-foundation/feature.d.ts +0 -7
- package/dist/document-ingest-foundation/feature.js +0 -2
- package/dist/document-ingest-foundation/index.d.ts +7 -7
- package/dist/document-ingest-foundation/index.js +1 -1
- package/dist/document-ingest-foundation/pages.d.ts +1 -1
- package/dist/document-ingest-foundation/providers.d.ts +1 -1
- package/dist/document-ingest-foundation/write-document-extract.d.ts +1 -1
- package/dist/feature-toggles/compose-tier-resolver.d.ts +1 -1
- package/dist/feature-toggles/feature.d.ts +5 -5
- package/dist/feature-toggles/handlers/set.write.d.ts +1 -1
- package/dist/feature-toggles/index.d.ts +3 -3
- package/dist/feature-toggles/toggle-sync-signal.d.ts +1 -1
- package/dist/feature-toggles/web/index.d.ts +1 -1
- package/dist/file-derivatives/feature.d.ts +0 -2
- package/dist/file-derivatives/feature.js +0 -2
- package/dist/file-derivatives/index.d.ts +4 -4
- package/dist/file-derivatives/index.js +1 -1
- package/dist/file-foundation/feature.d.ts +0 -6
- package/dist/file-foundation/feature.js +0 -2
- package/dist/file-foundation/index.d.ts +2 -2
- package/dist/file-foundation/index.js +1 -1
- package/dist/file-provider-inmemory/feature.d.ts +0 -4
- package/dist/file-provider-inmemory/feature.js +0 -2
- package/dist/file-provider-inmemory/index.d.ts +1 -1
- package/dist/file-provider-inmemory/index.js +1 -1
- package/dist/file-provider-s3/env-feature.d.ts +12 -2
- package/dist/file-provider-s3/env-feature.js +9 -6
- package/dist/file-provider-s3/env-schema.d.ts +38 -0
- package/dist/file-provider-s3/env-schema.js +51 -0
- package/dist/file-provider-s3/feature.d.ts +1 -14
- package/dist/file-provider-s3/feature.js +0 -2
- package/dist/file-provider-s3/index.d.ts +2 -1
- package/dist/file-provider-s3/index.js +2 -1
- package/dist/file-provider-s3/lib/env-helper.d.ts +1 -1
- package/dist/file-provider-s3/lib/index.d.ts +3 -3
- package/dist/files/index.d.ts +1 -1
- package/dist/files-tenant-data/index.d.ts +2 -2
- package/dist/folders/feature.d.ts +0 -4
- package/dist/folders/feature.js +0 -2
- package/dist/folders/index.d.ts +7 -7
- package/dist/folders/index.js +1 -1
- package/dist/folders/web/folder-manager.d.ts +1 -1
- package/dist/folders/web/index.d.ts +5 -5
- package/dist/folders-user-data/index.d.ts +0 -4
- package/dist/folders-user-data/index.js +0 -2
- package/dist/form-draft/db/queries/cleanup.d.ts +1 -1
- package/dist/form-draft/feature.d.ts +0 -4
- package/dist/form-draft/feature.js +0 -2
- package/dist/form-draft/handlers/cleanup.job.d.ts +1 -1
- package/dist/form-draft/handlers/get.query.d.ts +1 -1
- package/dist/form-draft/index.d.ts +10 -10
- package/dist/form-draft/index.js +1 -1
- package/dist/form-draft/lookup.d.ts +1 -1
- package/dist/form-draft/release-file-refs.d.ts +1 -1
- package/dist/form-draft-user-data/index.d.ts +0 -4
- package/dist/form-draft-user-data/index.js +0 -2
- package/dist/foundation-shared/build-info-env.d.ts +7 -0
- package/dist/foundation-shared/build-info-env.js +15 -0
- package/dist/foundation-shared/demo-admin-env.d.ts +12 -0
- package/dist/foundation-shared/demo-admin-env.js +21 -0
- package/dist/foundation-shared/index.d.ts +5 -3
- package/dist/foundation-shared/index.js +2 -0
- package/dist/host-routing/constants.d.ts +8 -0
- package/dist/host-routing/constants.js +19 -0
- package/dist/host-routing/dispatch.d.ts +24 -0
- package/dist/host-routing/dispatch.js +102 -0
- package/dist/host-routing/feature.d.ts +3 -0
- package/dist/host-routing/feature.js +102 -0
- package/dist/host-routing/host.d.ts +14 -0
- package/dist/host-routing/host.js +37 -0
- package/dist/host-routing/index.d.ts +5 -0
- package/dist/host-routing/index.js +4 -0
- package/dist/host-routing/options.d.ts +27 -0
- package/dist/host-routing/options.js +1 -0
- package/dist/host-routing/validate-options.d.ts +2 -0
- package/dist/host-routing/validate-options.js +29 -0
- package/dist/inbound-mail-foundation/connect-routes.d.ts +2 -2
- package/dist/inbound-mail-foundation/feature.d.ts +0 -4
- package/dist/inbound-mail-foundation/feature.js +0 -2
- package/dist/inbound-mail-foundation/handlers/account-state.d.ts +1 -1
- package/dist/inbound-mail-foundation/index.d.ts +12 -12
- package/dist/inbound-mail-foundation/index.js +1 -1
- package/dist/inbound-mail-foundation/oauth-access-token.d.ts +1 -1
- package/dist/inbound-mail-foundation/provider-factory.d.ts +1 -1
- package/dist/inbound-mail-foundation/types.d.ts +1 -1
- package/dist/inbound-mail-foundation/watch-supervisor.d.ts +2 -2
- package/dist/inbound-provider-imap/feature.d.ts +1 -5
- package/dist/inbound-provider-imap/feature.js +0 -2
- package/dist/inbound-provider-imap/imap-client.d.ts +1 -1
- package/dist/inbound-provider-imap/index.d.ts +3 -3
- package/dist/inbound-provider-imap/index.js +1 -1
- package/dist/inbound-provider-inmemory/feature.d.ts +0 -4
- package/dist/inbound-provider-inmemory/feature.js +0 -2
- package/dist/inbound-provider-inmemory/index.d.ts +1 -1
- package/dist/inbound-provider-inmemory/index.js +1 -1
- package/dist/jobs/handlers/tenant-runs.query.d.ts +1 -1
- package/dist/jobs/index.d.ts +9 -9
- package/dist/jobs/web/index.d.ts +1 -1
- package/dist/ledger/feature.d.ts +0 -4
- package/dist/ledger/feature.js +0 -2
- package/dist/ledger/index.d.ts +10 -10
- package/dist/ledger/index.js +1 -1
- package/dist/ledger/recurring.d.ts +2 -2
- package/dist/ledger/reports.d.ts +2 -2
- package/dist/ledger/web/index.d.ts +3 -3
- package/dist/legal-pages/constants.d.ts +12 -0
- package/dist/legal-pages/constants.js +16 -0
- package/dist/legal-pages/feature.d.ts +6 -3
- package/dist/legal-pages/feature.js +5 -2
- package/dist/legal-pages/index.d.ts +5 -3
- package/dist/legal-pages/index.js +3 -1
- package/dist/legal-pages/layout.d.ts +10 -0
- package/dist/legal-pages/layout.js +32 -0
- package/dist/legal-pages/lib/boot-check.d.ts +1 -1
- package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
- package/dist/legal-pages/markdown.d.ts +2 -2
- package/dist/legal-pages/seed.d.ts +12 -0
- package/dist/legal-pages/seed.js +38 -0
- package/dist/legal-pages/web/index.d.ts +1 -1
- package/dist/mail-foundation/feature.d.ts +4 -7
- package/dist/mail-foundation/feature.js +16 -14
- package/dist/mail-foundation/i18n.d.ts +14 -0
- package/dist/mail-foundation/i18n.js +8 -0
- package/dist/mail-foundation/index.d.ts +1 -1
- package/dist/mail-foundation/index.js +1 -1
- package/dist/mail-transport-inmemory/feature.d.ts +0 -4
- package/dist/mail-transport-inmemory/feature.js +6 -2
- package/dist/mail-transport-inmemory/index.d.ts +1 -1
- package/dist/mail-transport-inmemory/index.js +1 -1
- package/dist/mail-transport-smtp/config-keys.d.ts +7 -0
- package/dist/mail-transport-smtp/config-keys.js +65 -0
- package/dist/mail-transport-smtp/feature.d.ts +0 -16
- package/dist/mail-transport-smtp/feature.js +5 -35
- package/dist/mail-transport-smtp/i18n.d.ts +41 -0
- package/dist/mail-transport-smtp/i18n.js +28 -0
- package/dist/mail-transport-smtp/index.d.ts +1 -1
- package/dist/mail-transport-smtp/index.js +1 -1
- package/dist/managed-pages/branding.d.ts +1 -1
- package/dist/managed-pages/feature.d.ts +1 -1
- package/dist/managed-pages/handlers/branding.query.d.ts +1 -1
- package/dist/managed-pages/index.d.ts +5 -5
- package/dist/managed-pages/web/index.d.ts +2 -2
- package/dist/metrics/compute.d.ts +2 -2
- package/dist/metrics/default-metrics.d.ts +9 -9
- package/dist/metrics/feature.d.ts +1 -1
- package/dist/metrics/filters.d.ts +1 -1
- package/dist/metrics/index.d.ts +5 -5
- package/dist/metrics/types.d.ts +1 -1
- package/dist/metrics/validate.d.ts +1 -1
- package/dist/metrics/window.d.ts +2 -2
- package/dist/notes-history/feature.d.ts +0 -4
- package/dist/notes-history/feature.js +0 -2
- package/dist/notes-history/handlers/add-note.write.d.ts +1 -1
- package/dist/notes-history/index.d.ts +6 -6
- package/dist/notes-history/index.js +1 -1
- package/dist/notes-history/web/index.d.ts +3 -3
- package/dist/notes-history-user-data/index.d.ts +1 -5
- package/dist/notes-history-user-data/index.js +0 -2
- package/dist/page-render/index.d.ts +7 -7
- package/dist/page-render/layout.d.ts +1 -1
- package/dist/page-render/web.d.ts +5 -5
- package/dist/personal-access-tokens/feature.d.ts +3 -3
- package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
- package/dist/personal-access-tokens/i18n.d.ts +1 -1
- package/dist/personal-access-tokens/index.d.ts +13 -13
- package/dist/personal-access-tokens/resolver.d.ts +1 -1
- package/dist/personal-access-tokens/screens.d.ts +1 -1
- package/dist/presets/dsgvo-self-service.d.ts +3 -1
- package/dist/presets/dsgvo-self-service.js +2 -0
- package/dist/presets/index.d.ts +2 -2
- package/dist/presets/security-baseline.d.ts +2 -0
- package/dist/presets/security-baseline.js +2 -0
- package/dist/rate-limiting/index.d.ts +2 -2
- package/dist/readiness/feature.d.ts +0 -8
- package/dist/readiness/feature.js +0 -2
- package/dist/readiness/index.d.ts +3 -3
- package/dist/readiness/index.js +1 -1
- package/dist/renderer-foundation/api.d.ts +2 -2
- package/dist/renderer-foundation/constants.d.ts +2 -2
- package/dist/renderer-foundation/feature.d.ts +1 -1
- package/dist/renderer-foundation/index.d.ts +5 -5
- package/dist/renderer-foundation/types.d.ts +24 -2
- package/dist/renderer-pdf/feature.d.ts +1 -1
- package/dist/renderer-pdf/index.d.ts +2 -2
- package/dist/renderer-pdf/render-table-pdf.d.ts +1 -1
- package/dist/secrets/constants.d.ts +7 -0
- package/dist/secrets/constants.js +7 -0
- package/dist/secrets/db/queries/read.d.ts +1 -1
- package/dist/secrets/feature.d.ts +5 -3
- package/dist/secrets/feature.js +19 -5
- package/dist/secrets/handlers/delete.write.js +4 -3
- package/dist/secrets/handlers/rotate.job.d.ts +1 -1
- package/dist/secrets/handlers/set.write.js +4 -3
- package/dist/secrets/index.d.ts +7 -7
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/secrets-context.d.ts +1 -1
- package/dist/seo/feature.d.ts +3 -3
- package/dist/seo/index.d.ts +6 -6
- package/dist/sessions/feature.d.ts +1 -1
- package/dist/sessions/index.d.ts +8 -8
- package/dist/sessions/session-callbacks.d.ts +1 -1
- package/dist/sessions/testing.d.ts +1 -1
- package/dist/shared/index.d.ts +31 -31
- package/dist/step-dispatcher/dispatch-payload.d.ts +2 -2
- package/dist/step-dispatcher/index.d.ts +3 -3
- package/dist/subscription-mollie/feature.d.ts +2 -2
- package/dist/subscription-mollie/index.d.ts +3 -3
- package/dist/subscription-mollie/verify-webhook.d.ts +1 -1
- package/dist/subscription-stripe/feature.d.ts +17 -1
- package/dist/subscription-stripe/feature.js +19 -1
- package/dist/subscription-stripe/index.d.ts +2 -2
- package/dist/subscription-stripe/index.js +1 -1
- package/dist/subscription-stripe/plugin-methods.d.ts +1 -1
- package/dist/subscription-stripe/verify-webhook.d.ts +1 -1
- package/dist/tags/feature.d.ts +0 -4
- package/dist/tags/feature.js +0 -2
- package/dist/tags/handlers/assign-tag.write.d.ts +1 -1
- package/dist/tags/handlers/remove-tag.write.d.ts +1 -1
- package/dist/tags/index.d.ts +11 -11
- package/dist/tags/index.js +1 -1
- package/dist/tags/web/index.d.ts +9 -9
- package/dist/template-resolver/api.d.ts +4 -4
- package/dist/template-resolver/constants.d.ts +1 -2
- package/dist/template-resolver/constants.js +0 -1
- package/dist/template-resolver/document-sanitizer.d.ts +1 -1
- package/dist/template-resolver/handlers/bundle-import.d.ts +3 -3
- package/dist/template-resolver/handlers/collection-shared.d.ts +2 -2
- package/dist/template-resolver/handlers/copy-locale.write.d.ts +1 -1
- package/dist/template-resolver/handlers/diff-to-system.query.d.ts +1 -1
- package/dist/template-resolver/handlers/find-by-id.query.d.ts +1 -1
- package/dist/template-resolver/handlers/import-bundle-system.write.d.ts +1 -1
- package/dist/template-resolver/handlers/import-bundle.write.d.ts +1 -1
- package/dist/template-resolver/handlers/layout-source.query.d.ts +3 -3
- package/dist/template-resolver/handlers/override-diff.d.ts +2 -2
- package/dist/template-resolver/handlers/overview.query.d.ts +3 -3
- package/dist/template-resolver/handlers/preview.query.d.ts +1 -1
- package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +1 -1
- package/dist/template-resolver/handlers/resource-upload.write.d.ts +1 -1
- package/dist/template-resolver/handlers/send-test.write.d.ts +1 -1
- package/dist/template-resolver/handlers/send-test.write.js +4 -2
- package/dist/template-resolver/handlers/shared.d.ts +1 -1
- package/dist/template-resolver/handlers/template-gates.d.ts +4 -4
- package/dist/template-resolver/handlers/template-write.d.ts +4 -4
- package/dist/template-resolver/handlers/tenant-overrides.query.d.ts +1 -1
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +1 -1
- package/dist/template-resolver/handlers/upsert-system.write.d.ts +1 -1
- package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +1 -1
- package/dist/template-resolver/handlers/usage.query.d.ts +1 -1
- package/dist/template-resolver/handlers/validate.query.d.ts +3 -3
- package/dist/template-resolver/index.d.ts +25 -25
- package/dist/template-resolver/layout-appearance.d.ts +1 -1
- package/dist/template-resolver/layout-regions.d.ts +2 -2
- package/dist/template-resolver/linked-resources.d.ts +1 -1
- package/dist/template-resolver/preview-display-html.d.ts +1 -1
- package/dist/template-resolver/resource-image.d.ts +1 -1
- package/dist/template-resolver/seeding.d.ts +2 -2
- package/dist/template-resolver/store-template-resource.d.ts +1 -1
- package/dist/template-resolver/template-draft.d.ts +2 -2
- package/dist/template-resolver/template-meta.d.ts +2 -2
- package/dist/template-resolver/template-preview.d.ts +7 -6
- package/dist/template-resolver/template-preview.js +19 -12
- package/dist/template-resolver/template-resources.d.ts +1 -1
- package/dist/template-resolver/template-usage.d.ts +3 -1
- package/dist/template-resolver/template-usage.js +1 -0
- package/dist/template-resolver/template-validation.d.ts +1 -1
- package/dist/template-resolver/testing.d.ts +1 -1
- package/dist/template-resolver/user-content-table.d.ts +1 -1
- package/dist/template-resolver/web/document-editor-extensions.d.ts +1 -1
- package/dist/template-resolver/web/document-editor-extensions.js +6 -2
- package/dist/template-resolver/web/document-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.js +13 -10
- package/dist/template-resolver/web/editor-handle.d.ts +1 -1
- package/dist/template-resolver/web/index.d.ts +7 -7
- package/dist/template-resolver/web/placeholder-line-editor-lazy.d.ts +2 -2
- package/dist/template-resolver/web/placeholder-line-editor.d.ts +1 -1
- package/dist/template-resolver-user-data/index.d.ts +0 -4
- package/dist/template-resolver-user-data/index.js +0 -2
- package/dist/tenant/feature.d.ts +1 -1
- package/dist/tenant/index.d.ts +10 -10
- package/dist/tenant/is-tenant-serving-public-content.d.ts +1 -1
- package/dist/tenant/testing.d.ts +1 -1
- package/dist/tenant/web/index.d.ts +3 -3
- package/dist/tenant-handover/feature.d.ts +1 -1
- package/dist/tenant-handover/index.d.ts +3 -3
- package/dist/tenant-handover/signup-handover-provider.d.ts +1 -1
- package/dist/tenant-lifecycle/feature.d.ts +2 -2
- package/dist/tenant-lifecycle/index.d.ts +3 -3
- package/dist/tenant-lifecycle/run-tenant-destroy.d.ts +1 -1
- package/dist/tenant-lifecycle/stages.d.ts +1 -1
- package/dist/tenant-lifecycle/testing.d.ts +1 -1
- package/dist/tenant-settings/feature.d.ts +1 -3
- package/dist/tenant-settings/feature.js +0 -2
- package/dist/tenant-settings/index.d.ts +4 -4
- package/dist/tenant-settings/index.js +1 -1
- package/dist/tier-engine/entity.d.ts +1 -1
- package/dist/tier-engine/feature.d.ts +2 -4
- package/dist/tier-engine/feature.js +0 -2
- package/dist/tier-engine/handlers/get-tenant-tier.query.d.ts +1 -1
- package/dist/tier-engine/i18n.d.ts +0 -2
- package/dist/tier-engine/i18n.js +4 -4
- package/dist/tier-engine/index.d.ts +8 -8
- package/dist/tier-engine/index.js +1 -1
- package/dist/tier-engine/tier-option-gate.d.ts +1 -1
- package/dist/tier-engine/tier-resolver.d.ts +1 -1
- package/dist/tier-engine/web/client-plugin.js +3 -2
- package/dist/tier-engine/web/index.d.ts +1 -1
- package/dist/user/index.d.ts +8 -8
- package/dist/user/invited-global-roles.d.ts +1 -1
- package/dist/user/principal-status.d.ts +1 -1
- package/dist/user/seeding.d.ts +1 -1
- package/dist/user/testing.d.ts +1 -1
- package/dist/user-data-rights/deletion-token.d.ts +1 -1
- package/dist/user-data-rights/feature.d.ts +5 -5
- package/dist/user-data-rights/feature.js +7 -4
- package/dist/user-data-rights/handlers/request-deletion.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/run-forget-cleanup.write.d.ts +3 -3
- package/dist/user-data-rights/index.d.ts +13 -13
- package/dist/user-data-rights/lib/default-mailers.d.ts +7 -4
- package/dist/user-data-rights/lib/default-mailers.js +25 -3
- package/dist/user-data-rights/web/client-plugin.d.ts +1 -1
- package/dist/user-data-rights/web/index.d.ts +8 -8
- package/dist/user-data-rights-defaults/index.d.ts +11 -11
- package/dist/user-profile/index.d.ts +2 -2
- package/dist/user-profile/web/index.d.ts +2 -2
- package/dist/waitlist/constants.d.ts +9 -0
- package/dist/waitlist/constants.js +11 -0
- package/dist/waitlist/entity.d.ts +38 -6
- package/dist/waitlist/entity.js +4 -2
- package/dist/waitlist/entries-admin.d.ts +4 -0
- package/dist/waitlist/entries-admin.js +42 -0
- package/dist/waitlist/feature.d.ts +1 -1
- package/dist/waitlist/feature.js +16 -1
- package/dist/waitlist/handlers/export-purge.write.d.ts +12 -0
- package/dist/waitlist/handlers/export-purge.write.js +61 -0
- package/dist/waitlist/handlers/invite.write.d.ts +1 -1
- package/dist/waitlist/handlers/submit.write.d.ts +1 -1
- package/dist/waitlist/i18n.js +4 -0
- package/dist/waitlist/import.d.ts +24 -0
- package/dist/waitlist/import.js +51 -0
- package/dist/waitlist/index.d.ts +7 -5
- package/dist/waitlist/index.js +2 -0
- package/dist/waitlist/legacy-migrate.d.ts +27 -0
- package/dist/waitlist/legacy-migrate.js +173 -0
- package/dist/waitlist/lib.d.ts +2 -2
- package/dist/waitlist/link-on-signup.d.ts +3 -0
- package/dist/waitlist/link-on-signup.js +83 -0
- package/dist/waitlist/options.d.ts +11 -3
- package/dist/waitlist/payloads.d.ts +3 -0
- package/dist/waitlist/payloads.js +1 -0
- package/dist/workflow-runner/feature.d.ts +0 -4
- package/dist/workflow-runner/feature.js +0 -2
- package/dist/workflow-runner/index.d.ts +4 -4
- package/dist/workflow-runner/index.js +1 -1
- package/package.json +43 -27
- package/src/account-security/changes.json +8 -0
- package/src/auth-email-password/changes.json +6 -0
- package/src/auth-foundation/changes.json +8 -0
- package/src/auth-mfa/changes.json +6 -0
- package/src/auth-mfa-user-data/changes.json +10 -1
- package/src/billing-foundation/changes.json +8 -0
- package/src/cap-counter/changes.json +8 -0
- package/src/channel-email/changes.json +13 -0
- package/src/compliance-profiles-ops/changes.json +10 -0
- package/src/crypto-shredding/changes.json +6 -0
- package/src/custom-fields/changes.json +8 -0
- package/src/delivery/changes.json +12 -0
- package/src/derivatives-sharp/changes.json +8 -0
- package/src/document-ingest-foundation/changes.json +8 -0
- package/src/file-derivatives/changes.json +8 -0
- package/src/file-foundation/changes.json +8 -0
- package/src/file-provider-inmemory/changes.json +10 -1
- package/src/file-provider-s3/changes.json +22 -0
- package/src/folders/changes.json +8 -0
- package/src/folders-user-data/changes.json +10 -1
- package/src/form-draft/changes.json +8 -0
- package/src/form-draft-user-data/changes.json +10 -1
- package/src/foundation-shared/changes.json +8 -1
- package/src/host-routing/changes.json +8 -0
- package/src/inbound-mail-foundation/changes.json +8 -0
- package/src/inbound-provider-imap/changes.json +8 -0
- package/src/inbound-provider-inmemory/changes.json +10 -1
- package/src/ledger/changes.json +8 -0
- package/src/legal-pages/changes.json +6 -0
- package/src/mail-foundation/changes.json +10 -1
- package/src/mail-transport-inmemory/changes.json +10 -1
- package/src/mail-transport-smtp/changes.json +15 -0
- package/src/notes-history/changes.json +8 -0
- package/src/notes-history-user-data/changes.json +8 -0
- package/src/presets/changes.json +6 -0
- package/src/readiness/changes.json +10 -1
- package/src/secrets/changes.json +18 -0
- package/src/subscription-stripe/changes.json +6 -0
- package/src/tags/changes.json +8 -0
- package/src/template-resolver/changes.json +6 -0
- package/src/template-resolver-user-data/changes.json +10 -0
- package/src/tenant-settings/changes.json +10 -1
- package/src/tier-engine/changes.json +8 -0
- package/src/user-data-rights/changes.json +6 -0
- package/src/waitlist/changes.json +7 -0
- package/src/workflow-runner/changes.json +8 -0
- package/dist/file-provider-s3-env/index.d.ts +0 -8
- package/dist/file-provider-s3-env/index.js +0 -7
- package/dist/files-provider-s3/index.d.ts +0 -5
- package/dist/files-provider-s3/index.js +0 -5
- package/src/file-provider-s3-env/changes.json +0 -1
- package/src/files-provider-s3/changes.json +0 -1
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import type { SessionUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { type Registry } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { type AuthProviderBuildDeps, type SessionStore, type TenantExistsFn, type TenantResolverFn, type TenantResolverTrust } from "./types.
|
|
4
|
-
export { EXT_SESSION_STORE, EXT_TENANT_EXISTENCE, EXT_TENANT_RESOLVER, EXT_TOKEN_VERIFIER, } from "./types.
|
|
3
|
+
import { type AuthProviderBuildDeps, type SessionStore, type TenantExistsFn, type TenantResolverFn, type TenantResolverTrust } from "./types.ts";
|
|
4
|
+
export { EXT_SESSION_STORE, EXT_TENANT_EXISTENCE, EXT_TENANT_RESOLVER, EXT_TOKEN_VERIFIER, } from "./types.ts";
|
|
5
5
|
export declare function createAuthFoundationFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
6
6
|
readonly exports: void;
|
|
7
7
|
};
|
|
8
|
-
/** @deprecated Use createAuthFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
9
|
-
export declare const authFoundationFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
10
|
-
readonly exports: void;
|
|
11
|
-
};
|
|
12
8
|
/**
|
|
13
9
|
* Tries every registered tokenVerifier provider's shape against `rawToken`
|
|
14
10
|
* in registration order and calls the first match's verifier. Returns null
|
|
@@ -49,8 +49,6 @@ export function createAuthFoundationFeature() {
|
|
|
49
49
|
r.bootCheck(({ features }) => validateTenantExistenceMultiplicity(features));
|
|
50
50
|
}, { dedupeOptions: {} });
|
|
51
51
|
}
|
|
52
|
-
/** @deprecated Use createAuthFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
53
|
-
export const authFoundationFeature = createAuthFoundationFeature();
|
|
54
52
|
/**
|
|
55
53
|
* Tries every registered tokenVerifier provider's shape against `rawToken`
|
|
56
54
|
* in registration order and calls the first match's verifier. Returns null
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { resolveAnonymousAccessFromRegistry } from "./resolve-anonymous-access.
|
|
3
|
-
export { type AuthProviderBuildDeps, type AuthProviderPlugin, type AuthVerifier, EXT_SESSION_STORE, EXT_TENANT_EXISTENCE, EXT_TENANT_RESOLVER, EXT_TOKEN_VERIFIER, isAuthProviderPlugin, isSessionStoreProvider, isTenantExistenceProvider, isTenantResolverProvider, isTenantResolverTrust, isValidTokenShape, type SessionMassRevoker, type SessionStore, type SessionStoreProvider, type TenantExistenceProvider, type TenantExistsFn, type TenantResolverFn, type TenantResolverProvider, type TenantResolverTrust, type TokenShape, tokenShapeKey, tokenShapeMatches, } from "./types.
|
|
1
|
+
export { createAuthFoundationFeature, type ResolvedTenantResolver, resolveSessionStore, resolveTenantExistence, resolveTenantResolver, resolveTokenVerifier, } from "./feature.ts";
|
|
2
|
+
export { resolveAnonymousAccessFromRegistry } from "./resolve-anonymous-access.ts";
|
|
3
|
+
export { type AuthProviderBuildDeps, type AuthProviderPlugin, type AuthVerifier, EXT_SESSION_STORE, EXT_TENANT_EXISTENCE, EXT_TENANT_RESOLVER, EXT_TOKEN_VERIFIER, isAuthProviderPlugin, isSessionStoreProvider, isTenantExistenceProvider, isTenantResolverProvider, isTenantResolverTrust, isValidTokenShape, type SessionMassRevoker, type SessionStore, type SessionStoreProvider, type TenantExistenceProvider, type TenantExistsFn, type TenantResolverFn, type TenantResolverProvider, type TenantResolverTrust, type TokenShape, tokenShapeKey, tokenShapeMatches, } from "./types.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Public API of the auth-foundation bundled-feature.
|
|
2
|
-
export {
|
|
2
|
+
export { createAuthFoundationFeature, resolveSessionStore, resolveTenantExistence, resolveTenantResolver, resolveTokenVerifier, } from "./feature.js";
|
|
3
3
|
export { resolveAnonymousAccessFromRegistry } from "./resolve-anonymous-access.js";
|
|
4
4
|
export { EXT_SESSION_STORE, EXT_TENANT_EXISTENCE, EXT_TENANT_RESOLVER, EXT_TOKEN_VERIFIER, isAuthProviderPlugin, isSessionStoreProvider, isTenantExistenceProvider, isTenantResolverProvider, isTenantResolverTrust, isValidTokenShape, tokenShapeKey, tokenShapeMatches, } from "./types.js";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { AnonymousAccessConfig, AnonymousAccessResolved } from "@cosmicdrift/kumiko-framework/api";
|
|
7
7
|
import type { Registry } from "@cosmicdrift/kumiko-framework/engine";
|
|
8
|
-
import type { AuthProviderBuildDeps } from "./types.
|
|
8
|
+
import type { AuthProviderBuildDeps } from "./types.ts";
|
|
9
9
|
export declare function resolveAnonymousAccessFromRegistry(base: AnonymousAccessResolved | AnonymousAccessConfig | undefined, deps: AuthProviderBuildDeps & {
|
|
10
10
|
readonly registry: Registry;
|
|
11
11
|
}): Promise<AnonymousAccessResolved | undefined>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/** Optional overrides for the two MFA token HMAC keys. Unset, both are
|
|
3
|
+
* derived from the app's JWT secret, so one env var stays authoritative. */
|
|
4
|
+
export declare const mfaTokenSecretsEnvSchema: z.ZodObject<{
|
|
5
|
+
MFA_SETUP_TOKEN_SECRET: z.ZodOptional<z.ZodString>;
|
|
6
|
+
MFA_CHALLENGE_TOKEN_SECRET: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const authMfaEnvSchema: z.ZodObject<{
|
|
9
|
+
KUMIKO_SECRETS_MASTER_KEY_V1: z.ZodString;
|
|
10
|
+
KUMIKO_SECRETS_MASTER_KEY_CURRENT_VERSION: z.ZodDefault<z.ZodString>;
|
|
11
|
+
MFA_SETUP_TOKEN_SECRET: z.ZodOptional<z.ZodString>;
|
|
12
|
+
MFA_CHALLENGE_TOKEN_SECRET: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { secretsEnvSchema } from "../secrets/index.js";
|
|
3
|
+
const MIN_TOKEN_SECRET_LENGTH = 32;
|
|
4
|
+
function tokenSecretOverride(description) {
|
|
5
|
+
return z
|
|
6
|
+
.string()
|
|
7
|
+
.min(MIN_TOKEN_SECRET_LENGTH)
|
|
8
|
+
.optional()
|
|
9
|
+
.describe(`${description} Unset: derived from JWT_SECRET.`)
|
|
10
|
+
.meta({ kumiko: { pulumi: { generator: "openssl rand -hex 32", secret: true } } });
|
|
11
|
+
}
|
|
12
|
+
/** Optional overrides for the two MFA token HMAC keys. Unset, both are
|
|
13
|
+
* derived from the app's JWT secret, so one env var stays authoritative. */
|
|
14
|
+
export const mfaTokenSecretsEnvSchema = z.object({
|
|
15
|
+
MFA_SETUP_TOKEN_SECRET: tokenSecretOverride("HMAC key of the MFA enable-flow token."),
|
|
16
|
+
MFA_CHALLENGE_TOKEN_SECRET: tokenSecretOverride("HMAC key of the MFA login-challenge token."),
|
|
17
|
+
});
|
|
18
|
+
// Same field instances as `secrets`, so composeEnvSchema treats them as one
|
|
19
|
+
// shared variable; an app mounting auth-mfa without `secrets` still gets the
|
|
20
|
+
// KEK slot (and its _CIPHERTEXT twin) declared.
|
|
21
|
+
export const authMfaEnvSchema = z.object({
|
|
22
|
+
...secretsEnvSchema.shape,
|
|
23
|
+
...mfaTokenSecretsEnvSchema.shape,
|
|
24
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type WriteFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
-
export { AuthMfaErrorCodes as AuthMfaErrors } from "./constants.
|
|
2
|
+
export { AuthMfaErrorCodes as AuthMfaErrors } from "./constants.ts";
|
|
3
3
|
export declare function mfaAlreadyEnabled(): WriteFailure;
|
|
4
4
|
export declare function mfaNotEnabled(): WriteFailure;
|
|
5
5
|
export declare function invalidSetupToken(): WriteFailure;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
+
import type { MfaCodeVerifier } from "./mfa-code-verifier.ts";
|
|
3
|
+
import type { MfaStatusChecker } from "./mfa-status-checker.ts";
|
|
4
|
+
import type { MfaTokenSecretsEnv } from "./token-secrets.ts";
|
|
5
|
+
export type BindMfaRevokeAllOtherSessions = (revoker: (userId: string, currentSid: string | undefined) => Promise<number>) => void;
|
|
6
|
+
export declare function bindMfaRevokeAllOtherSessionsFromFeature(feature: FeatureDefinition): BindMfaRevokeAllOtherSessions | undefined;
|
|
7
|
+
export declare function mfaStatusCheckerFromFeature(feature: FeatureDefinition): MfaStatusChecker | undefined;
|
|
8
|
+
export declare function mfaVerifierFromFeature(feature: FeatureDefinition): MfaCodeVerifier | undefined;
|
|
9
|
+
export type BindMfaTokenSecrets = (masterSecret: string, env: MfaTokenSecretsEnv) => void;
|
|
10
|
+
export declare function bindMfaTokenSecretsFromFeature(feature: FeatureDefinition): BindMfaTokenSecrets | undefined;
|
|
11
|
+
export type BindRevokeAllPatTokens = (revoker: (userId: string) => Promise<number>) => void;
|
|
12
|
+
export declare function bindRevokeAllPatTokensFromFeature(feature: FeatureDefinition): BindRevokeAllPatTokens | undefined;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Reads the late-bind setter off a mounted auth-mfa feature's exports —
|
|
2
|
+
// mirrors sessions' own bindAutoRevokeFromFeature. run{Prod,Dev}App call
|
|
3
|
+
// this once the sessions feature (if mounted) has produced a concrete
|
|
4
|
+
// sessionRevokeAllOthers callback.
|
|
5
|
+
export function bindMfaRevokeAllOtherSessionsFromFeature(feature) {
|
|
6
|
+
const exports = feature.exports;
|
|
7
|
+
if (exports && typeof exports === "object" && "bindRevokeAllOtherSessions" in exports) {
|
|
8
|
+
const { bindRevokeAllOtherSessions } = exports;
|
|
9
|
+
if (typeof bindRevokeAllOtherSessions === "function") {
|
|
10
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
11
|
+
return bindRevokeAllOtherSessions;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
// Reads the eagerly-built `checkMfaStatus` off a mounted auth-mfa feature's
|
|
17
|
+
// exports — no bind-setter needed (see the comment where it's built).
|
|
18
|
+
export function mfaStatusCheckerFromFeature(feature) {
|
|
19
|
+
const exports = feature.exports;
|
|
20
|
+
if (exports && typeof exports === "object" && "checkMfaStatus" in exports) {
|
|
21
|
+
const { checkMfaStatus } = exports;
|
|
22
|
+
if (typeof checkMfaStatus === "function") {
|
|
23
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
24
|
+
return checkMfaStatus;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
// Reads the eagerly-built `verifyMfaCode` off a mounted auth-mfa feature's
|
|
30
|
+
// exports — personal-access-tokens wires this in as its optional
|
|
31
|
+
// mfaVerifier (re-auth gate for minting a token). Same no-bind-setter
|
|
32
|
+
// reasoning as checkMfaStatus above.
|
|
33
|
+
export function mfaVerifierFromFeature(feature) {
|
|
34
|
+
const exports = feature.exports;
|
|
35
|
+
if (exports && typeof exports === "object" && "verifyMfaCode" in exports) {
|
|
36
|
+
const { verifyMfaCode } = exports;
|
|
37
|
+
if (typeof verifyMfaCode === "function") {
|
|
38
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
39
|
+
return verifyMfaCode;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
// Reads the token-secret binder off a mounted auth-mfa feature's exports.
|
|
45
|
+
// run{Prod,Dev}App and setupTestStack call it with the JWT secret once the
|
|
46
|
+
// env is validated, so a dry run never needs the master secret.
|
|
47
|
+
export function bindMfaTokenSecretsFromFeature(feature) {
|
|
48
|
+
const exports = feature.exports;
|
|
49
|
+
if (exports && typeof exports === "object" && "bindTokenSecrets" in exports) {
|
|
50
|
+
const { bindTokenSecrets } = exports;
|
|
51
|
+
if (typeof bindTokenSecrets === "function") {
|
|
52
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
53
|
+
return bindTokenSecrets;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
// Reads the late-bind setter off a mounted auth-mfa feature's exports —
|
|
59
|
+
// run{Prod,Dev}App call this once the personal-access-tokens feature (if
|
|
60
|
+
// mounted) has produced a concrete revoker, same wiring shape as
|
|
61
|
+
// bindMfaRevokeAllOtherSessionsFromFeature.
|
|
62
|
+
export function bindRevokeAllPatTokensFromFeature(feature) {
|
|
63
|
+
const exports = feature.exports;
|
|
64
|
+
if (exports && typeof exports === "object" && "bindRevokeAllPatTokens" in exports) {
|
|
65
|
+
const { bindRevokeAllPatTokens } = exports;
|
|
66
|
+
if (typeof bindRevokeAllPatTokens === "function") {
|
|
67
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
68
|
+
return bindRevokeAllPatTokens;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
4
|
-
import {
|
|
2
|
+
import { type FeatureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
|
|
3
|
+
import { type MfaRequiredPolicy } from "./config.ts";
|
|
4
|
+
import { authMfaEnvSchema } from "./env.ts";
|
|
5
5
|
export type AuthMfaFeatureOptions = {
|
|
6
|
-
readonly setupTokenSecret
|
|
6
|
+
readonly setupTokenSecret?: string;
|
|
7
7
|
readonly issuer: string;
|
|
8
|
-
readonly challengeTokenSecret
|
|
8
|
+
readonly challengeTokenSecret?: string;
|
|
9
9
|
readonly requiredPolicy?: MfaRequiredPolicy;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export declare function bindMfaRevokeAllOtherSessionsFromFeature(feature: FeatureDefinition): BindMfaRevokeAllOtherSessions | undefined;
|
|
13
|
-
export declare function mfaStatusCheckerFromFeature(feature: FeatureDefinition): MfaStatusChecker | undefined;
|
|
14
|
-
export declare function mfaVerifierFromFeature(feature: FeatureDefinition): MfaCodeVerifier | undefined;
|
|
15
|
-
export type BindRevokeAllPatTokens = (revoker: (userId: string) => Promise<number>) => void;
|
|
16
|
-
export declare function bindRevokeAllPatTokensFromFeature(feature: FeatureDefinition): BindRevokeAllPatTokens | undefined;
|
|
17
|
-
export declare function createAuthMfaFeature(opts: AuthMfaFeatureOptions): FeatureDefinition;
|
|
11
|
+
export declare function createAuthMfaFeature(opts: AuthMfaFeatureOptions): FeatureWithEnvSchema<FeatureDefinition, typeof authMfaEnvSchema.shape>;
|
package/dist/auth-mfa/feature.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import {
|
|
2
|
+
import { featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
|
|
3
3
|
import { mfaRequiredConfigKey } from "./config.js";
|
|
4
|
+
import { authMfaEnvSchema } from "./env.js";
|
|
4
5
|
import { createDisableHandler } from "./handlers/disable.write.js";
|
|
5
6
|
import { createEnableConfirmHandler } from "./handlers/enable-confirm.write.js";
|
|
6
7
|
import { createEnableConfirmPreauthHandler } from "./handlers/enable-confirm-preauth.write.js";
|
|
@@ -15,77 +16,23 @@ import { createMfaCodeVerifier } from "./mfa-code-verifier.js";
|
|
|
15
16
|
import { createMfaStatusChecker } from "./mfa-status-checker.js";
|
|
16
17
|
import { userMfaEntity } from "./schema/user-mfa.js";
|
|
17
18
|
import { mfaDisableScreen, mfaEnableScreen, mfaRegenerateRecoveryScreen } from "./screens.js";
|
|
19
|
+
import { resolveMfaTokenSecretsFromEnv } from "./token-secrets.js";
|
|
18
20
|
const REENCRYPT_ESCAPE_HATCH_REASON = "re-encrypts MFA secrets of every tenant's users with the new master key";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const exports = feature.exports;
|
|
25
|
-
if (exports && typeof exports === "object" && "bindRevokeAllOtherSessions" in exports) {
|
|
26
|
-
const { bindRevokeAllOtherSessions } = exports;
|
|
27
|
-
if (typeof bindRevokeAllOtherSessions === "function") {
|
|
28
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
29
|
-
return bindRevokeAllOtherSessions;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
// Reads the eagerly-built `checkMfaStatus` off a mounted auth-mfa feature's
|
|
35
|
-
// exports — no bind-setter needed (see the comment where it's built).
|
|
36
|
-
export function mfaStatusCheckerFromFeature(feature) {
|
|
37
|
-
const exports = feature.exports;
|
|
38
|
-
if (exports && typeof exports === "object" && "checkMfaStatus" in exports) {
|
|
39
|
-
const { checkMfaStatus } = exports;
|
|
40
|
-
if (typeof checkMfaStatus === "function") {
|
|
41
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
42
|
-
return checkMfaStatus;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
// Reads the eagerly-built `verifyMfaCode` off a mounted auth-mfa feature's
|
|
48
|
-
// exports — personal-access-tokens wires this in as its optional
|
|
49
|
-
// mfaVerifier (re-auth gate for minting a token). Same no-bind-setter
|
|
50
|
-
// reasoning as checkMfaStatus above.
|
|
51
|
-
export function mfaVerifierFromFeature(feature) {
|
|
52
|
-
const exports = feature.exports;
|
|
53
|
-
if (exports && typeof exports === "object" && "verifyMfaCode" in exports) {
|
|
54
|
-
const { verifyMfaCode } = exports;
|
|
55
|
-
if (typeof verifyMfaCode === "function") {
|
|
56
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
57
|
-
return verifyMfaCode;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return undefined;
|
|
61
|
-
}
|
|
62
|
-
// Reads the late-bind setter off a mounted auth-mfa feature's exports —
|
|
63
|
-
// run{Prod,Dev}App call this once the personal-access-tokens feature (if
|
|
64
|
-
// mounted) has produced a concrete revoker, same wiring shape as
|
|
65
|
-
// bindMfaRevokeAllOtherSessionsFromFeature.
|
|
66
|
-
export function bindRevokeAllPatTokensFromFeature(feature) {
|
|
67
|
-
const exports = feature.exports;
|
|
68
|
-
if (exports && typeof exports === "object" && "bindRevokeAllPatTokens" in exports) {
|
|
69
|
-
const { bindRevokeAllPatTokens } = exports;
|
|
70
|
-
if (typeof bindRevokeAllPatTokens === "function") {
|
|
71
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
72
|
-
return bindRevokeAllPatTokens;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return undefined;
|
|
21
|
+
function hasBothExplicitSecrets(opts) {
|
|
22
|
+
return (opts.setupTokenSecret !== undefined &&
|
|
23
|
+
opts.setupTokenSecret.trim() !== "" &&
|
|
24
|
+
opts.challengeTokenSecret !== undefined &&
|
|
25
|
+
opts.challengeTokenSecret.trim() !== "");
|
|
76
26
|
}
|
|
77
27
|
export function createAuthMfaFeature(opts) {
|
|
78
|
-
|
|
28
|
+
const feature = defineFeature("auth-mfa", (r) => {
|
|
79
29
|
r.describe("TOTP-based two-factor authentication: enable/disable flow with QR-code setup, 8 single-use recovery codes, and (once wired into a login flow) a second login step after password verification. Secrets are envelope-encrypted at rest via the same MasterKeyProvider as `secrets`/`config`.");
|
|
80
30
|
r.uiHints({
|
|
81
31
|
displayLabel: "2FA / TOTP",
|
|
82
32
|
category: "identity",
|
|
83
33
|
recommended: true,
|
|
84
34
|
});
|
|
85
|
-
|
|
86
|
-
// shared variable; an app mounting auth-mfa without `secrets` still gets the
|
|
87
|
-
// KEK slot (and its _CIPHERTEXT twin) declared.
|
|
88
|
-
r.envSchema(secretsEnvSchema);
|
|
35
|
+
r.envSchema(authMfaEnvSchema);
|
|
89
36
|
r.requires({ features: ["user"] });
|
|
90
37
|
r.requires({ features: ["config"] });
|
|
91
38
|
// verify.write.ts dispatches "tenant:query:memberships" — without this
|
|
@@ -126,20 +73,48 @@ export function createAuthMfaFeature(opts) {
|
|
|
126
73
|
// out of scope for the "MFA-enable/disable" finding this mirrors.
|
|
127
74
|
let revokeAllPatTokens;
|
|
128
75
|
const sharedPatRevoker = (userId) => revokeAllPatTokens?.(userId) ?? Promise.resolve(0);
|
|
76
|
+
// Handlers and the status checker read the secrets through these getters
|
|
77
|
+
// on each call, so the boot can bind them after env validation. Never
|
|
78
|
+
// spread these objects: a spread would read the getter eagerly.
|
|
79
|
+
let boundTokenSecrets = hasBothExplicitSecrets(opts)
|
|
80
|
+
? resolveMfaTokenSecretsFromEnv("", {}, opts)
|
|
81
|
+
: undefined;
|
|
82
|
+
const tokenSecrets = () => {
|
|
83
|
+
if (boundTokenSecrets === undefined) {
|
|
84
|
+
throw new Error("[auth-mfa] token secrets are not bound: pass setupTokenSecret/challengeTokenSecret, or call bindMfaTokenSecretsFromFeature(feature)(masterSecret, env) in a custom boot (runProdApp, runDevApp and setupTestStack do this).");
|
|
85
|
+
}
|
|
86
|
+
return boundTokenSecrets;
|
|
87
|
+
};
|
|
88
|
+
const bindTokenSecrets = (masterSecret, env) => {
|
|
89
|
+
boundTokenSecrets = resolveMfaTokenSecretsFromEnv(masterSecret, env, opts);
|
|
90
|
+
};
|
|
129
91
|
const handlers = {
|
|
130
|
-
enableStart: r.writeHandler(createEnableStartHandler({
|
|
92
|
+
enableStart: r.writeHandler(createEnableStartHandler({
|
|
93
|
+
get setupTokenSecret() {
|
|
94
|
+
return tokenSecrets().setupTokenSecret;
|
|
95
|
+
},
|
|
96
|
+
issuer: opts.issuer,
|
|
97
|
+
})),
|
|
131
98
|
enableStartPreauth: r.writeHandler(createEnableStartPreauthHandler({
|
|
132
|
-
challengeTokenSecret
|
|
133
|
-
|
|
99
|
+
get challengeTokenSecret() {
|
|
100
|
+
return tokenSecrets().challengeTokenSecret;
|
|
101
|
+
},
|
|
102
|
+
get setupTokenSecret() {
|
|
103
|
+
return tokenSecrets().setupTokenSecret;
|
|
104
|
+
},
|
|
134
105
|
issuer: opts.issuer,
|
|
135
106
|
})),
|
|
136
107
|
enableConfirm: r.writeHandler(createEnableConfirmHandler({
|
|
137
|
-
setupTokenSecret
|
|
108
|
+
get setupTokenSecret() {
|
|
109
|
+
return tokenSecrets().setupTokenSecret;
|
|
110
|
+
},
|
|
138
111
|
revokeAllOtherSessions: sharedRevoker,
|
|
139
112
|
revokeAllPatTokens: sharedPatRevoker,
|
|
140
113
|
})),
|
|
141
114
|
enableConfirmPreauth: r.writeHandler(createEnableConfirmPreauthHandler({
|
|
142
|
-
setupTokenSecret
|
|
115
|
+
get setupTokenSecret() {
|
|
116
|
+
return tokenSecrets().setupTokenSecret;
|
|
117
|
+
},
|
|
143
118
|
revokeAllOtherSessions: sharedRevoker,
|
|
144
119
|
revokeAllPatTokens: sharedPatRevoker,
|
|
145
120
|
})),
|
|
@@ -148,7 +123,11 @@ export function createAuthMfaFeature(opts) {
|
|
|
148
123
|
revokeAllPatTokens: sharedPatRevoker,
|
|
149
124
|
})),
|
|
150
125
|
regenerateRecovery: r.writeHandler(createRegenerateRecoveryHandler({ revokeAllOtherSessions: sharedRevoker })),
|
|
151
|
-
verify: r.writeHandler(createMfaVerifyHandler({
|
|
126
|
+
verify: r.writeHandler(createMfaVerifyHandler({
|
|
127
|
+
get challengeTokenSecret() {
|
|
128
|
+
return tokenSecrets().challengeTokenSecret;
|
|
129
|
+
},
|
|
130
|
+
})),
|
|
152
131
|
};
|
|
153
132
|
const queries = {
|
|
154
133
|
status: r.queryHandler(mfaStatusQuery),
|
|
@@ -158,7 +137,9 @@ export function createAuthMfaFeature(opts) {
|
|
|
158
137
|
// from inside its own dispatcher call), not a raw db handle assembled
|
|
159
138
|
// at app-boot time.
|
|
160
139
|
const checkMfaStatus = createMfaStatusChecker({
|
|
161
|
-
challengeTokenSecret
|
|
140
|
+
get challengeTokenSecret() {
|
|
141
|
+
return tokenSecrets().challengeTokenSecret;
|
|
142
|
+
},
|
|
162
143
|
...(opts.requiredPolicy && { requiredPolicy: opts.requiredPolicy }),
|
|
163
144
|
});
|
|
164
145
|
// No late-bind needed — same reasoning as checkMfaStatus: only needs the
|
|
@@ -177,6 +158,8 @@ export function createAuthMfaFeature(opts) {
|
|
|
177
158
|
checkMfaStatus,
|
|
178
159
|
verifyMfaCode,
|
|
179
160
|
bindRevokeAllPatTokens,
|
|
161
|
+
bindTokenSecrets,
|
|
180
162
|
};
|
|
181
163
|
});
|
|
164
|
+
return featureWithEnvSchema(feature, authMfaEnvSchema);
|
|
182
165
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import type { JobContext } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { type ChunkedMigrationStopReason } from "../../shared/index.
|
|
3
|
+
import { type ChunkedMigrationStopReason } from "../../shared/index.ts";
|
|
4
4
|
export type MfaReencryptJobPayload = {
|
|
5
5
|
readonly batchSize?: number;
|
|
6
6
|
readonly maxDurationMs?: number;
|
package/dist/auth-mfa/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export { base32Decode } from "./base32.
|
|
2
|
-
export { type MfaRequiredPolicy, mfaRequiredConfigHandle } from "./config.
|
|
3
|
-
export { AUTH_MFA_FEATURE, AuthMfaHandlers, AuthMfaQueries, MFA_DISABLE_SCREEN_ID, MFA_ENABLE_SCREEN_ID, MFA_REGENERATE_RECOVERY_SCREEN_ID, } from "./constants.
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export type {
|
|
8
|
-
export {
|
|
9
|
-
export
|
|
1
|
+
export { base32Decode } from "./base32.ts";
|
|
2
|
+
export { type MfaRequiredPolicy, mfaRequiredConfigHandle } from "./config.ts";
|
|
3
|
+
export { AUTH_MFA_FEATURE, AuthMfaHandlers, AuthMfaQueries, MFA_DISABLE_SCREEN_ID, MFA_ENABLE_SCREEN_ID, MFA_REGENERATE_RECOVERY_SCREEN_ID, } from "./constants.ts";
|
|
4
|
+
export { authMfaEnvSchema, mfaTokenSecretsEnvSchema } from "./env.ts";
|
|
5
|
+
export type { AuthMfaFeatureOptions } from "./feature.ts";
|
|
6
|
+
export { createAuthMfaFeature } from "./feature.ts";
|
|
7
|
+
export type { BindMfaRevokeAllOtherSessions, BindMfaTokenSecrets, BindRevokeAllPatTokens, } from "./feature-exports.ts";
|
|
8
|
+
export { bindMfaRevokeAllOtherSessionsFromFeature, bindMfaTokenSecretsFromFeature, bindRevokeAllPatTokensFromFeature, mfaStatusCheckerFromFeature, mfaVerifierFromFeature, } from "./feature-exports.ts";
|
|
9
|
+
export type { MfaCodeVerifier, MfaCodeVerifyResult } from "./mfa-code-verifier.ts";
|
|
10
|
+
export type { MfaStatusChecker, MfaStatusCheckResult } from "./mfa-status-checker.ts";
|
|
11
|
+
export { userMfaEntity, userMfaTable } from "./schema/user-mfa.ts";
|
|
12
|
+
export { type MfaTokenSecretOverrides, type MfaTokenSecretsEnv, type ResolvedMfaTokenSecrets, resolveMfaTokenSecrets, resolveMfaTokenSecretsFromEnv, } from "./token-secrets.ts";
|
package/dist/auth-mfa/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { base32Decode } from "./base32.js";
|
|
2
2
|
export { mfaRequiredConfigHandle } from "./config.js";
|
|
3
3
|
export { AUTH_MFA_FEATURE, AuthMfaHandlers, AuthMfaQueries, MFA_DISABLE_SCREEN_ID, MFA_ENABLE_SCREEN_ID, MFA_REGENERATE_RECOVERY_SCREEN_ID, } from "./constants.js";
|
|
4
|
-
export {
|
|
4
|
+
export { authMfaEnvSchema, mfaTokenSecretsEnvSchema } from "./env.js";
|
|
5
|
+
export { createAuthMfaFeature } from "./feature.js";
|
|
6
|
+
export { bindMfaRevokeAllOtherSessionsFromFeature, bindMfaTokenSecretsFromFeature, bindRevokeAllPatTokensFromFeature, mfaStatusCheckerFromFeature, mfaVerifierFromFeature, } from "./feature-exports.js";
|
|
5
7
|
export { userMfaEntity, userMfaTable } from "./schema/user-mfa.js";
|
|
6
|
-
export { resolveMfaTokenSecrets, } from "./token-secrets.js";
|
|
8
|
+
export { resolveMfaTokenSecrets, resolveMfaTokenSecretsFromEnv, } from "./token-secrets.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
3
|
-
import { type HmacTokenVerifyResult } from "./hmac-token-codec.
|
|
3
|
+
import { type HmacTokenVerifyResult } from "./hmac-token-codec.ts";
|
|
4
4
|
export type MfaChallengePayload = {
|
|
5
5
|
readonly userId: string;
|
|
6
6
|
readonly tenantId: TenantId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
3
|
-
import { type HmacTokenVerifyResult } from "./hmac-token-codec.
|
|
3
|
+
import { type HmacTokenVerifyResult } from "./hmac-token-codec.ts";
|
|
4
4
|
export type MfaPreauthSetupPayload = {
|
|
5
5
|
readonly userId: string;
|
|
6
6
|
readonly tenantId: TenantId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HandlerContext, type TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { type MfaRequiredPolicy } from "./config.
|
|
2
|
+
import { type MfaRequiredPolicy } from "./config.ts";
|
|
3
3
|
export type MfaStatusCheckResult = {
|
|
4
4
|
readonly required: false;
|
|
5
5
|
} | {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LockoutCounterState } from "../shared/index.
|
|
1
|
+
import { type LockoutCounterState } from "../shared/index.ts";
|
|
2
2
|
export type MfaVerifyLockoutState = LockoutCounterState;
|
|
3
3
|
export declare const getMfaVerifyLockoutState: (redis: import("ioredis").Redis, subjectId: string) => Promise<LockoutCounterState | null>;
|
|
4
4
|
export declare const recordFailedMfaVerifyAttempt: (redis: import("ioredis").Redis, subjectId: string, maxFailedAttempts: number, lockoutDurationMinutes: number) => Promise<LockoutCounterState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { currentTotpCode } from "./totp.
|
|
1
|
+
export { currentTotpCode } from "./totp.ts";
|
|
@@ -10,3 +10,10 @@ export type ResolvedMfaTokenSecrets = {
|
|
|
10
10
|
* overrides only when a deployment needs its own key for one of them —
|
|
11
11
|
* otherwise deriving keeps a single env var authoritative. */
|
|
12
12
|
export declare function resolveMfaTokenSecrets(masterSecret: string, overrides?: MfaTokenSecretOverrides): ResolvedMfaTokenSecrets;
|
|
13
|
+
export type MfaTokenSecretsEnv = {
|
|
14
|
+
readonly MFA_SETUP_TOKEN_SECRET?: string | undefined;
|
|
15
|
+
readonly MFA_CHALLENGE_TOKEN_SECRET?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
/** Precedence per secret: explicit option, then `MFA_*_TOKEN_SECRET` from
|
|
18
|
+
* env, then derivation from `masterSecret`. Blank values count as absent. */
|
|
19
|
+
export declare function resolveMfaTokenSecretsFromEnv(masterSecret: string, env: MfaTokenSecretsEnv, explicit?: MfaTokenSecretOverrides): ResolvedMfaTokenSecrets;
|
|
@@ -19,3 +19,16 @@ export function resolveMfaTokenSecrets(masterSecret, overrides = {}) {
|
|
|
19
19
|
challengeTokenSecret: resolveSecret(overrides.challengeTokenSecret, () => derivePurposeSecret(masterSecret, CHALLENGE_TOKEN_PURPOSE)),
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
function nonBlank(value) {
|
|
23
|
+
return value !== undefined && value.trim() !== "" ? value : undefined;
|
|
24
|
+
}
|
|
25
|
+
/** Precedence per secret: explicit option, then `MFA_*_TOKEN_SECRET` from
|
|
26
|
+
* env, then derivation from `masterSecret`. Blank values count as absent. */
|
|
27
|
+
export function resolveMfaTokenSecretsFromEnv(masterSecret, env, explicit = {}) {
|
|
28
|
+
const setupTokenSecret = nonBlank(explicit.setupTokenSecret) ?? nonBlank(env.MFA_SETUP_TOKEN_SECRET);
|
|
29
|
+
const challengeTokenSecret = nonBlank(explicit.challengeTokenSecret) ?? nonBlank(env.MFA_CHALLENGE_TOKEN_SECRET);
|
|
30
|
+
return resolveMfaTokenSecrets(masterSecret, {
|
|
31
|
+
...(setupTokenSecret !== undefined && { setupTokenSecret }),
|
|
32
|
+
...(challengeTokenSecret !== undefined && { challengeTokenSecret }),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export type { AuthMfaClientFeature, AuthMfaClientOptions } from "./client-plugin.
|
|
2
|
-
export { authMfaClient } from "./client-plugin.
|
|
3
|
-
export { defaultTranslations, mergeTranslations } from "./i18n.
|
|
4
|
-
export type { MfaSetupPreauthStart, MfaSetupPreauthStartResult, MfaVerifyResult, } from "./mfa-client.
|
|
5
|
-
export { confirmMfaSetupPreauth, startMfaSetupPreauth, verifyMfaChallenge } from "./mfa-client.
|
|
6
|
-
export type { MfaDisableDialogProps } from "./mfa-disable-dialog.
|
|
7
|
-
export { MfaDisableDialog } from "./mfa-disable-dialog.
|
|
8
|
-
export type { MfaRecoveryCodesRevealProps } from "./mfa-recovery-codes-reveal.
|
|
9
|
-
export { MfaRecoveryCodesReveal } from "./mfa-recovery-codes-reveal.
|
|
10
|
-
export type { MfaRegenerateRecoveryDialogProps } from "./mfa-regenerate-recovery-dialog.
|
|
11
|
-
export { MfaRegenerateRecoveryDialog } from "./mfa-regenerate-recovery-dialog.
|
|
12
|
-
export type { MfaSetupPreauthScreenProps } from "./mfa-setup-preauth-screen.
|
|
13
|
-
export { MfaSetupPreauthScreen } from "./mfa-setup-preauth-screen.
|
|
14
|
-
export type { MfaVerifyScreenProps } from "./mfa-verify-screen.
|
|
15
|
-
export { MfaVerifyScreen } from "./mfa-verify-screen.
|
|
1
|
+
export type { AuthMfaClientFeature, AuthMfaClientOptions } from "./client-plugin.ts";
|
|
2
|
+
export { authMfaClient } from "./client-plugin.ts";
|
|
3
|
+
export { defaultTranslations, mergeTranslations } from "./i18n.ts";
|
|
4
|
+
export type { MfaSetupPreauthStart, MfaSetupPreauthStartResult, MfaVerifyResult, } from "./mfa-client.ts";
|
|
5
|
+
export { confirmMfaSetupPreauth, startMfaSetupPreauth, verifyMfaChallenge } from "./mfa-client.ts";
|
|
6
|
+
export type { MfaDisableDialogProps } from "./mfa-disable-dialog.tsx";
|
|
7
|
+
export { MfaDisableDialog } from "./mfa-disable-dialog.tsx";
|
|
8
|
+
export type { MfaRecoveryCodesRevealProps } from "./mfa-recovery-codes-reveal.tsx";
|
|
9
|
+
export { MfaRecoveryCodesReveal } from "./mfa-recovery-codes-reveal.tsx";
|
|
10
|
+
export type { MfaRegenerateRecoveryDialogProps } from "./mfa-regenerate-recovery-dialog.tsx";
|
|
11
|
+
export { MfaRegenerateRecoveryDialog } from "./mfa-regenerate-recovery-dialog.tsx";
|
|
12
|
+
export type { MfaSetupPreauthScreenProps } from "./mfa-setup-preauth-screen.tsx";
|
|
13
|
+
export { MfaSetupPreauthScreen } from "./mfa-setup-preauth-screen.tsx";
|
|
14
|
+
export type { MfaVerifyScreenProps } from "./mfa-verify-screen.tsx";
|
|
15
|
+
export { MfaVerifyScreen } from "./mfa-verify-screen.tsx";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LoginFailure, type LoginResponse } from "../../auth-email-password/web/index.
|
|
1
|
+
import { type LoginFailure, type LoginResponse } from "../../auth-email-password/web/index.ts";
|
|
2
2
|
export type MfaVerifyResult = {
|
|
3
3
|
readonly kind: "success";
|
|
4
4
|
readonly data: LoginResponse;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
export declare function createAuthMfaUserDataFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
2
2
|
readonly exports: void;
|
|
3
3
|
};
|
|
4
|
-
/** @deprecated Use createAuthMfaUserDataFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
5
|
-
export declare const authMfaUserDataFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
6
|
-
readonly exports: void;
|
|
7
|
-
};
|
|
@@ -17,5 +17,3 @@ export function createAuthMfaUserDataFeature() {
|
|
|
17
17
|
});
|
|
18
18
|
}, { dedupeOptions: {} });
|
|
19
19
|
}
|
|
20
|
-
/** @deprecated Use createAuthMfaUserDataFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
21
|
-
export const authMfaUserDataFeature = createAuthMfaUserDataFeature();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
2
|
import type { HandlerContext } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { getSubscriptionForTenant } from "./get-subscription-for-tenant.
|
|
4
|
-
import type { BillingPlanCatalog, SubscriptionProviderPlugin } from "./types.
|
|
3
|
+
import { getSubscriptionForTenant } from "./get-subscription-for-tenant.ts";
|
|
4
|
+
import type { BillingPlanCatalog, SubscriptionProviderPlugin } from "./types.ts";
|
|
5
5
|
/** Narrows a `readonly string[]` to the non-empty tuple shape `z.enum`
|
|
6
6
|
* needs. Callers only reach this with a catalog's `plans` — the feature
|
|
7
7
|
* factory already rejected an empty `plans` array at mount time, so the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CheckoutConsentRecordedPayload } from "../events.
|
|
2
|
-
import { type ConsentLocale } from "./consent-text.
|
|
1
|
+
import type { CheckoutConsentRecordedPayload } from "../events.ts";
|
|
2
|
+
import { type ConsentLocale } from "./consent-text.ts";
|
|
3
3
|
type ConfirmationLabels = {
|
|
4
4
|
readonly subject: string;
|
|
5
5
|
readonly intro: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HandlerContext } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import type { ConsumerProtectionOptions, ProviderPrice } from "../types.
|
|
3
|
+
import type { ConsumerProtectionOptions, ProviderPrice } from "../types.ts";
|
|
4
4
|
export type CheckoutMode = "subscription" | "payment";
|
|
5
5
|
export declare const consentPayloadSchema: z.ZodObject<{
|
|
6
6
|
earlyPerformanceRequested: z.ZodBoolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ConsentLocale } from "./consent-locale.
|
|
2
|
-
export { CONSENT_LOCALES, type ConsentLocale, FALLBACK_CONSENT_LOCALE, resolveConsentLocale, } from "./consent-locale.
|
|
1
|
+
import type { ConsentLocale } from "./consent-locale.ts";
|
|
2
|
+
export { CONSENT_LOCALES, type ConsentLocale, FALLBACK_CONSENT_LOCALE, resolveConsentLocale, } from "./consent-locale.ts";
|
|
3
3
|
export type ConsentTexts = {
|
|
4
4
|
readonly earlyPerformance: string;
|
|
5
5
|
readonly withdrawalLoss: string;
|