@cosmicdrift/kumiko-samples 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/package.json +1 -1
- package/packages/bundled-features/package.json +21 -11
- package/packages/bundled-features/src/account-security/README.md +31 -0
- package/packages/bundled-features/src/account-security/changes.json +8 -0
- package/packages/bundled-features/src/account-security/constants.ts +6 -0
- package/packages/bundled-features/src/account-security/feature.ts +100 -0
- package/packages/bundled-features/src/account-security/i18n.ts +9 -0
- package/packages/bundled-features/src/account-security/index.ts +13 -0
- package/packages/bundled-features/src/admin-shell/feature.ts +4 -4
- package/packages/bundled-features/src/admin-shell/index.ts +4 -4
- package/packages/bundled-features/src/admin-shell/overview-allowlist.ts +3 -3
- package/packages/bundled-features/src/admin-shell/overview-panels.ts +3 -3
- package/packages/bundled-features/src/admin-shell/web/client-plugin.tsx +2 -2
- package/packages/bundled-features/src/admin-shell/web/i18n.ts +1 -1
- package/packages/bundled-features/src/admin-shell/web/index.ts +1 -1
- package/packages/bundled-features/src/agent-tools/agent-doc-lint.ts +1 -1
- package/packages/bundled-features/src/agent-tools/agent-manifest.ts +2 -2
- package/packages/bundled-features/src/agent-tools/feature.ts +1 -1
- package/packages/bundled-features/src/agent-tools/index.ts +8 -8
- package/packages/bundled-features/src/agent-tools/manifest-deny-qns.ts +1 -1
- package/packages/bundled-features/src/agent-tools/tool-catalog.ts +3 -3
- package/packages/bundled-features/src/agent-tools/tool-dispatch.ts +2 -2
- package/packages/bundled-features/src/audit/feature.ts +6 -6
- package/packages/bundled-features/src/audit/handlers/details.query.ts +3 -3
- package/packages/bundled-features/src/audit/handlers/list.query.ts +3 -3
- package/packages/bundled-features/src/audit/handlers/resolve-audit-tenant.ts +1 -1
- package/packages/bundled-features/src/audit/index.ts +3 -3
- package/packages/bundled-features/src/audit/run-escape-hatch-retention.ts +4 -4
- package/packages/bundled-features/src/audit/web/client-plugin.tsx +2 -2
- package/packages/bundled-features/src/audit/web/i18n.ts +1 -1
- package/packages/bundled-features/src/audit/web/index.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/bootstrap.ts +10 -10
- package/packages/bundled-features/src/auth-email-password/changes.json +6 -0
- package/packages/bundled-features/src/auth-email-password/errors.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/feature.ts +26 -24
- package/packages/bundled-features/src/auth-email-password/handlers/change-password.write.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/handlers/confirm-account-unlock.write.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/handlers/confirm-token-flow.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/handlers/invite-accept-with-login.write.ts +10 -10
- package/packages/bundled-features/src/auth-email-password/handlers/invite-accept.write.ts +7 -7
- package/packages/bundled-features/src/auth-email-password/handlers/invite-create.write.ts +11 -11
- package/packages/bundled-features/src/auth-email-password/handlers/invite-info.query.ts +5 -5
- package/packages/bundled-features/src/auth-email-password/handlers/invite-signup-complete.write.ts +11 -11
- package/packages/bundled-features/src/auth-email-password/handlers/login.write.ts +6 -6
- package/packages/bundled-features/src/auth-email-password/handlers/request-account-unlock.write.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/handlers/request-email-verification.write.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/handlers/request-password-reset.write.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/handlers/reset-password.write.ts +6 -6
- package/packages/bundled-features/src/auth-email-password/handlers/self-registration-status.query.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/handlers/signup-confirm.write.ts +7 -7
- package/packages/bundled-features/src/auth-email-password/handlers/signup-request.write.ts +7 -7
- package/packages/bundled-features/src/auth-email-password/handlers/switch-tenant-mfa-gate.write.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/handlers/token-request-handler.ts +5 -5
- package/packages/bundled-features/src/auth-email-password/handlers/verify-email.write.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/index.ts +13 -13
- package/packages/bundled-features/src/auth-email-password/invite-token-store.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/lockout-store.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/magic-link-mail.ts +2 -2
- package/packages/bundled-features/src/auth-email-password/mail-notifications.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/reset-token.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/seeding.ts +6 -6
- package/packages/bundled-features/src/auth-email-password/signed-token.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/signup-activation.ts +4 -4
- package/packages/bundled-features/src/auth-email-password/signup-token-store.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/testing.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/unlock-token.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/verification-token.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/web/auth-gate.tsx +4 -4
- package/packages/bundled-features/src/auth-email-password/web/client-plugin.ts +3 -3
- package/packages/bundled-features/src/auth-email-password/web/confirm-account-unlock-screen.tsx +2 -2
- package/packages/bundled-features/src/auth-email-password/web/default-topbar-actions.tsx +2 -2
- package/packages/bundled-features/src/auth-email-password/web/forgot-password-screen.tsx +2 -2
- package/packages/bundled-features/src/auth-email-password/web/index.ts +42 -42
- package/packages/bundled-features/src/auth-email-password/web/invite-accept-screen.tsx +4 -4
- package/packages/bundled-features/src/auth-email-password/web/login-screen.tsx +4 -4
- package/packages/bundled-features/src/auth-email-password/web/request-account-unlock-screen.tsx +2 -2
- package/packages/bundled-features/src/auth-email-password/web/reset-password-screen.tsx +3 -3
- package/packages/bundled-features/src/auth-email-password/web/session-bootstrap-error.tsx +2 -2
- package/packages/bundled-features/src/auth-email-password/web/session.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/signup-complete-screen.tsx +4 -4
- package/packages/bundled-features/src/auth-email-password/web/signup-screen.tsx +3 -3
- package/packages/bundled-features/src/auth-email-password/web/tenant-menu-items.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/tenant-switcher.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/use-shell-user.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/web/user-menu.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/verify-email-screen.tsx +2 -2
- package/packages/bundled-features/src/auth-foundation/boot-checks.ts +1 -1
- package/packages/bundled-features/src/auth-foundation/changes.json +8 -0
- package/packages/bundled-features/src/auth-foundation/feature.ts +3 -6
- package/packages/bundled-features/src/auth-foundation/index.ts +3 -4
- package/packages/bundled-features/src/auth-foundation/resolve-anonymous-access.ts +2 -2
- package/packages/bundled-features/src/auth-mfa/changes.json +6 -0
- package/packages/bundled-features/src/auth-mfa/db/queries.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/env.ts +28 -0
- package/packages/bundled-features/src/auth-mfa/errors.ts +2 -2
- package/packages/bundled-features/src/auth-mfa/feature-exports.ts +100 -0
- package/packages/bundled-features/src/auth-mfa/feature.ts +86 -105
- package/packages/bundled-features/src/auth-mfa/handlers/disable.write.ts +4 -4
- package/packages/bundled-features/src/auth-mfa/handlers/enable-confirm-preauth.write.ts +10 -10
- package/packages/bundled-features/src/auth-mfa/handlers/enable-confirm.write.ts +7 -7
- package/packages/bundled-features/src/auth-mfa/handlers/enable-start-preauth.write.ts +9 -9
- package/packages/bundled-features/src/auth-mfa/handlers/enable-start.write.ts +9 -9
- package/packages/bundled-features/src/auth-mfa/handlers/reencrypt.job.ts +2 -2
- package/packages/bundled-features/src/auth-mfa/handlers/regenerate-recovery.write.ts +5 -5
- package/packages/bundled-features/src/auth-mfa/handlers/status.query.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/handlers/verify.write.ts +9 -9
- package/packages/bundled-features/src/auth-mfa/index.ts +16 -11
- package/packages/bundled-features/src/auth-mfa/mfa-challenge-token.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/mfa-code-verifier.ts +2 -2
- package/packages/bundled-features/src/auth-mfa/mfa-preauth-setup-token.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/mfa-status-checker.ts +5 -5
- package/packages/bundled-features/src/auth-mfa/mfa-verify-attempts.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/otpauth-uri.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/recovery-codes.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/screens.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/testing.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/token-secrets.ts +26 -0
- package/packages/bundled-features/src/auth-mfa/verify-factor.ts +5 -5
- package/packages/bundled-features/src/auth-mfa/web/client-plugin.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/web/index.ts +15 -15
- package/packages/bundled-features/src/auth-mfa/web/mfa-client.ts +1 -1
- package/packages/bundled-features/src/auth-mfa/web/mfa-disable-dialog.tsx +1 -1
- package/packages/bundled-features/src/auth-mfa/web/mfa-regenerate-recovery-dialog.tsx +1 -1
- package/packages/bundled-features/src/auth-mfa/web/mfa-setup-preauth-screen.tsx +2 -2
- package/packages/bundled-features/src/auth-mfa/web/mfa-verify-screen.tsx +2 -2
- package/packages/bundled-features/src/auth-mfa-user-data/changes.json +10 -1
- package/packages/bundled-features/src/auth-mfa-user-data/hooks.ts +2 -2
- package/packages/bundled-features/src/auth-mfa-user-data/index.ts +1 -4
- package/packages/bundled-features/src/billing-foundation/billing-info-query.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/changes.json +8 -0
- package/packages/bundled-features/src/billing-foundation/checkout-core.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/consumer-protection/confirmation-mail.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-gate.ts +5 -5
- package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-text.ts +2 -2
- package/packages/bundled-features/src/billing-foundation/consumer-protection/issue-confirmation.ts +8 -8
- package/packages/bundled-features/src/billing-foundation/consumer-protection/mail-notifications.ts +4 -4
- package/packages/bundled-features/src/billing-foundation/consumer-protection/register-consent.ts +7 -7
- package/packages/bundled-features/src/billing-foundation/consumer-protection/register-termination.ts +5 -5
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-mail.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-notify.ts +6 -6
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-pages.ts +7 -7
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-record.ts +10 -10
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-request.ts +12 -12
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-texts.ts +2 -2
- package/packages/bundled-features/src/billing-foundation/consumer-protection/withdrawal-period.ts +1 -1
- package/packages/bundled-features/src/billing-foundation/events.ts +2 -2
- package/packages/bundled-features/src/billing-foundation/feature.ts +19 -22
- package/packages/bundled-features/src/billing-foundation/get-subscription-for-tenant.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/handlers/billing-plans.query.ts +4 -4
- package/packages/bundled-features/src/billing-foundation/handlers/create-checkout-session.write.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/handlers/create-portal-session.write.ts +6 -6
- package/packages/bundled-features/src/billing-foundation/handlers/list-subscriptions.query.ts +2 -2
- package/packages/bundled-features/src/billing-foundation/handlers/process-event.write.ts +5 -5
- package/packages/bundled-features/src/billing-foundation/handlers/process-payment-event.write.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/handlers/start-plan-checkout.write.ts +4 -4
- package/packages/bundled-features/src/billing-foundation/handlers/switch-plan.write.ts +5 -5
- package/packages/bundled-features/src/billing-foundation/handlers/sync-subscription.write.ts +4 -4
- package/packages/bundled-features/src/billing-foundation/index.ts +16 -16
- package/packages/bundled-features/src/billing-foundation/plan-catalog.ts +4 -4
- package/packages/bundled-features/src/billing-foundation/projection.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/screens.ts +1 -1
- package/packages/bundled-features/src/billing-foundation/subscription-tier-sync.ts +6 -5
- package/packages/bundled-features/src/billing-foundation/tenant-destroy-hook.ts +4 -4
- package/packages/bundled-features/src/billing-foundation/types.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/validate-options.ts +3 -3
- package/packages/bundled-features/src/billing-foundation/web/billing-plans-panel.tsx +4 -4
- package/packages/bundled-features/src/billing-foundation/web/cancel-contract-dialog.tsx +2 -2
- package/packages/bundled-features/src/billing-foundation/web/checkout-consent-dialog.tsx +2 -2
- package/packages/bundled-features/src/billing-foundation/web/client-plugin.tsx +2 -2
- package/packages/bundled-features/src/billing-foundation/web/index.ts +6 -6
- package/packages/bundled-features/src/billing-foundation/webhook-handler.ts +2 -2
- package/packages/bundled-features/src/cap-counter/book-cap-usage.ts +3 -3
- package/packages/bundled-features/src/cap-counter/calendar-cap-usage-reservation.ts +4 -4
- package/packages/bundled-features/src/cap-counter/cap-reservation.ts +4 -4
- package/packages/bundled-features/src/cap-counter/changes.json +8 -0
- package/packages/bundled-features/src/cap-counter/enforce-cap.ts +2 -2
- package/packages/bundled-features/src/cap-counter/feature.ts +8 -11
- package/packages/bundled-features/src/cap-counter/handlers/get-counter.query.ts +1 -1
- package/packages/bundled-features/src/cap-counter/handlers/increment-rolling.write.ts +2 -2
- package/packages/bundled-features/src/cap-counter/handlers/increment.write.ts +1 -1
- package/packages/bundled-features/src/cap-counter/handlers/mark-soft-warned.write.ts +1 -1
- package/packages/bundled-features/src/cap-counter/index.ts +13 -13
- package/packages/bundled-features/src/cap-counter/stock-cap-guard.ts +1 -1
- package/packages/bundled-features/src/cap-counter/value-cap-guard.ts +2 -2
- package/packages/bundled-features/src/cap-counter/with-cap-enforcement.ts +4 -4
- package/packages/bundled-features/src/cap-overview/feature.ts +8 -8
- package/packages/bundled-features/src/cap-overview/handlers/caps-usage.query.ts +3 -3
- package/packages/bundled-features/src/cap-overview/handlers/tenant-caps-list.query.ts +7 -7
- package/packages/bundled-features/src/cap-overview/handlers/tenant-options.query.ts +1 -1
- package/packages/bundled-features/src/cap-overview/index.ts +6 -6
- package/packages/bundled-features/src/cap-overview/screens.ts +2 -2
- package/packages/bundled-features/src/cap-overview/types.ts +1 -1
- package/packages/bundled-features/src/cap-overview/usage-math.ts +1 -1
- package/packages/bundled-features/src/cap-overview/web/cap-cards-panel.tsx +3 -3
- package/packages/bundled-features/src/cap-overview/web/cap-usage-bar.tsx +2 -2
- package/packages/bundled-features/src/cap-overview/web/cap-usage-cell.tsx +2 -2
- package/packages/bundled-features/src/cap-overview/web/client-plugin.tsx +3 -3
- package/packages/bundled-features/src/cap-overview/web/index.ts +4 -4
- package/packages/bundled-features/src/channel-discord/discord-channel.ts +1 -1
- package/packages/bundled-features/src/channel-discord/feature.ts +1 -1
- package/packages/bundled-features/src/channel-discord/index.ts +2 -2
- package/packages/bundled-features/src/channel-email/changes.json +13 -0
- package/packages/bundled-features/src/channel-email/email-channel.ts +43 -12
- package/packages/bundled-features/src/channel-email/env.ts +28 -0
- package/packages/bundled-features/src/channel-email/feature.ts +9 -5
- package/packages/bundled-features/src/channel-email/index.ts +10 -5
- package/packages/bundled-features/src/channel-email/pii-guard.ts +1 -1
- package/packages/bundled-features/src/channel-email/smtp-transport.ts +1 -1
- package/packages/bundled-features/src/channel-email/types.ts +1 -1
- package/packages/bundled-features/src/channel-in-app/feature.ts +6 -6
- package/packages/bundled-features/src/channel-in-app/handlers/inbox.query.ts +1 -1
- package/packages/bundled-features/src/channel-in-app/handlers/mark-all-read.write.ts +1 -1
- package/packages/bundled-features/src/channel-in-app/handlers/mark-read.write.ts +1 -1
- package/packages/bundled-features/src/channel-in-app/handlers/unread-count.query.ts +1 -1
- package/packages/bundled-features/src/channel-in-app/in-app-channel.ts +2 -2
- package/packages/bundled-features/src/channel-in-app/index.ts +4 -4
- package/packages/bundled-features/src/channel-push/feature.ts +1 -1
- package/packages/bundled-features/src/channel-push/index.ts +3 -3
- package/packages/bundled-features/src/channel-push/push-channel.ts +2 -2
- package/packages/bundled-features/src/channel-slack/feature.ts +1 -1
- package/packages/bundled-features/src/channel-slack/index.ts +2 -2
- package/packages/bundled-features/src/channel-slack/slack-channel.ts +1 -1
- package/packages/bundled-features/src/channel-teams/feature.ts +1 -1
- package/packages/bundled-features/src/channel-teams/index.ts +2 -2
- package/packages/bundled-features/src/channel-teams/teams-channel.ts +1 -1
- package/packages/bundled-features/src/channel-telegram/feature.ts +1 -1
- package/packages/bundled-features/src/channel-telegram/index.ts +2 -2
- package/packages/bundled-features/src/channel-telegram/telegram-channel.ts +1 -1
- package/packages/bundled-features/src/compliance-profiles/feature.ts +9 -9
- package/packages/bundled-features/src/compliance-profiles/handlers/for-tenant.query.ts +2 -2
- package/packages/bundled-features/src/compliance-profiles/handlers/needs-profile.query.ts +1 -1
- package/packages/bundled-features/src/compliance-profiles/handlers/set-profile.write.ts +2 -2
- package/packages/bundled-features/src/compliance-profiles/index.ts +3 -3
- package/packages/bundled-features/src/compliance-profiles/resolve-for-tenant.ts +3 -3
- package/packages/bundled-features/src/compliance-profiles/seeding.ts +1 -1
- package/packages/bundled-features/src/compliance-profiles/web/client-plugin.tsx +3 -3
- package/packages/bundled-features/src/compliance-profiles/web/compliance-profile-catalog.tsx +1 -1
- package/packages/bundled-features/src/compliance-profiles/web/index.ts +2 -2
- package/packages/bundled-features/src/compliance-profiles-ops/changes.json +10 -0
- package/packages/bundled-features/src/compliance-profiles-ops/handlers/tenants-missing-profile.query.ts +2 -2
- package/packages/bundled-features/src/compliance-profiles-ops/index.ts +1 -4
- package/packages/bundled-features/src/config/db/queries/resolver.ts +1 -1
- package/packages/bundled-features/src/config/feature.ts +11 -11
- package/packages/bundled-features/src/config/handlers/cascade.query.ts +3 -3
- package/packages/bundled-features/src/config/handlers/readiness.query.ts +2 -2
- package/packages/bundled-features/src/config/handlers/reencrypt.job.ts +2 -2
- package/packages/bundled-features/src/config/handlers/reset.write.ts +3 -3
- package/packages/bundled-features/src/config/handlers/schema.query.ts +1 -1
- package/packages/bundled-features/src/config/handlers/selected-extensions.query.ts +3 -3
- package/packages/bundled-features/src/config/handlers/set.write.ts +4 -4
- package/packages/bundled-features/src/config/handlers/values.query.ts +3 -3
- package/packages/bundled-features/src/config/index.ts +9 -9
- package/packages/bundled-features/src/config/resolver.ts +2 -2
- package/packages/bundled-features/src/config/web/client-plugin.ts +2 -2
- package/packages/bundled-features/src/config/web/i18n.ts +1 -2
- package/packages/bundled-features/src/config/web/index.ts +2 -2
- package/packages/bundled-features/src/config/write-helpers.ts +3 -3
- package/packages/bundled-features/src/crypto-shredding/changes.json +6 -0
- package/packages/bundled-features/src/crypto-shredding/env/index.ts +94 -0
- package/packages/bundled-features/src/crypto-shredding/feature.ts +9 -5
- package/packages/bundled-features/src/crypto-shredding/handlers/forget-subject.write.ts +6 -6
- package/packages/bundled-features/src/crypto-shredding/index.ts +4 -3
- package/packages/bundled-features/src/custom-fields/changes.json +8 -0
- package/packages/bundled-features/src/custom-fields/executor.ts +1 -1
- package/packages/bundled-features/src/custom-fields/feature.ts +10 -13
- package/packages/bundled-features/src/custom-fields/handlers/clear-custom-field.write.ts +3 -3
- package/packages/bundled-features/src/custom-fields/handlers/define-system-field.write.ts +5 -5
- package/packages/bundled-features/src/custom-fields/handlers/define-tenant-field.write.ts +6 -6
- package/packages/bundled-features/src/custom-fields/handlers/delete-system-field.write.ts +6 -6
- package/packages/bundled-features/src/custom-fields/handlers/delete-tenant-field.write.ts +5 -5
- package/packages/bundled-features/src/custom-fields/handlers/set-custom-field.write.ts +4 -4
- package/packages/bundled-features/src/custom-fields/handlers/update-tenant-field.write.ts +5 -5
- package/packages/bundled-features/src/custom-fields/index.ts +10 -11
- package/packages/bundled-features/src/custom-fields/lib/define-or-resurrect.ts +2 -2
- package/packages/bundled-features/src/custom-fields/lib/field-access.ts +2 -2
- package/packages/bundled-features/src/custom-fields/lib/field-definition-row.ts +1 -1
- package/packages/bundled-features/src/custom-fields/lib/quota.ts +1 -1
- package/packages/bundled-features/src/custom-fields/lib/value-schema.ts +1 -1
- package/packages/bundled-features/src/custom-fields/run-retention.ts +3 -3
- package/packages/bundled-features/src/custom-fields/schemas.ts +1 -1
- package/packages/bundled-features/src/custom-fields/web/client-plugin.tsx +3 -3
- package/packages/bundled-features/src/custom-fields/web/custom-fields-form-section.tsx +1 -1
- package/packages/bundled-features/src/custom-fields/web/index.ts +3 -3
- package/packages/bundled-features/src/custom-fields/wire-for-entity.ts +4 -4
- package/packages/bundled-features/src/custom-fields/wire-user-data-rights.ts +1 -1
- package/packages/bundled-features/src/data-retention/_internal/parse-override.ts +2 -2
- package/packages/bundled-features/src/data-retention/feature.ts +11 -11
- package/packages/bundled-features/src/data-retention/handlers/policy-for.query.ts +2 -2
- package/packages/bundled-features/src/data-retention/index.ts +3 -3
- package/packages/bundled-features/src/data-retention/resolve-for-tenant.ts +6 -6
- package/packages/bundled-features/src/data-retention/resolve-tenant-preset.ts +2 -2
- package/packages/bundled-features/src/data-retention/resolver.ts +1 -1
- package/packages/bundled-features/src/data-retention/run-retention-cleanup.ts +5 -5
- package/packages/bundled-features/src/delivery/address-opt-out.ts +2 -2
- package/packages/bundled-features/src/delivery/attachment-ref.ts +3 -3
- package/packages/bundled-features/src/delivery/attempt-log-retention.ts +1 -1
- package/packages/bundled-features/src/delivery/attempt-log.ts +4 -4
- package/packages/bundled-features/src/delivery/changes.json +12 -0
- package/packages/bundled-features/src/delivery/channel-context.ts +5 -5
- package/packages/bundled-features/src/delivery/chat-webhook-channel.ts +2 -2
- package/packages/bundled-features/src/delivery/constants.ts +2 -2
- package/packages/bundled-features/src/delivery/db/queries/address-opt-outs.ts +1 -1
- package/packages/bundled-features/src/delivery/delivery-service.ts +11 -11
- package/packages/bundled-features/src/delivery/events.ts +1 -1
- package/packages/bundled-features/src/delivery/feature.ts +16 -14
- package/packages/bundled-features/src/delivery/handlers/log.query.ts +4 -4
- package/packages/bundled-features/src/delivery/handlers/preferences.query.ts +1 -1
- package/packages/bundled-features/src/delivery/handlers/resubscribe-address.write.ts +2 -2
- package/packages/bundled-features/src/delivery/handlers/resubscribe-user.write.ts +2 -2
- package/packages/bundled-features/src/delivery/handlers/set-preference.write.ts +2 -2
- package/packages/bundled-features/src/delivery/handlers/unsubscribe-address.write.ts +2 -2
- package/packages/bundled-features/src/delivery/handlers/unsubscribe-page-chrome.query.ts +56 -0
- package/packages/bundled-features/src/delivery/handlers/unsubscribe-user.write.ts +2 -2
- package/packages/bundled-features/src/delivery/i18n.ts +1 -1
- package/packages/bundled-features/src/delivery/index.ts +26 -19
- package/packages/bundled-features/src/delivery/jobs.ts +7 -7
- package/packages/bundled-features/src/delivery/notify-factory.ts +1 -1
- package/packages/bundled-features/src/delivery/public-names.ts +1 -0
- package/packages/bundled-features/src/delivery/testing.ts +5 -5
- package/packages/bundled-features/src/delivery/types.ts +3 -3
- package/packages/bundled-features/src/delivery/unsubscribe-link.ts +4 -4
- package/packages/bundled-features/src/delivery/unsubscribe-page-strings.ts +5 -0
- package/packages/bundled-features/src/delivery/unsubscribe-page.ts +226 -0
- package/packages/bundled-features/src/delivery/unsubscribe.ts +217 -92
- package/packages/bundled-features/src/delivery/upsert-preference.ts +1 -1
- package/packages/bundled-features/src/delivery/web/client-plugin.tsx +6 -6
- package/packages/bundled-features/src/delivery/web/delivery-channel-cell.tsx +1 -1
- package/packages/bundled-features/src/delivery/web/delivery-error-cell.tsx +1 -1
- package/packages/bundled-features/src/delivery/web/delivery-status-cell.tsx +2 -2
- package/packages/bundled-features/src/delivery/web/delivery-type-cell.tsx +1 -1
- package/packages/bundled-features/src/delivery/web/index.ts +2 -2
- package/packages/bundled-features/src/derivatives-sharp/changes.json +8 -0
- package/packages/bundled-features/src/derivatives-sharp/feature.ts +1 -4
- package/packages/bundled-features/src/derivatives-sharp/index.ts +2 -2
- package/packages/bundled-features/src/derivatives-sharp/render.ts +1 -1
- package/packages/bundled-features/src/document-ingest-foundation/boot-checks.ts +2 -2
- package/packages/bundled-features/src/document-ingest-foundation/changes.json +8 -0
- package/packages/bundled-features/src/document-ingest-foundation/executor.ts +1 -1
- package/packages/bundled-features/src/document-ingest-foundation/feature.ts +7 -10
- package/packages/bundled-features/src/document-ingest-foundation/forget-extract-with-file-ref.ts +3 -3
- package/packages/bundled-features/src/document-ingest-foundation/index.ts +7 -10
- package/packages/bundled-features/src/document-ingest-foundation/pages.ts +1 -1
- package/packages/bundled-features/src/document-ingest-foundation/providers.ts +1 -1
- package/packages/bundled-features/src/document-ingest-foundation/tenant-destroy-hook.ts +2 -2
- package/packages/bundled-features/src/document-ingest-foundation/write-document-extract.ts +4 -4
- package/packages/bundled-features/src/feature-toggles/compose-tier-resolver.ts +1 -1
- package/packages/bundled-features/src/feature-toggles/feature.ts +12 -12
- package/packages/bundled-features/src/feature-toggles/handlers/list.query.ts +2 -2
- package/packages/bundled-features/src/feature-toggles/handlers/registered.query.ts +2 -2
- package/packages/bundled-features/src/feature-toggles/handlers/set.write.ts +3 -3
- package/packages/bundled-features/src/feature-toggles/index.ts +3 -3
- package/packages/bundled-features/src/feature-toggles/toggle-runtime.ts +2 -2
- package/packages/bundled-features/src/feature-toggles/toggle-sync-signal.ts +1 -1
- package/packages/bundled-features/src/feature-toggles/web/client-plugin.tsx +2 -2
- package/packages/bundled-features/src/feature-toggles/web/index.ts +1 -1
- package/packages/bundled-features/src/file-derivatives/changes.json +8 -0
- package/packages/bundled-features/src/file-derivatives/feature.ts +2 -5
- package/packages/bundled-features/src/file-derivatives/handlers/public-variant-by-file-ref.query.ts +2 -2
- package/packages/bundled-features/src/file-derivatives/index.ts +4 -4
- package/packages/bundled-features/src/file-foundation/changes.json +8 -0
- package/packages/bundled-features/src/file-foundation/feature.ts +0 -3
- package/packages/bundled-features/src/file-foundation/index.ts +2 -3
- package/packages/bundled-features/src/file-provider-inmemory/changes.json +10 -1
- package/packages/bundled-features/src/file-provider-inmemory/feature.ts +0 -3
- package/packages/bundled-features/src/file-provider-inmemory/index.ts +1 -2
- package/packages/bundled-features/src/file-provider-s3/changes.json +22 -0
- package/packages/bundled-features/src/file-provider-s3/env-feature.ts +10 -7
- package/packages/bundled-features/src/file-provider-s3/env-schema.ts +71 -0
- package/packages/bundled-features/src/file-provider-s3/feature.ts +2 -5
- package/packages/bundled-features/src/file-provider-s3/index.ts +2 -2
- package/packages/bundled-features/src/file-provider-s3/lib/env-helper.ts +1 -1
- package/packages/bundled-features/src/file-provider-s3/lib/index.ts +3 -3
- package/packages/bundled-features/src/files/index.ts +1 -1
- package/packages/bundled-features/src/files-tenant-data/handlers/sweep-orphaned-derivatives.job.ts +2 -2
- package/packages/bundled-features/src/files-tenant-data/hooks.ts +1 -1
- package/packages/bundled-features/src/files-tenant-data/index.ts +4 -4
- package/packages/bundled-features/src/folders/changes.json +8 -0
- package/packages/bundled-features/src/folders/executor.ts +1 -1
- package/packages/bundled-features/src/folders/feature.ts +6 -9
- package/packages/bundled-features/src/folders/handlers/clear-folder.write.ts +5 -5
- package/packages/bundled-features/src/folders/handlers/delete-folder.write.ts +3 -3
- package/packages/bundled-features/src/folders/handlers/set-folder.write.ts +5 -5
- package/packages/bundled-features/src/folders/index.ts +7 -8
- package/packages/bundled-features/src/folders/web/client-plugin.tsx +3 -3
- package/packages/bundled-features/src/folders/web/folder-manager.tsx +2 -2
- package/packages/bundled-features/src/folders/web/folder-section.tsx +2 -2
- package/packages/bundled-features/src/folders/web/index.ts +5 -5
- package/packages/bundled-features/src/folders-user-data/changes.json +10 -1
- package/packages/bundled-features/src/folders-user-data/hooks.ts +1 -1
- package/packages/bundled-features/src/folders-user-data/index.ts +1 -4
- package/packages/bundled-features/src/form-draft/changes.json +8 -0
- package/packages/bundled-features/src/form-draft/db/queries/cleanup.ts +1 -1
- package/packages/bundled-features/src/form-draft/entity.ts +1 -1
- package/packages/bundled-features/src/form-draft/executor.ts +1 -1
- package/packages/bundled-features/src/form-draft/feature.ts +7 -10
- package/packages/bundled-features/src/form-draft/handlers/cleanup.job.ts +4 -4
- package/packages/bundled-features/src/form-draft/handlers/discard.write.ts +6 -6
- package/packages/bundled-features/src/form-draft/handlers/get.query.ts +4 -4
- package/packages/bundled-features/src/form-draft/handlers/list.query.ts +3 -3
- package/packages/bundled-features/src/form-draft/handlers/save.write.ts +5 -5
- package/packages/bundled-features/src/form-draft/index.ts +10 -10
- package/packages/bundled-features/src/form-draft/lookup.ts +2 -2
- package/packages/bundled-features/src/form-draft/release-file-refs.ts +1 -1
- package/packages/bundled-features/src/form-draft/schemas.ts +1 -1
- package/packages/bundled-features/src/form-draft-user-data/changes.json +10 -1
- package/packages/bundled-features/src/form-draft-user-data/hooks.ts +1 -1
- package/packages/bundled-features/src/form-draft-user-data/index.ts +1 -4
- package/packages/bundled-features/src/foundation-shared/build-info-env.ts +16 -0
- package/packages/bundled-features/src/foundation-shared/changes.json +8 -1
- package/packages/bundled-features/src/foundation-shared/demo-admin-env.ts +24 -0
- package/packages/bundled-features/src/foundation-shared/index.ts +5 -3
- package/packages/bundled-features/src/foundation-shared/mail-host-policy.ts +1 -1
- package/packages/bundled-features/src/host-routing/README.md +89 -0
- package/packages/bundled-features/src/host-routing/changes.json +8 -0
- package/packages/bundled-features/src/host-routing/constants.ts +24 -0
- package/packages/bundled-features/src/host-routing/dispatch.ts +130 -0
- package/packages/bundled-features/src/host-routing/feature.ts +146 -0
- package/packages/bundled-features/src/host-routing/host.ts +42 -0
- package/packages/bundled-features/src/host-routing/index.ts +21 -0
- package/packages/bundled-features/src/host-routing/options.ts +43 -0
- package/packages/bundled-features/src/host-routing/validate-options.ts +38 -0
- package/packages/bundled-features/src/inbound-mail-foundation/changes.json +8 -0
- package/packages/bundled-features/src/inbound-mail-foundation/connect-routes.ts +5 -5
- package/packages/bundled-features/src/inbound-mail-foundation/events.ts +1 -1
- package/packages/bundled-features/src/inbound-mail-foundation/feature.ts +12 -15
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/account-state.ts +1 -1
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/connect-account.write.ts +3 -3
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/disconnect-account.write.ts +3 -3
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/ingest-message.write.ts +4 -4
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/list-accounts.query.ts +3 -3
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/list-messages.query.ts +3 -3
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/update-account.write.ts +3 -3
- package/packages/bundled-features/src/inbound-mail-foundation/index.ts +12 -12
- package/packages/bundled-features/src/inbound-mail-foundation/oauth-access-token.ts +2 -2
- package/packages/bundled-features/src/inbound-mail-foundation/projection.ts +2 -2
- package/packages/bundled-features/src/inbound-mail-foundation/provider-factory.ts +2 -2
- package/packages/bundled-features/src/inbound-mail-foundation/retention-sweep.ts +3 -3
- package/packages/bundled-features/src/inbound-mail-foundation/tenant-destroy-hook.ts +3 -3
- package/packages/bundled-features/src/inbound-mail-foundation/types.ts +1 -1
- package/packages/bundled-features/src/inbound-mail-foundation/watch-supervisor.ts +6 -6
- package/packages/bundled-features/src/inbound-provider-imap/changes.json +8 -0
- package/packages/bundled-features/src/inbound-provider-imap/feature.ts +3 -6
- package/packages/bundled-features/src/inbound-provider-imap/imap-client.ts +1 -1
- package/packages/bundled-features/src/inbound-provider-imap/index.ts +3 -4
- package/packages/bundled-features/src/inbound-provider-inmemory/changes.json +10 -1
- package/packages/bundled-features/src/inbound-provider-inmemory/feature.ts +0 -3
- package/packages/bundled-features/src/inbound-provider-inmemory/index.ts +1 -2
- package/packages/bundled-features/src/jobs/db/queries/retention.ts +3 -3
- package/packages/bundled-features/src/jobs/db/queries/stale-run-sweep.ts +5 -5
- package/packages/bundled-features/src/jobs/feature.ts +16 -16
- package/packages/bundled-features/src/jobs/handlers/catalog.query.ts +1 -1
- package/packages/bundled-features/src/jobs/handlers/detail.query.ts +2 -2
- package/packages/bundled-features/src/jobs/handlers/list.query.ts +2 -2
- package/packages/bundled-features/src/jobs/handlers/retention-cleanup.job.ts +1 -1
- package/packages/bundled-features/src/jobs/handlers/retry.write.ts +3 -3
- package/packages/bundled-features/src/jobs/handlers/stale-run-sweep.job.ts +1 -1
- package/packages/bundled-features/src/jobs/handlers/tenant-failures.query.ts +1 -1
- package/packages/bundled-features/src/jobs/handlers/tenant-runs.query.ts +1 -1
- package/packages/bundled-features/src/jobs/handlers/trigger.write.ts +2 -2
- package/packages/bundled-features/src/jobs/index.ts +9 -9
- package/packages/bundled-features/src/jobs/job-run-logger.ts +6 -6
- package/packages/bundled-features/src/jobs/web/client-plugin.tsx +2 -2
- package/packages/bundled-features/src/jobs/web/i18n.ts +1 -1
- package/packages/bundled-features/src/jobs/web/index.ts +1 -1
- package/packages/bundled-features/src/ledger/changes.json +8 -0
- package/packages/bundled-features/src/ledger/entity.ts +1 -1
- package/packages/bundled-features/src/ledger/executor.ts +1 -1
- package/packages/bundled-features/src/ledger/feature.ts +7 -10
- package/packages/bundled-features/src/ledger/handlers/confirm-schedule-period.write.ts +5 -5
- package/packages/bundled-features/src/ledger/handlers/create-transaction.write.ts +3 -3
- package/packages/bundled-features/src/ledger/handlers/reports.query.ts +3 -3
- package/packages/bundled-features/src/ledger/handlers/reverse-transaction.write.ts +5 -5
- package/packages/bundled-features/src/ledger/index.ts +10 -11
- package/packages/bundled-features/src/ledger/recurring.ts +2 -2
- package/packages/bundled-features/src/ledger/reports.ts +2 -2
- package/packages/bundled-features/src/ledger/schemas.ts +1 -1
- package/packages/bundled-features/src/ledger/web/index.ts +3 -3
- package/packages/bundled-features/src/legal-pages/README.md +39 -0
- package/packages/bundled-features/src/legal-pages/changes.json +6 -0
- package/packages/bundled-features/src/legal-pages/constants.ts +22 -0
- package/packages/bundled-features/src/legal-pages/feature.ts +14 -7
- package/packages/bundled-features/src/legal-pages/index.ts +12 -3
- package/packages/bundled-features/src/legal-pages/layout.ts +45 -0
- package/packages/bundled-features/src/legal-pages/lib/boot-check.ts +1 -1
- package/packages/bundled-features/src/legal-pages/lib/validate-routes.ts +1 -1
- package/packages/bundled-features/src/legal-pages/markdown.ts +2 -2
- package/packages/bundled-features/src/legal-pages/seed.ts +53 -0
- package/packages/bundled-features/src/legal-pages/web/client-plugin.ts +1 -1
- package/packages/bundled-features/src/legal-pages/web/index.ts +1 -1
- package/packages/bundled-features/src/mail-foundation/changes.json +10 -1
- package/packages/bundled-features/src/mail-foundation/feature.ts +21 -15
- package/packages/bundled-features/src/mail-foundation/i18n.ts +8 -0
- package/packages/bundled-features/src/mail-foundation/index.ts +1 -2
- package/packages/bundled-features/src/mail-transport-inmemory/changes.json +10 -1
- package/packages/bundled-features/src/mail-transport-inmemory/feature.ts +6 -3
- package/packages/bundled-features/src/mail-transport-inmemory/index.ts +1 -2
- package/packages/bundled-features/src/mail-transport-smtp/changes.json +15 -0
- package/packages/bundled-features/src/mail-transport-smtp/config-keys.ts +67 -0
- package/packages/bundled-features/src/mail-transport-smtp/feature.ts +6 -36
- package/packages/bundled-features/src/mail-transport-smtp/i18n.ts +28 -0
- package/packages/bundled-features/src/mail-transport-smtp/index.ts +1 -2
- package/packages/bundled-features/src/managed-pages/branding.ts +1 -1
- package/packages/bundled-features/src/managed-pages/css-gate.ts +1 -1
- package/packages/bundled-features/src/managed-pages/feature.ts +12 -12
- package/packages/bundled-features/src/managed-pages/handlers/branding.query.ts +1 -1
- package/packages/bundled-features/src/managed-pages/handlers/by-slug.query.ts +1 -1
- package/packages/bundled-features/src/managed-pages/handlers/by-tenant-published.query.ts +1 -1
- package/packages/bundled-features/src/managed-pages/handlers/page-crud.ts +1 -1
- package/packages/bundled-features/src/managed-pages/handlers/set.write.ts +2 -2
- package/packages/bundled-features/src/managed-pages/index.ts +5 -5
- package/packages/bundled-features/src/managed-pages/screens/branding-screen.ts +1 -1
- package/packages/bundled-features/src/managed-pages/seeding.ts +1 -1
- package/packages/bundled-features/src/managed-pages/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/managed-pages/web/i18n.ts +1 -1
- package/packages/bundled-features/src/managed-pages/web/index.ts +2 -2
- package/packages/bundled-features/src/metrics/compute.ts +3 -3
- package/packages/bundled-features/src/metrics/default-metrics.ts +5 -5
- package/packages/bundled-features/src/metrics/feature.ts +7 -7
- package/packages/bundled-features/src/metrics/filters.ts +1 -1
- package/packages/bundled-features/src/metrics/index.ts +5 -5
- package/packages/bundled-features/src/metrics/types.ts +1 -1
- package/packages/bundled-features/src/metrics/validate.ts +3 -3
- package/packages/bundled-features/src/metrics/window.ts +2 -2
- package/packages/bundled-features/src/notes-history/changes.json +8 -0
- package/packages/bundled-features/src/notes-history/executor.ts +1 -1
- package/packages/bundled-features/src/notes-history/feature.ts +6 -9
- package/packages/bundled-features/src/notes-history/handlers/add-note.write.ts +6 -6
- package/packages/bundled-features/src/notes-history/index.ts +6 -7
- package/packages/bundled-features/src/notes-history/web/client-plugin.tsx +3 -3
- package/packages/bundled-features/src/notes-history/web/index.ts +3 -3
- package/packages/bundled-features/src/notes-history/web/notes-section.tsx +1 -1
- package/packages/bundled-features/src/notes-history-user-data/changes.json +8 -0
- package/packages/bundled-features/src/notes-history-user-data/hooks.ts +1 -1
- package/packages/bundled-features/src/notes-history-user-data/index.ts +2 -5
- package/packages/bundled-features/src/page-render/cached-page-response.ts +1 -1
- package/packages/bundled-features/src/page-render/index.ts +7 -7
- package/packages/bundled-features/src/page-render/layout.ts +2 -2
- package/packages/bundled-features/src/page-render/web.ts +5 -5
- package/packages/bundled-features/src/personal-access-tokens/feature.ts +13 -13
- package/packages/bundled-features/src/personal-access-tokens/handlers/available-scopes.query.ts +1 -1
- package/packages/bundled-features/src/personal-access-tokens/handlers/create.write.ts +5 -5
- package/packages/bundled-features/src/personal-access-tokens/handlers/list.query.ts +3 -3
- package/packages/bundled-features/src/personal-access-tokens/handlers/revoke.write.ts +3 -3
- package/packages/bundled-features/src/personal-access-tokens/hash.ts +1 -1
- package/packages/bundled-features/src/personal-access-tokens/i18n.ts +2 -2
- package/packages/bundled-features/src/personal-access-tokens/index.ts +13 -13
- package/packages/bundled-features/src/personal-access-tokens/resolver.ts +5 -5
- package/packages/bundled-features/src/personal-access-tokens/revoke-for-user.ts +2 -2
- package/packages/bundled-features/src/personal-access-tokens/roles.ts +2 -2
- package/packages/bundled-features/src/personal-access-tokens/schema/api-token.ts +1 -1
- package/packages/bundled-features/src/personal-access-tokens/screens.ts +2 -2
- package/packages/bundled-features/src/presets/changes.json +6 -0
- package/packages/bundled-features/src/presets/dsgvo-self-service.ts +7 -5
- package/packages/bundled-features/src/presets/index.ts +2 -2
- package/packages/bundled-features/src/presets/security-baseline.ts +6 -4
- package/packages/bundled-features/src/rate-limiting/feature.ts +2 -2
- package/packages/bundled-features/src/rate-limiting/handlers/bucket-access.ts +1 -1
- package/packages/bundled-features/src/rate-limiting/handlers/status.query.ts +2 -2
- package/packages/bundled-features/src/rate-limiting/index.ts +2 -2
- package/packages/bundled-features/src/readiness/changes.json +10 -1
- package/packages/bundled-features/src/readiness/feature.ts +1 -4
- package/packages/bundled-features/src/readiness/handlers/status.query.ts +1 -1
- package/packages/bundled-features/src/readiness/index.ts +3 -3
- package/packages/bundled-features/src/renderer-foundation/api.ts +2 -2
- package/packages/bundled-features/src/renderer-foundation/constants.ts +2 -2
- package/packages/bundled-features/src/renderer-foundation/feature.ts +2 -2
- package/packages/bundled-features/src/renderer-foundation/index.ts +8 -5
- package/packages/bundled-features/src/renderer-foundation/types.ts +22 -2
- package/packages/bundled-features/src/renderer-pdf/feature.ts +2 -2
- package/packages/bundled-features/src/renderer-pdf/index.ts +2 -2
- package/packages/bundled-features/src/renderer-pdf/render-table-pdf.ts +2 -2
- package/packages/bundled-features/src/secrets/changes.json +18 -0
- package/packages/bundled-features/src/secrets/constants.ts +9 -0
- package/packages/bundled-features/src/secrets/db/queries/read.ts +1 -1
- package/packages/bundled-features/src/secrets/feature.ts +34 -15
- package/packages/bundled-features/src/secrets/handlers/delete.write.ts +8 -5
- package/packages/bundled-features/src/secrets/handlers/list.query.ts +2 -2
- package/packages/bundled-features/src/secrets/handlers/rotate.job.ts +2 -2
- package/packages/bundled-features/src/secrets/handlers/set.write.ts +8 -5
- package/packages/bundled-features/src/secrets/i18n.ts +1 -1
- package/packages/bundled-features/src/secrets/index.ts +9 -7
- package/packages/bundled-features/src/secrets/secrets-context.ts +3 -3
- package/packages/bundled-features/src/secrets/write-gate.ts +1 -1
- package/packages/bundled-features/src/seo/feature.ts +8 -8
- package/packages/bundled-features/src/seo/handlers/seo-config.query.ts +1 -1
- package/packages/bundled-features/src/seo/index.ts +6 -6
- package/packages/bundled-features/src/sessions/feature.ts +13 -13
- package/packages/bundled-features/src/sessions/handlers/cleanup.job.ts +1 -1
- package/packages/bundled-features/src/sessions/handlers/detail.query.ts +2 -2
- package/packages/bundled-features/src/sessions/handlers/list.query.ts +2 -2
- package/packages/bundled-features/src/sessions/handlers/mine.query.ts +2 -2
- package/packages/bundled-features/src/sessions/handlers/revoke-all-for-user.write.ts +2 -2
- package/packages/bundled-features/src/sessions/handlers/revoke-all-others.write.ts +3 -3
- package/packages/bundled-features/src/sessions/handlers/revoke.write.ts +3 -3
- package/packages/bundled-features/src/sessions/index.ts +8 -8
- package/packages/bundled-features/src/sessions/schema/user-session.ts +1 -1
- package/packages/bundled-features/src/sessions/screens.ts +1 -1
- package/packages/bundled-features/src/sessions/session-callbacks.ts +6 -6
- package/packages/bundled-features/src/sessions/testing.ts +1 -1
- package/packages/bundled-features/src/shared/index.ts +31 -31
- package/packages/bundled-features/src/shared/password-hashing.ts +1 -1
- package/packages/bundled-features/src/shared/row-bound-grant.ts +1 -1
- package/packages/bundled-features/src/step-dispatcher/deliver-dispatch-request.ts +4 -4
- package/packages/bundled-features/src/step-dispatcher/dispatch-payload.ts +2 -2
- package/packages/bundled-features/src/step-dispatcher/feature.ts +3 -3
- package/packages/bundled-features/src/step-dispatcher/index.ts +3 -3
- package/packages/bundled-features/src/step-dispatcher/webhook-runner.ts +1 -1
- package/packages/bundled-features/src/subscription-mollie/feature.ts +3 -3
- package/packages/bundled-features/src/subscription-mollie/index.ts +3 -3
- package/packages/bundled-features/src/subscription-mollie/verify-webhook.ts +2 -2
- package/packages/bundled-features/src/subscription-stripe/changes.json +6 -0
- package/packages/bundled-features/src/subscription-stripe/feature.ts +34 -6
- package/packages/bundled-features/src/subscription-stripe/index.ts +3 -2
- package/packages/bundled-features/src/subscription-stripe/plugin-methods.ts +2 -2
- package/packages/bundled-features/src/subscription-stripe/runtime.ts +1 -1
- package/packages/bundled-features/src/subscription-stripe/verify-webhook.ts +2 -2
- package/packages/bundled-features/src/tags/changes.json +8 -0
- package/packages/bundled-features/src/tags/executor.ts +1 -1
- package/packages/bundled-features/src/tags/feature.ts +11 -14
- package/packages/bundled-features/src/tags/handlers/assign-tag.write.ts +5 -5
- package/packages/bundled-features/src/tags/handlers/create-tag.write.ts +3 -3
- package/packages/bundled-features/src/tags/handlers/delete-tag.write.ts +3 -3
- package/packages/bundled-features/src/tags/handlers/remove-tag.write.ts +5 -5
- package/packages/bundled-features/src/tags/handlers/update-tag.write.ts +3 -3
- package/packages/bundled-features/src/tags/index.ts +11 -11
- package/packages/bundled-features/src/tags/screens.ts +1 -1
- package/packages/bundled-features/src/tags/web/client-plugin.tsx +5 -5
- package/packages/bundled-features/src/tags/web/entity-tags.tsx +2 -2
- package/packages/bundled-features/src/tags/web/index.ts +9 -9
- package/packages/bundled-features/src/tags/web/tag-filter.tsx +3 -3
- package/packages/bundled-features/src/tags/web/tag-manager.tsx +2 -2
- package/packages/bundled-features/src/tags/web/tag-picker.tsx +1 -1
- package/packages/bundled-features/src/tags/web/tag-section.tsx +3 -3
- package/packages/bundled-features/src/tags/web/tags-cell.tsx +2 -2
- package/packages/bundled-features/src/template-resolver/api.ts +7 -7
- package/packages/bundled-features/src/template-resolver/changes.json +6 -0
- package/packages/bundled-features/src/template-resolver/compile-document-body.ts +4 -4
- package/packages/bundled-features/src/template-resolver/compile-steps-block.ts +3 -3
- package/packages/bundled-features/src/template-resolver/constants.ts +1 -2
- package/packages/bundled-features/src/template-resolver/document-sanitizer.ts +4 -4
- package/packages/bundled-features/src/template-resolver/document-schema.ts +1 -1
- package/packages/bundled-features/src/template-resolver/feature.ts +31 -31
- package/packages/bundled-features/src/template-resolver/handlers/bundle-import.ts +11 -11
- package/packages/bundled-features/src/template-resolver/handlers/by-slug.query.ts +2 -2
- package/packages/bundled-features/src/template-resolver/handlers/by-tenant.query.ts +2 -2
- package/packages/bundled-features/src/template-resolver/handlers/collection-item.query.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/collection-list.query.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/collection-set.write.ts +5 -5
- package/packages/bundled-features/src/template-resolver/handlers/collection-shared.ts +2 -2
- package/packages/bundled-features/src/template-resolver/handlers/copy-locale.write.ts +13 -13
- package/packages/bundled-features/src/template-resolver/handlers/diff-to-system.query.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/discard-draft.write.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/export-bundle.query.ts +7 -7
- package/packages/bundled-features/src/template-resolver/handlers/find-by-id.query.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/import-bundle-system.write.ts +2 -2
- package/packages/bundled-features/src/template-resolver/handlers/import-bundle.write.ts +2 -2
- package/packages/bundled-features/src/template-resolver/handlers/layout-source.query.ts +7 -7
- package/packages/bundled-features/src/template-resolver/handlers/list.query.ts +4 -4
- package/packages/bundled-features/src/template-resolver/handlers/override-diff.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/overview.query.ts +6 -6
- package/packages/bundled-features/src/template-resolver/handlers/preview.query.ts +2 -2
- package/packages/bundled-features/src/template-resolver/handlers/reset-to-system.write.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/resource-link-pdf.write.ts +2 -2
- package/packages/bundled-features/src/template-resolver/handlers/resource-remove.write.ts +5 -5
- package/packages/bundled-features/src/template-resolver/handlers/resource-shared.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/resource-upload.write.ts +5 -5
- package/packages/bundled-features/src/template-resolver/handlers/send-test.write.ts +9 -7
- package/packages/bundled-features/src/template-resolver/handlers/set.write.ts +7 -7
- package/packages/bundled-features/src/template-resolver/handlers/shared.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/template-gates.ts +7 -7
- package/packages/bundled-features/src/template-resolver/handlers/template-write.ts +10 -10
- package/packages/bundled-features/src/template-resolver/handlers/tenant-overrides.query.ts +5 -5
- package/packages/bundled-features/src/template-resolver/handlers/toggle-status.write.ts +6 -6
- package/packages/bundled-features/src/template-resolver/handlers/upsert-system.write.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/upsert-tenant.write.ts +3 -3
- package/packages/bundled-features/src/template-resolver/handlers/usage.query.ts +5 -5
- package/packages/bundled-features/src/template-resolver/handlers/validate.query.ts +8 -8
- package/packages/bundled-features/src/template-resolver/index.ts +25 -25
- package/packages/bundled-features/src/template-resolver/layout-appearance.ts +2 -2
- package/packages/bundled-features/src/template-resolver/layout-regions.ts +2 -2
- package/packages/bundled-features/src/template-resolver/linked-resources.ts +2 -2
- package/packages/bundled-features/src/template-resolver/preview-display-html.ts +1 -1
- package/packages/bundled-features/src/template-resolver/print-document.ts +1 -1
- package/packages/bundled-features/src/template-resolver/resource-image.ts +1 -1
- package/packages/bundled-features/src/template-resolver/seeding.ts +10 -10
- package/packages/bundled-features/src/template-resolver/store-template-resource.ts +10 -10
- package/packages/bundled-features/src/template-resolver/table.ts +1 -1
- package/packages/bundled-features/src/template-resolver/template-bundle.ts +4 -4
- package/packages/bundled-features/src/template-resolver/template-diff.ts +1 -1
- package/packages/bundled-features/src/template-resolver/template-draft.ts +2 -2
- package/packages/bundled-features/src/template-resolver/template-meta.ts +2 -2
- package/packages/bundled-features/src/template-resolver/template-preview.ts +40 -25
- package/packages/bundled-features/src/template-resolver/template-resources.ts +4 -4
- package/packages/bundled-features/src/template-resolver/template-system-only.ts +1 -1
- package/packages/bundled-features/src/template-resolver/template-usage.ts +4 -1
- package/packages/bundled-features/src/template-resolver/template-validation.ts +3 -3
- package/packages/bundled-features/src/template-resolver/testing.ts +4 -4
- package/packages/bundled-features/src/template-resolver/user-content-table.ts +2 -2
- package/packages/bundled-features/src/template-resolver/web/client-plugin.tsx +4 -4
- package/packages/bundled-features/src/template-resolver/web/document-editor-extensions.ts +8 -5
- package/packages/bundled-features/src/template-resolver/web/document-editor.tsx +2 -2
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-editor.tsx +30 -11
- package/packages/bundled-features/src/template-resolver/web/editor-handle.ts +2 -2
- package/packages/bundled-features/src/template-resolver/web/index.ts +7 -7
- package/packages/bundled-features/src/template-resolver/web/placeholder-line-editor-lazy.tsx +3 -3
- package/packages/bundled-features/src/template-resolver/web/placeholder-line-editor.tsx +6 -6
- package/packages/bundled-features/src/template-resolver/web/placeholder-text.ts +1 -1
- package/packages/bundled-features/src/template-resolver-user-data/changes.json +10 -0
- package/packages/bundled-features/src/template-resolver-user-data/hooks.ts +1 -1
- package/packages/bundled-features/src/template-resolver-user-data/index.ts +1 -4
- package/packages/bundled-features/src/tenant/cancel-pending-invitation.ts +2 -2
- package/packages/bundled-features/src/tenant/command-schemas.ts +6 -6
- package/packages/bundled-features/src/tenant/decrypt-tenant-names.ts +1 -1
- package/packages/bundled-features/src/tenant/feature.ts +24 -24
- package/packages/bundled-features/src/tenant/handlers/active-tenant-ids.query.ts +1 -1
- package/packages/bundled-features/src/tenant/handlers/add-member.write.ts +3 -3
- package/packages/bundled-features/src/tenant/handlers/cancel-invitation.write.ts +2 -2
- package/packages/bundled-features/src/tenant/handlers/create.write.ts +1 -1
- package/packages/bundled-features/src/tenant/handlers/invitations.query.ts +3 -3
- package/packages/bundled-features/src/tenant/handlers/list.query.ts +1 -1
- package/packages/bundled-features/src/tenant/handlers/me.query.ts +2 -2
- package/packages/bundled-features/src/tenant/handlers/member-directory.query.ts +4 -4
- package/packages/bundled-features/src/tenant/handlers/member-role-availability.query.ts +1 -1
- package/packages/bundled-features/src/tenant/handlers/members.query.ts +3 -3
- package/packages/bundled-features/src/tenant/handlers/memberships.query.ts +3 -3
- package/packages/bundled-features/src/tenant/handlers/remove-member.write.ts +6 -6
- package/packages/bundled-features/src/tenant/handlers/resolve-user-ids.query.ts +1 -1
- package/packages/bundled-features/src/tenant/handlers/team-list.query.ts +5 -5
- package/packages/bundled-features/src/tenant/handlers/tenant-directory.query.ts +3 -3
- package/packages/bundled-features/src/tenant/handlers/toggle-enabled.write.ts +1 -1
- package/packages/bundled-features/src/tenant/handlers/update-member-roles.write.ts +3 -3
- package/packages/bundled-features/src/tenant/handlers/update.write.ts +1 -1
- package/packages/bundled-features/src/tenant/index.ts +10 -10
- package/packages/bundled-features/src/tenant/invitation-table.ts +1 -1
- package/packages/bundled-features/src/tenant/invited-membership.ts +4 -4
- package/packages/bundled-features/src/tenant/is-tenant-serving-public-content.ts +1 -1
- package/packages/bundled-features/src/tenant/last-tenant-admin.ts +2 -2
- package/packages/bundled-features/src/tenant/member-role-options.ts +1 -1
- package/packages/bundled-features/src/tenant/screens.ts +2 -2
- package/packages/bundled-features/src/tenant/seeding.ts +3 -3
- package/packages/bundled-features/src/tenant/testing.ts +1 -1
- package/packages/bundled-features/src/tenant/web/client-plugin.tsx +3 -3
- package/packages/bundled-features/src/tenant/web/index.ts +3 -3
- package/packages/bundled-features/src/tenant/web/member-roles-cell.tsx +1 -1
- package/packages/bundled-features/src/tenant/web/member-status-cell.tsx +1 -1
- package/packages/bundled-features/src/tenant-handover/feature.ts +4 -4
- package/packages/bundled-features/src/tenant-handover/grant.ts +1 -1
- package/packages/bundled-features/src/tenant-handover/handlers/claim.write.ts +5 -5
- package/packages/bundled-features/src/tenant-handover/index.ts +3 -3
- package/packages/bundled-features/src/tenant-handover/move-entity-graph.ts +1 -1
- package/packages/bundled-features/src/tenant-handover/root-anchor.ts +1 -1
- package/packages/bundled-features/src/tenant-handover/signup-handover-provider.ts +5 -5
- package/packages/bundled-features/src/tenant-lifecycle/boot-checks.ts +1 -1
- package/packages/bundled-features/src/tenant-lifecycle/feature.ts +8 -8
- package/packages/bundled-features/src/tenant-lifecycle/handlers/cancel-destruction.write.ts +4 -4
- package/packages/bundled-features/src/tenant-lifecycle/handlers/request-destruction.write.ts +5 -5
- package/packages/bundled-features/src/tenant-lifecycle/index.ts +3 -3
- package/packages/bundled-features/src/tenant-lifecycle/lib/revoke-tenant-sessions.ts +1 -1
- package/packages/bundled-features/src/tenant-lifecycle/lifecycle-gate.ts +1 -1
- package/packages/bundled-features/src/tenant-lifecycle/run-tenant-destroy.ts +5 -5
- package/packages/bundled-features/src/tenant-lifecycle/stages.ts +3 -3
- package/packages/bundled-features/src/tenant-lifecycle/testing.ts +3 -3
- package/packages/bundled-features/src/tenant-settings/changes.json +10 -1
- package/packages/bundled-features/src/tenant-settings/feature.ts +2 -5
- package/packages/bundled-features/src/tenant-settings/index.ts +4 -5
- package/packages/bundled-features/src/tenant-settings/tenant-defaults.ts +1 -1
- package/packages/bundled-features/src/tier-engine/changes.json +8 -0
- package/packages/bundled-features/src/tier-engine/entity.ts +1 -1
- package/packages/bundled-features/src/tier-engine/feature.ts +10 -13
- package/packages/bundled-features/src/tier-engine/handlers/get-tenant-tier.query.ts +1 -1
- package/packages/bundled-features/src/tier-engine/handlers/set-tenant-tier.write.ts +4 -4
- package/packages/bundled-features/src/tier-engine/i18n.ts +4 -10
- package/packages/bundled-features/src/tier-engine/index.ts +8 -9
- package/packages/bundled-features/src/tier-engine/tier-option-gate.ts +1 -1
- package/packages/bundled-features/src/tier-engine/tier-resolver.ts +2 -2
- package/packages/bundled-features/src/tier-engine/web/client-plugin.tsx +9 -3
- package/packages/bundled-features/src/tier-engine/web/index.ts +1 -1
- package/packages/bundled-features/src/user/command-schemas.ts +2 -2
- package/packages/bundled-features/src/user/feature.ts +10 -10
- package/packages/bundled-features/src/user/handlers/create.write.ts +3 -3
- package/packages/bundled-features/src/user/handlers/detail.query.ts +2 -2
- package/packages/bundled-features/src/user/handlers/find-for-auth.query.ts +1 -1
- package/packages/bundled-features/src/user/handlers/list.query.ts +2 -2
- package/packages/bundled-features/src/user/handlers/me.query.ts +1 -1
- package/packages/bundled-features/src/user/handlers/update-roles.ts +2 -2
- package/packages/bundled-features/src/user/handlers/update.write.ts +4 -4
- package/packages/bundled-features/src/user/index.ts +8 -8
- package/packages/bundled-features/src/user/invited-global-roles.ts +2 -2
- package/packages/bundled-features/src/user/principal-status.ts +1 -1
- package/packages/bundled-features/src/user/resolve-display-names.ts +2 -2
- package/packages/bundled-features/src/user/schema/user.ts +1 -1
- package/packages/bundled-features/src/user/seeding.ts +2 -2
- package/packages/bundled-features/src/user/testing.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/audit-download.ts +2 -2
- package/packages/bundled-features/src/user-data-rights/boot-checks.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/changes.json +6 -0
- package/packages/bundled-features/src/user-data-rights/db/queries/export-jobs.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/db/queries/forget-cleanup.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/deletion-token.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/feature.ts +38 -35
- package/packages/bundled-features/src/user-data-rights/handlers/cancel-deletion.write.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/handlers/confirm-deletion-by-token.write.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/handlers/deletion-grace-period.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/handlers/download-attempt-list.query.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/download-by-job.query.ts +4 -4
- package/packages/bundled-features/src/user-data-rights/handlers/download-by-token.query.ts +5 -5
- package/packages/bundled-features/src/user-data-rights/handlers/export-job-detail.query.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/export-job-list.query.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/export-status.query.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/lift-restriction.write.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/handlers/list-download-attempts.query.ts +2 -2
- package/packages/bundled-features/src/user-data-rights/handlers/my-audit-log.query.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/request-deletion-by-email.write.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/handlers/request-deletion.write.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/handlers/request-export.write.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/restrict-account.write.ts +4 -4
- package/packages/bundled-features/src/user-data-rights/handlers/run-forget-cleanup.write.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/index.ts +13 -13
- package/packages/bundled-features/src/user-data-rights/lib/default-mailers.ts +46 -9
- package/packages/bundled-features/src/user-data-rights/lib/deny-if-target-outside-admin-tenant.ts +2 -2
- package/packages/bundled-features/src/user-data-rights/lib/mail-transport-resolver.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/lib/resolve-tenant-model.ts +2 -2
- package/packages/bundled-features/src/user-data-rights/lib/storage-provider-resolver.ts +2 -2
- package/packages/bundled-features/src/user-data-rights/lib/update-user-lifecycle.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/mail-notifications.ts +2 -2
- package/packages/bundled-features/src/user-data-rights/run-export-jobs.ts +8 -8
- package/packages/bundled-features/src/user-data-rights/run-forget-cleanup.ts +6 -6
- package/packages/bundled-features/src/user-data-rights/run-user-export.ts +2 -2
- package/packages/bundled-features/src/user-data-rights/web/client-plugin.tsx +4 -4
- package/packages/bundled-features/src/user-data-rights/web/i18n.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/web/index.ts +8 -8
- package/packages/bundled-features/src/user-data-rights/web/privacy-center-screen.tsx +1 -1
- package/packages/bundled-features/src/user-data-rights/web/public-deletion-gate.tsx +2 -2
- package/packages/bundled-features/src/user-data-rights-defaults/feature.ts +11 -11
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/api-token.userdata-hook.ts +2 -2
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/config-value.userdata-hook.ts +3 -3
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/delivery-attempt.userdata-hook.ts +2 -2
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/download-attempt.userdata-hook.ts +2 -2
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/file-ref.userdata-hook.ts +1 -1
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/in-app-message.userdata-hook.ts +2 -2
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/job-run.userdata-hook.ts +2 -2
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/notification-preference.userdata-hook.ts +3 -3
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/tenant-invitation.userdata-hook.ts +4 -4
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/user-session.userdata-hook.ts +2 -2
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/user.userdata-hook.ts +1 -1
- package/packages/bundled-features/src/user-data-rights-defaults/index.ts +11 -11
- package/packages/bundled-features/src/user-profile/feature.ts +2 -2
- package/packages/bundled-features/src/user-profile/handlers/change-email.write.ts +4 -4
- package/packages/bundled-features/src/user-profile/index.ts +2 -2
- package/packages/bundled-features/src/user-profile/web/client-plugin.ts +3 -3
- package/packages/bundled-features/src/user-profile/web/index.ts +2 -2
- package/packages/bundled-features/src/user-profile/web/profile-screen.tsx +3 -3
- package/packages/bundled-features/src/waitlist/changes.json +7 -0
- package/packages/bundled-features/src/waitlist/constants.ts +12 -0
- package/packages/bundled-features/src/waitlist/entity.ts +5 -3
- package/packages/bundled-features/src/waitlist/entries-admin.ts +55 -0
- package/packages/bundled-features/src/waitlist/feature.ts +33 -12
- package/packages/bundled-features/src/waitlist/handlers/export-purge.write.ts +81 -0
- package/packages/bundled-features/src/waitlist/handlers/invite.write.ts +7 -7
- package/packages/bundled-features/src/waitlist/handlers/list.query.ts +2 -2
- package/packages/bundled-features/src/waitlist/handlers/reject.write.ts +5 -5
- package/packages/bundled-features/src/waitlist/handlers/submit.write.ts +5 -5
- package/packages/bundled-features/src/waitlist/i18n.ts +4 -0
- package/packages/bundled-features/src/waitlist/import.ts +83 -0
- package/packages/bundled-features/src/waitlist/index.ts +23 -5
- package/packages/bundled-features/src/waitlist/legacy-migrate.ts +220 -0
- package/packages/bundled-features/src/waitlist/lib.ts +5 -5
- package/packages/bundled-features/src/waitlist/link-on-signup.ts +106 -0
- package/packages/bundled-features/src/waitlist/mail.ts +1 -1
- package/packages/bundled-features/src/waitlist/options.ts +15 -3
- package/packages/bundled-features/src/waitlist/payloads.ts +3 -1
- package/packages/bundled-features/src/waitlist/screens.ts +2 -2
- package/packages/bundled-features/src/waitlist/user-data-hooks.ts +3 -3
- package/packages/bundled-features/src/workflow-runner/changes.json +8 -0
- package/packages/bundled-features/src/workflow-runner/db/queries/due-runs.ts +1 -1
- package/packages/bundled-features/src/workflow-runner/event-subscriber.ts +2 -2
- package/packages/bundled-features/src/workflow-runner/event-trigger.ts +4 -4
- package/packages/bundled-features/src/workflow-runner/feature.ts +4 -7
- package/packages/bundled-features/src/workflow-runner/handlers/resume-run.write.ts +3 -3
- package/packages/bundled-features/src/workflow-runner/index.ts +4 -4
- package/packages/bundled-features/src/workflow-runner/pending-projection.ts +1 -1
- package/samples/apps/ui-walkthrough/package.json +2 -1
- package/samples/apps/ui-walkthrough/src/app/auth-constants.ts +4 -0
- package/samples/apps/ui-walkthrough/src/app/server.ts +10 -1
- package/samples/apps/ui-walkthrough/src/app/template-seed-data.ts +1 -1
- package/samples/apps/ui-walkthrough/src/features/billing/feature.ts +11 -10
- package/samples/apps/ui-walkthrough/src/features/billing/i18n.ts +22 -1
- package/samples/apps/ui-walkthrough/src/run-config.ts +14 -5
- package/samples/apps/ui-walkthrough/tsconfig.json +1 -0
- package/samples/apps/use-all-bundled/feature-manifest.json +59 -18
- package/samples/apps/use-all-bundled/scripts/check-coverage.ts +2 -3
- package/samples/apps/use-all-bundled/src/run-config.ts +22 -20
- package/samples/recipes/apex-surface-auth/README.md +1 -0
- package/samples/recipes/apex-surface-auth/src/feature.ts +1 -1
- package/samples/recipes/api-worker-split/bin/api.ts +6 -1
- package/samples/recipes/app-config/README.md +28 -0
- package/samples/recipes/app-config/kumiko.config.ts +9 -0
- package/samples/recipes/app-config/package.json +8 -0
- package/samples/recipes/app-config/src/feature.ts +6 -0
- package/samples/recipes/app-config/tsconfig.json +22 -0
- package/samples/recipes/auth-mfa/README.md +14 -0
- package/samples/recipes/auth-mfa/src/feature.ts +7 -0
- package/samples/recipes/compose-stacks/README.md +60 -0
- package/samples/recipes/compose-stacks/package.json +11 -0
- package/samples/recipes/compose-stacks/src/app.ts +44 -0
- package/samples/recipes/env-composition/README.md +36 -0
- package/samples/recipes/env-composition/bin/server.ts +15 -0
- package/samples/recipes/env-composition/package.json +15 -0
- package/samples/recipes/env-composition/src/env.ts +47 -0
- package/samples/recipes/host-routing/README.md +25 -0
- package/samples/recipes/host-routing/package.json +12 -0
- package/samples/recipes/host-routing/src/feature.ts +35 -0
- package/samples/recipes/legal-pages/README.md +15 -0
- package/samples/recipes/legal-pages/src/feature.ts +13 -2
- package/samples/recipes/managed-config/README.md +1 -0
- package/samples/recipes/managed-pages/README.md +1 -0
- package/samples/recipes/prod-boot-options/README.md +48 -0
- package/samples/recipes/prod-boot-options/bin/server.ts +11 -0
- package/samples/recipes/prod-boot-options/package.json +13 -0
- package/samples/recipes/prod-boot-options/src/app.ts +32 -0
- package/samples/recipes/security-baseline/README.md +16 -13
- package/samples/recipes/security-baseline/package.json +2 -1
- package/samples/recipes/security-baseline/src/feature.ts +3 -3
- package/packages/bundled-features/src/file-provider-s3-env/changes.json +0 -1
- package/packages/bundled-features/src/file-provider-s3-env/index.ts +0 -8
- package/packages/bundled-features/src/files-provider-s3/changes.json +0 -1
- package/packages/bundled-features/src/files-provider-s3/index.ts +0 -11
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
validateTenantExistenceMultiplicity,
|
|
18
18
|
validateTenantResolverMultiplicity,
|
|
19
19
|
validateTokenVerifierMultiplicity,
|
|
20
|
-
} from "./boot-checks.
|
|
20
|
+
} from "./boot-checks.ts";
|
|
21
21
|
import {
|
|
22
22
|
type AuthProviderBuildDeps,
|
|
23
23
|
EXT_SESSION_STORE,
|
|
@@ -33,14 +33,14 @@ import {
|
|
|
33
33
|
type TenantResolverFn,
|
|
34
34
|
type TenantResolverTrust,
|
|
35
35
|
tokenShapeMatches,
|
|
36
|
-
} from "./types.
|
|
36
|
+
} from "./types.ts";
|
|
37
37
|
|
|
38
38
|
export {
|
|
39
39
|
EXT_SESSION_STORE,
|
|
40
40
|
EXT_TENANT_EXISTENCE,
|
|
41
41
|
EXT_TENANT_RESOLVER,
|
|
42
42
|
EXT_TOKEN_VERIFIER,
|
|
43
|
-
} from "./types.
|
|
43
|
+
} from "./types.ts";
|
|
44
44
|
|
|
45
45
|
const FEATURE_NAME = "auth-foundation";
|
|
46
46
|
|
|
@@ -90,9 +90,6 @@ export function createAuthFoundationFeature() {
|
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
/** @deprecated Use createAuthFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
94
|
-
export const authFoundationFeature = createAuthFoundationFeature();
|
|
95
|
-
|
|
96
93
|
/**
|
|
97
94
|
* Tries every registered tokenVerifier provider's shape against `rawToken`
|
|
98
95
|
* in registration order and calls the first match's verifier. Returns null
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// Public API of the auth-foundation bundled-feature.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
authFoundationFeature,
|
|
5
4
|
createAuthFoundationFeature,
|
|
6
5
|
type ResolvedTenantResolver,
|
|
7
6
|
resolveSessionStore,
|
|
8
7
|
resolveTenantExistence,
|
|
9
8
|
resolveTenantResolver,
|
|
10
9
|
resolveTokenVerifier,
|
|
11
|
-
} from "./feature.
|
|
12
|
-
export { resolveAnonymousAccessFromRegistry } from "./resolve-anonymous-access.
|
|
10
|
+
} from "./feature.ts";
|
|
11
|
+
export { resolveAnonymousAccessFromRegistry } from "./resolve-anonymous-access.ts";
|
|
13
12
|
export {
|
|
14
13
|
type AuthProviderBuildDeps,
|
|
15
14
|
type AuthProviderPlugin,
|
|
@@ -35,4 +34,4 @@ export {
|
|
|
35
34
|
type TokenShape,
|
|
36
35
|
tokenShapeKey,
|
|
37
36
|
tokenShapeMatches,
|
|
38
|
-
} from "./types.
|
|
37
|
+
} from "./types.ts";
|
|
@@ -8,8 +8,8 @@ import type {
|
|
|
8
8
|
AnonymousAccessResolved,
|
|
9
9
|
} from "@cosmicdrift/kumiko-framework/api";
|
|
10
10
|
import type { Registry } from "@cosmicdrift/kumiko-framework/engine";
|
|
11
|
-
import { resolveTenantExistence, resolveTenantResolver } from "./feature.
|
|
12
|
-
import type { AuthProviderBuildDeps } from "./types.
|
|
11
|
+
import { resolveTenantExistence, resolveTenantResolver } from "./feature.ts";
|
|
12
|
+
import type { AuthProviderBuildDeps } from "./types.ts";
|
|
13
13
|
|
|
14
14
|
export async function resolveAnonymousAccessFromRegistry(
|
|
15
15
|
base: AnonymousAccessResolved | AnonymousAccessConfig | undefined,
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.370.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "MFA token secrets are optional and bound at boot",
|
|
6
|
+
"detail": "setupTokenSecret and challengeTokenSecret on createAuthMfaFeature are optional. Unset, the boot binds them through bindMfaTokenSecretsFromFeature(feature)(masterSecret, env): MFA_SETUP_TOKEN_SECRET and MFA_CHALLENGE_TOKEN_SECRET from env when set, otherwise derived from the master secret. mfaTokenSecretsEnvSchema declares both variables and the feature registers it next to the secrets master-key slot. A handler called before the binding throws instead of signing with an empty key."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.357.0",
|
|
4
10
|
"type": "improvement",
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@cosmicdrift/kumiko-framework/db";
|
|
6
6
|
import type { SessionUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
7
7
|
import { parseJsonOrThrow } from "@cosmicdrift/kumiko-framework/utils";
|
|
8
|
-
import { userMfaEntity, userMfaTable } from "../schema/user-mfa.
|
|
8
|
+
import { userMfaEntity, userMfaTable } from "../schema/user-mfa.ts";
|
|
9
9
|
|
|
10
10
|
export type UserMfaRow = {
|
|
11
11
|
readonly id: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { secretsEnvSchema } from "../secrets/index.ts";
|
|
3
|
+
|
|
4
|
+
const MIN_TOKEN_SECRET_LENGTH = 32;
|
|
5
|
+
|
|
6
|
+
function tokenSecretOverride(description: string) {
|
|
7
|
+
return z
|
|
8
|
+
.string()
|
|
9
|
+
.min(MIN_TOKEN_SECRET_LENGTH)
|
|
10
|
+
.optional()
|
|
11
|
+
.describe(`${description} Unset: derived from JWT_SECRET.`)
|
|
12
|
+
.meta({ kumiko: { pulumi: { generator: "openssl rand -hex 32", secret: true } } });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Optional overrides for the two MFA token HMAC keys. Unset, both are
|
|
16
|
+
* derived from the app's JWT secret, so one env var stays authoritative. */
|
|
17
|
+
export const mfaTokenSecretsEnvSchema = z.object({
|
|
18
|
+
MFA_SETUP_TOKEN_SECRET: tokenSecretOverride("HMAC key of the MFA enable-flow token."),
|
|
19
|
+
MFA_CHALLENGE_TOKEN_SECRET: tokenSecretOverride("HMAC key of the MFA login-challenge token."),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Same field instances as `secrets`, so composeEnvSchema treats them as one
|
|
23
|
+
// shared variable; an app mounting auth-mfa without `secrets` still gets the
|
|
24
|
+
// KEK slot (and its _CIPHERTEXT twin) declared.
|
|
25
|
+
export const authMfaEnvSchema = z.object({
|
|
26
|
+
...secretsEnvSchema.shape,
|
|
27
|
+
...mfaTokenSecretsEnvSchema.shape,
|
|
28
|
+
});
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
type WriteFailure,
|
|
4
4
|
writeFailure,
|
|
5
5
|
} from "@cosmicdrift/kumiko-framework/errors";
|
|
6
|
-
import { AuthMfaErrorCodes } from "./constants.
|
|
6
|
+
import { AuthMfaErrorCodes } from "./constants.ts";
|
|
7
7
|
|
|
8
|
-
export { AuthMfaErrorCodes as AuthMfaErrors } from "./constants.
|
|
8
|
+
export { AuthMfaErrorCodes as AuthMfaErrors } from "./constants.ts";
|
|
9
9
|
|
|
10
10
|
export function mfaAlreadyEnabled(): WriteFailure {
|
|
11
11
|
return writeFailure(
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
|
|
6
|
+
// Typed readers for what a mounted auth-mfa feature exposes on its untyped
|
|
7
|
+
// exports; the boot runners and other features wire through these.
|
|
8
|
+
|
|
9
|
+
export type BindMfaRevokeAllOtherSessions = (
|
|
10
|
+
revoker: (userId: string, currentSid: string | undefined) => Promise<number>,
|
|
11
|
+
) => void;
|
|
12
|
+
|
|
13
|
+
// Reads the late-bind setter off a mounted auth-mfa feature's exports —
|
|
14
|
+
// mirrors sessions' own bindAutoRevokeFromFeature. run{Prod,Dev}App call
|
|
15
|
+
// this once the sessions feature (if mounted) has produced a concrete
|
|
16
|
+
// sessionRevokeAllOthers callback.
|
|
17
|
+
export function bindMfaRevokeAllOtherSessionsFromFeature(
|
|
18
|
+
feature: FeatureDefinition,
|
|
19
|
+
): BindMfaRevokeAllOtherSessions | undefined {
|
|
20
|
+
const exports = feature.exports;
|
|
21
|
+
if (exports && typeof exports === "object" && "bindRevokeAllOtherSessions" in exports) {
|
|
22
|
+
const { bindRevokeAllOtherSessions } = exports;
|
|
23
|
+
if (typeof bindRevokeAllOtherSessions === "function") {
|
|
24
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
25
|
+
return bindRevokeAllOtherSessions as BindMfaRevokeAllOtherSessions;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Reads the eagerly-built `checkMfaStatus` off a mounted auth-mfa feature's
|
|
32
|
+
// exports — no bind-setter needed (see the comment where it's built).
|
|
33
|
+
export function mfaStatusCheckerFromFeature(
|
|
34
|
+
feature: FeatureDefinition,
|
|
35
|
+
): MfaStatusChecker | undefined {
|
|
36
|
+
const exports = feature.exports;
|
|
37
|
+
if (exports && typeof exports === "object" && "checkMfaStatus" in exports) {
|
|
38
|
+
const { checkMfaStatus } = exports;
|
|
39
|
+
if (typeof checkMfaStatus === "function") {
|
|
40
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
41
|
+
return checkMfaStatus as MfaStatusChecker;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
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: FeatureDefinition): MfaCodeVerifier | undefined {
|
|
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 as MfaCodeVerifier;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type BindMfaTokenSecrets = (masterSecret: string, env: MfaTokenSecretsEnv) => void;
|
|
64
|
+
|
|
65
|
+
// Reads the token-secret binder off a mounted auth-mfa feature's exports.
|
|
66
|
+
// run{Prod,Dev}App and setupTestStack call it with the JWT secret once the
|
|
67
|
+
// env is validated, so a dry run never needs the master secret.
|
|
68
|
+
export function bindMfaTokenSecretsFromFeature(
|
|
69
|
+
feature: FeatureDefinition,
|
|
70
|
+
): BindMfaTokenSecrets | undefined {
|
|
71
|
+
const exports = feature.exports;
|
|
72
|
+
if (exports && typeof exports === "object" && "bindTokenSecrets" in exports) {
|
|
73
|
+
const { bindTokenSecrets } = exports;
|
|
74
|
+
if (typeof bindTokenSecrets === "function") {
|
|
75
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
76
|
+
return bindTokenSecrets as BindMfaTokenSecrets;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type BindRevokeAllPatTokens = (revoker: (userId: string) => Promise<number>) => void;
|
|
83
|
+
|
|
84
|
+
// Reads the late-bind setter off a mounted auth-mfa feature's exports —
|
|
85
|
+
// run{Prod,Dev}App call this once the personal-access-tokens feature (if
|
|
86
|
+
// mounted) has produced a concrete revoker, same wiring shape as
|
|
87
|
+
// bindMfaRevokeAllOtherSessionsFromFeature.
|
|
88
|
+
export function bindRevokeAllPatTokensFromFeature(
|
|
89
|
+
feature: FeatureDefinition,
|
|
90
|
+
): BindRevokeAllPatTokens | undefined {
|
|
91
|
+
const exports = feature.exports;
|
|
92
|
+
if (exports && typeof exports === "object" && "bindRevokeAllPatTokens" in exports) {
|
|
93
|
+
const { bindRevokeAllPatTokens } = exports;
|
|
94
|
+
if (typeof bindRevokeAllPatTokens === "function") {
|
|
95
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
96
|
+
return bindRevokeAllPatTokens as BindRevokeAllPatTokens;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { defineFeature, type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import {
|
|
4
|
-
import { type MfaRequiredPolicy, mfaRequiredConfigKey } from "./config.
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
3
|
+
import { type FeatureWithEnvSchema, featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
|
|
4
|
+
import { type MfaRequiredPolicy, mfaRequiredConfigKey } from "./config.ts";
|
|
5
|
+
import { authMfaEnvSchema } from "./env.ts";
|
|
6
|
+
import type {
|
|
7
|
+
BindMfaRevokeAllOtherSessions,
|
|
8
|
+
BindMfaTokenSecrets,
|
|
9
|
+
BindRevokeAllPatTokens,
|
|
10
|
+
} from "./feature-exports.ts";
|
|
11
|
+
import { createDisableHandler } from "./handlers/disable.write.ts";
|
|
12
|
+
import { createEnableConfirmHandler } from "./handlers/enable-confirm.write.ts";
|
|
13
|
+
import { createEnableConfirmPreauthHandler } from "./handlers/enable-confirm-preauth.write.ts";
|
|
14
|
+
import { createEnableStartHandler } from "./handlers/enable-start.write.ts";
|
|
15
|
+
import { createEnableStartPreauthHandler } from "./handlers/enable-start-preauth.write.ts";
|
|
16
|
+
import { mfaReencryptJob } from "./handlers/reencrypt.job.ts";
|
|
17
|
+
import { createRegenerateRecoveryHandler } from "./handlers/regenerate-recovery.write.ts";
|
|
18
|
+
import { mfaStatusQuery } from "./handlers/status.query.ts";
|
|
19
|
+
import { createMfaVerifyHandler } from "./handlers/verify.write.ts";
|
|
20
|
+
import { AUTH_MFA_FEATURE_I18N } from "./i18n.ts";
|
|
21
|
+
import { createMfaCodeVerifier } from "./mfa-code-verifier.ts";
|
|
22
|
+
import { createMfaStatusChecker } from "./mfa-status-checker.ts";
|
|
23
|
+
import { userMfaEntity } from "./schema/user-mfa.ts";
|
|
24
|
+
import { mfaDisableScreen, mfaEnableScreen, mfaRegenerateRecoveryScreen } from "./screens.ts";
|
|
25
|
+
import { type ResolvedMfaTokenSecrets, resolveMfaTokenSecretsFromEnv } from "./token-secrets.ts";
|
|
19
26
|
|
|
20
27
|
const REENCRYPT_ESCAPE_HATCH_REASON =
|
|
21
28
|
"re-encrypts MFA secrets of every tenant's users with the new master key";
|
|
@@ -24,98 +31,36 @@ export type AuthMfaFeatureOptions = {
|
|
|
24
31
|
// HMAC secret for the stateless enable-flow token (carries the generated
|
|
25
32
|
// TOTP secret + recovery-code hashes between enable.start and
|
|
26
33
|
// enable.confirm). Distinct secret from any other token flow in the app —
|
|
27
|
-
// do not reuse passwordReset.hmacSecret.
|
|
28
|
-
|
|
34
|
+
// do not reuse passwordReset.hmacSecret. Unset: MFA_SETUP_TOKEN_SECRET or
|
|
35
|
+
// derived from the master secret when the boot binds the token secrets.
|
|
36
|
+
readonly setupTokenSecret?: string;
|
|
29
37
|
// otpauth:// URI issuer — shown in the user's authenticator app next to
|
|
30
38
|
// the account label ("Kumiko: jane@example.com").
|
|
31
39
|
readonly issuer: string;
|
|
32
40
|
// HMAC secret for the login-flow challenge token (carries {userId,
|
|
33
41
|
// tenantId} between the password-check and /auth/mfa/verify). Distinct
|
|
34
42
|
// secret from setupTokenSecret — a compromised setup-token secret must
|
|
35
|
-
// not also forge login challenges.
|
|
36
|
-
readonly challengeTokenSecret
|
|
43
|
+
// not also forge login challenges. Unset: same fallback as setupTokenSecret.
|
|
44
|
+
readonly challengeTokenSecret?: string;
|
|
37
45
|
// App-wide MFA enforcement default when no tenant row overrides it.
|
|
38
46
|
// Tenant admins cannot change the policy (system-only write), so this plus
|
|
39
47
|
// system writes is the only way to set it. Defaults to "optional".
|
|
40
48
|
readonly requiredPolicy?: MfaRequiredPolicy;
|
|
41
49
|
};
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// sessionRevokeAllOthers callback.
|
|
51
|
-
export function bindMfaRevokeAllOtherSessionsFromFeature(
|
|
52
|
-
feature: FeatureDefinition,
|
|
53
|
-
): BindMfaRevokeAllOtherSessions | undefined {
|
|
54
|
-
const exports = feature.exports;
|
|
55
|
-
if (exports && typeof exports === "object" && "bindRevokeAllOtherSessions" in exports) {
|
|
56
|
-
const { bindRevokeAllOtherSessions } = exports;
|
|
57
|
-
if (typeof bindRevokeAllOtherSessions === "function") {
|
|
58
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
59
|
-
return bindRevokeAllOtherSessions as BindMfaRevokeAllOtherSessions;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return undefined;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Reads the eagerly-built `checkMfaStatus` off a mounted auth-mfa feature's
|
|
66
|
-
// exports — no bind-setter needed (see the comment where it's built).
|
|
67
|
-
export function mfaStatusCheckerFromFeature(
|
|
68
|
-
feature: FeatureDefinition,
|
|
69
|
-
): MfaStatusChecker | undefined {
|
|
70
|
-
const exports = feature.exports;
|
|
71
|
-
if (exports && typeof exports === "object" && "checkMfaStatus" in exports) {
|
|
72
|
-
const { checkMfaStatus } = exports;
|
|
73
|
-
if (typeof checkMfaStatus === "function") {
|
|
74
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
75
|
-
return checkMfaStatus as MfaStatusChecker;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return undefined;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Reads the eagerly-built `verifyMfaCode` off a mounted auth-mfa feature's
|
|
82
|
-
// exports — personal-access-tokens wires this in as its optional
|
|
83
|
-
// mfaVerifier (re-auth gate for minting a token). Same no-bind-setter
|
|
84
|
-
// reasoning as checkMfaStatus above.
|
|
85
|
-
export function mfaVerifierFromFeature(feature: FeatureDefinition): MfaCodeVerifier | undefined {
|
|
86
|
-
const exports = feature.exports;
|
|
87
|
-
if (exports && typeof exports === "object" && "verifyMfaCode" in exports) {
|
|
88
|
-
const { verifyMfaCode } = exports;
|
|
89
|
-
if (typeof verifyMfaCode === "function") {
|
|
90
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
91
|
-
return verifyMfaCode as MfaCodeVerifier;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return undefined;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export type BindRevokeAllPatTokens = (revoker: (userId: string) => Promise<number>) => void;
|
|
98
|
-
|
|
99
|
-
// Reads the late-bind setter off a mounted auth-mfa feature's exports —
|
|
100
|
-
// run{Prod,Dev}App call this once the personal-access-tokens feature (if
|
|
101
|
-
// mounted) has produced a concrete revoker, same wiring shape as
|
|
102
|
-
// bindMfaRevokeAllOtherSessionsFromFeature.
|
|
103
|
-
export function bindRevokeAllPatTokensFromFeature(
|
|
104
|
-
feature: FeatureDefinition,
|
|
105
|
-
): BindRevokeAllPatTokens | undefined {
|
|
106
|
-
const exports = feature.exports;
|
|
107
|
-
if (exports && typeof exports === "object" && "bindRevokeAllPatTokens" in exports) {
|
|
108
|
-
const { bindRevokeAllPatTokens } = exports;
|
|
109
|
-
if (typeof bindRevokeAllPatTokens === "function") {
|
|
110
|
-
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
111
|
-
return bindRevokeAllPatTokens as BindRevokeAllPatTokens;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return undefined;
|
|
51
|
+
function hasBothExplicitSecrets(opts: AuthMfaFeatureOptions): boolean {
|
|
52
|
+
return (
|
|
53
|
+
opts.setupTokenSecret !== undefined &&
|
|
54
|
+
opts.setupTokenSecret.trim() !== "" &&
|
|
55
|
+
opts.challengeTokenSecret !== undefined &&
|
|
56
|
+
opts.challengeTokenSecret.trim() !== ""
|
|
57
|
+
);
|
|
115
58
|
}
|
|
116
59
|
|
|
117
|
-
export function createAuthMfaFeature(
|
|
118
|
-
|
|
60
|
+
export function createAuthMfaFeature(
|
|
61
|
+
opts: AuthMfaFeatureOptions,
|
|
62
|
+
): FeatureWithEnvSchema<FeatureDefinition, typeof authMfaEnvSchema.shape> {
|
|
63
|
+
const feature: FeatureDefinition = defineFeature("auth-mfa", (r) => {
|
|
119
64
|
r.describe(
|
|
120
65
|
"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`.",
|
|
121
66
|
);
|
|
@@ -124,10 +69,7 @@ export function createAuthMfaFeature(opts: AuthMfaFeatureOptions): FeatureDefini
|
|
|
124
69
|
category: "identity",
|
|
125
70
|
recommended: true,
|
|
126
71
|
});
|
|
127
|
-
|
|
128
|
-
// shared variable; an app mounting auth-mfa without `secrets` still gets the
|
|
129
|
-
// KEK slot (and its _CIPHERTEXT twin) declared.
|
|
130
|
-
r.envSchema(secretsEnvSchema);
|
|
72
|
+
r.envSchema(authMfaEnvSchema);
|
|
131
73
|
r.requires({ features: ["user"] });
|
|
132
74
|
r.requires({ features: ["config"] });
|
|
133
75
|
// verify.write.ts dispatches "tenant:query:memberships" — without this
|
|
@@ -183,27 +125,58 @@ export function createAuthMfaFeature(opts: AuthMfaFeatureOptions): FeatureDefini
|
|
|
183
125
|
const sharedPatRevoker = (userId: string): Promise<number> =>
|
|
184
126
|
revokeAllPatTokens?.(userId) ?? Promise.resolve(0);
|
|
185
127
|
|
|
128
|
+
// Handlers and the status checker read the secrets through these getters
|
|
129
|
+
// on each call, so the boot can bind them after env validation. Never
|
|
130
|
+
// spread these objects: a spread would read the getter eagerly.
|
|
131
|
+
let boundTokenSecrets: ResolvedMfaTokenSecrets | undefined = hasBothExplicitSecrets(opts)
|
|
132
|
+
? resolveMfaTokenSecretsFromEnv("", {}, opts)
|
|
133
|
+
: undefined;
|
|
134
|
+
const tokenSecrets = (): ResolvedMfaTokenSecrets => {
|
|
135
|
+
if (boundTokenSecrets === undefined) {
|
|
136
|
+
throw new Error(
|
|
137
|
+
"[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).",
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
return boundTokenSecrets;
|
|
141
|
+
};
|
|
142
|
+
const bindTokenSecrets: BindMfaTokenSecrets = (masterSecret, env) => {
|
|
143
|
+
boundTokenSecrets = resolveMfaTokenSecretsFromEnv(masterSecret, env, opts);
|
|
144
|
+
};
|
|
145
|
+
|
|
186
146
|
const handlers = {
|
|
187
147
|
enableStart: r.writeHandler(
|
|
188
|
-
createEnableStartHandler({
|
|
148
|
+
createEnableStartHandler({
|
|
149
|
+
get setupTokenSecret() {
|
|
150
|
+
return tokenSecrets().setupTokenSecret;
|
|
151
|
+
},
|
|
152
|
+
issuer: opts.issuer,
|
|
153
|
+
}),
|
|
189
154
|
),
|
|
190
155
|
enableStartPreauth: r.writeHandler(
|
|
191
156
|
createEnableStartPreauthHandler({
|
|
192
|
-
challengeTokenSecret
|
|
193
|
-
|
|
157
|
+
get challengeTokenSecret() {
|
|
158
|
+
return tokenSecrets().challengeTokenSecret;
|
|
159
|
+
},
|
|
160
|
+
get setupTokenSecret() {
|
|
161
|
+
return tokenSecrets().setupTokenSecret;
|
|
162
|
+
},
|
|
194
163
|
issuer: opts.issuer,
|
|
195
164
|
}),
|
|
196
165
|
),
|
|
197
166
|
enableConfirm: r.writeHandler(
|
|
198
167
|
createEnableConfirmHandler({
|
|
199
|
-
setupTokenSecret
|
|
168
|
+
get setupTokenSecret() {
|
|
169
|
+
return tokenSecrets().setupTokenSecret;
|
|
170
|
+
},
|
|
200
171
|
revokeAllOtherSessions: sharedRevoker,
|
|
201
172
|
revokeAllPatTokens: sharedPatRevoker,
|
|
202
173
|
}),
|
|
203
174
|
),
|
|
204
175
|
enableConfirmPreauth: r.writeHandler(
|
|
205
176
|
createEnableConfirmPreauthHandler({
|
|
206
|
-
setupTokenSecret
|
|
177
|
+
get setupTokenSecret() {
|
|
178
|
+
return tokenSecrets().setupTokenSecret;
|
|
179
|
+
},
|
|
207
180
|
revokeAllOtherSessions: sharedRevoker,
|
|
208
181
|
revokeAllPatTokens: sharedPatRevoker,
|
|
209
182
|
}),
|
|
@@ -218,7 +191,11 @@ export function createAuthMfaFeature(opts: AuthMfaFeatureOptions): FeatureDefini
|
|
|
218
191
|
createRegenerateRecoveryHandler({ revokeAllOtherSessions: sharedRevoker }),
|
|
219
192
|
),
|
|
220
193
|
verify: r.writeHandler(
|
|
221
|
-
createMfaVerifyHandler({
|
|
194
|
+
createMfaVerifyHandler({
|
|
195
|
+
get challengeTokenSecret() {
|
|
196
|
+
return tokenSecrets().challengeTokenSecret;
|
|
197
|
+
},
|
|
198
|
+
}),
|
|
222
199
|
),
|
|
223
200
|
};
|
|
224
201
|
|
|
@@ -231,7 +208,9 @@ export function createAuthMfaFeature(opts: AuthMfaFeatureOptions): FeatureDefini
|
|
|
231
208
|
// from inside its own dispatcher call), not a raw db handle assembled
|
|
232
209
|
// at app-boot time.
|
|
233
210
|
const checkMfaStatus = createMfaStatusChecker({
|
|
234
|
-
challengeTokenSecret
|
|
211
|
+
get challengeTokenSecret() {
|
|
212
|
+
return tokenSecrets().challengeTokenSecret;
|
|
213
|
+
},
|
|
235
214
|
...(opts.requiredPolicy && { requiredPolicy: opts.requiredPolicy }),
|
|
236
215
|
});
|
|
237
216
|
|
|
@@ -254,6 +233,8 @@ export function createAuthMfaFeature(opts: AuthMfaFeatureOptions): FeatureDefini
|
|
|
254
233
|
checkMfaStatus,
|
|
255
234
|
verifyMfaCode,
|
|
256
235
|
bindRevokeAllPatTokens,
|
|
236
|
+
bindTokenSecrets,
|
|
257
237
|
};
|
|
258
238
|
});
|
|
239
|
+
return featureWithEnvSchema(feature, authMfaEnvSchema);
|
|
259
240
|
}
|
|
@@ -2,10 +2,10 @@ import { createEventStoreExecutor } from "@cosmicdrift/kumiko-framework/db";
|
|
|
2
2
|
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import { InternalError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import * as z from "zod";
|
|
5
|
-
import { findUserMfaRow } from "../db/queries.
|
|
6
|
-
import { invalidTotpCode, mfaNotEnabled } from "../errors.
|
|
7
|
-
import { userMfaEntity, userMfaTable } from "../schema/user-mfa.
|
|
8
|
-
import { verifyMfaFactor } from "../verify-factor.
|
|
5
|
+
import { findUserMfaRow } from "../db/queries.ts";
|
|
6
|
+
import { invalidTotpCode, mfaNotEnabled } from "../errors.ts";
|
|
7
|
+
import { userMfaEntity, userMfaTable } from "../schema/user-mfa.ts";
|
|
8
|
+
import { verifyMfaFactor } from "../verify-factor.ts";
|
|
9
9
|
|
|
10
10
|
export type DisableOptions = {
|
|
11
11
|
readonly revokeAllOtherSessions?: (
|
|
@@ -9,25 +9,25 @@ import { InternalError, writeFailure } from "@cosmicdrift/kumiko-framework/error
|
|
|
9
9
|
import { parseRoles } from "@cosmicdrift/kumiko-framework/utils";
|
|
10
10
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
11
11
|
import * as z from "zod";
|
|
12
|
-
import { burnToken, sessionLocaleField, sessionTimezoneField } from "../../shared/index.
|
|
13
|
-
import { USER_STATUS, UserQueries } from "../../user/index.
|
|
14
|
-
import { base32Decode } from "../base32.
|
|
15
|
-
import { MFA_VERIFY_LOCKOUT_MINUTES, MFA_VERIFY_MAX_ATTEMPTS } from "../constants.
|
|
16
|
-
import { findUserMfaRow } from "../db/queries.
|
|
12
|
+
import { burnToken, sessionLocaleField, sessionTimezoneField } from "../../shared/index.ts";
|
|
13
|
+
import { USER_STATUS, UserQueries } from "../../user/index.ts";
|
|
14
|
+
import { base32Decode } from "../base32.ts";
|
|
15
|
+
import { MFA_VERIFY_LOCKOUT_MINUTES, MFA_VERIFY_MAX_ATTEMPTS } from "../constants.ts";
|
|
16
|
+
import { findUserMfaRow } from "../db/queries.ts";
|
|
17
17
|
import {
|
|
18
18
|
invalidSetupToken,
|
|
19
19
|
invalidTotpCode,
|
|
20
20
|
mfaAlreadyEnabled,
|
|
21
21
|
tooManyAttempts,
|
|
22
|
-
} from "../errors.
|
|
23
|
-
import { verifyMfaSetupToken } from "../mfa-setup-token.
|
|
22
|
+
} from "../errors.ts";
|
|
23
|
+
import { verifyMfaSetupToken } from "../mfa-setup-token.ts";
|
|
24
24
|
import {
|
|
25
25
|
clearMfaVerifyAttempts,
|
|
26
26
|
getMfaVerifyLockoutState,
|
|
27
27
|
recordFailedMfaVerifyAttempt,
|
|
28
|
-
} from "../mfa-verify-attempts.
|
|
29
|
-
import { encodeRecoveryCodes, userMfaEntity, userMfaTable } from "../schema/user-mfa.
|
|
30
|
-
import { verifyTotp } from "../totp.
|
|
28
|
+
} from "../mfa-verify-attempts.ts";
|
|
29
|
+
import { encodeRecoveryCodes, userMfaEntity, userMfaTable } from "../schema/user-mfa.ts";
|
|
30
|
+
import { verifyTotp } from "../totp.ts";
|
|
31
31
|
|
|
32
32
|
export type EnableConfirmPreauthOptions = {
|
|
33
33
|
// Must match the secret enable-start-preauth.write.ts signs setupTokens
|
|
@@ -3,13 +3,13 @@ import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
|
3
3
|
import { InternalError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { burnToken } from "../../shared/index.
|
|
7
|
-
import { base32Decode } from "../base32.
|
|
8
|
-
import { findUserMfaRow } from "../db/queries.
|
|
9
|
-
import { invalidSetupToken, invalidTotpCode, mfaAlreadyEnabled } from "../errors.
|
|
10
|
-
import { verifyMfaSetupToken } from "../mfa-setup-token.
|
|
11
|
-
import { encodeRecoveryCodes, userMfaEntity, userMfaTable } from "../schema/user-mfa.
|
|
12
|
-
import { verifyTotp } from "../totp.
|
|
6
|
+
import { burnToken } from "../../shared/index.ts";
|
|
7
|
+
import { base32Decode } from "../base32.ts";
|
|
8
|
+
import { findUserMfaRow } from "../db/queries.ts";
|
|
9
|
+
import { invalidSetupToken, invalidTotpCode, mfaAlreadyEnabled } from "../errors.ts";
|
|
10
|
+
import { verifyMfaSetupToken } from "../mfa-setup-token.ts";
|
|
11
|
+
import { encodeRecoveryCodes, userMfaEntity, userMfaTable } from "../schema/user-mfa.ts";
|
|
12
|
+
import { verifyTotp } from "../totp.ts";
|
|
13
13
|
|
|
14
14
|
export type EnableConfirmOptions = {
|
|
15
15
|
readonly setupTokenSecret: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createTenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { defineWriteHandler, type SessionUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
-
import { base32Encode } from "../base32.
|
|
5
|
-
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../constants.
|
|
6
|
-
import { findUserMfaRow } from "../db/queries.
|
|
7
|
-
import { invalidChallengeToken, mfaAlreadyEnabled } from "../errors.
|
|
8
|
-
import { verifyMfaPreauthSetupToken } from "../mfa-preauth-setup-token.
|
|
9
|
-
import { signMfaSetupToken } from "../mfa-setup-token.
|
|
10
|
-
import { buildOtpauthUri } from "../otpauth-uri.
|
|
11
|
-
import { generateRecoveryCodes, hashRecoveryCodes } from "../recovery-codes.
|
|
12
|
-
import { generateTotpSecret } from "../totp.
|
|
4
|
+
import { base32Encode } from "../base32.ts";
|
|
5
|
+
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../constants.ts";
|
|
6
|
+
import { findUserMfaRow } from "../db/queries.ts";
|
|
7
|
+
import { invalidChallengeToken, mfaAlreadyEnabled } from "../errors.ts";
|
|
8
|
+
import { verifyMfaPreauthSetupToken } from "../mfa-preauth-setup-token.ts";
|
|
9
|
+
import { signMfaSetupToken } from "../mfa-setup-token.ts";
|
|
10
|
+
import { buildOtpauthUri } from "../otpauth-uri.ts";
|
|
11
|
+
import { generateRecoveryCodes, hashRecoveryCodes } from "../recovery-codes.ts";
|
|
12
|
+
import { generateTotpSecret } from "../totp.ts";
|
|
13
13
|
|
|
14
14
|
const ENABLE_START_PREAUTH_TENANT_REASON =
|
|
15
15
|
"reads the MFA enrollment of the tenant named in the signed login/setup token, not the guest dispatch tenant";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { UserQueries } from "../../user/index.
|
|
4
|
-
import { base32Encode } from "../base32.
|
|
5
|
-
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../constants.
|
|
6
|
-
import { findUserMfaRow } from "../db/queries.
|
|
7
|
-
import { mfaAlreadyEnabled } from "../errors.
|
|
8
|
-
import { signMfaSetupToken } from "../mfa-setup-token.
|
|
9
|
-
import { buildOtpauthUri } from "../otpauth-uri.
|
|
10
|
-
import { generateRecoveryCodes, hashRecoveryCodes } from "../recovery-codes.
|
|
11
|
-
import { generateTotpSecret } from "../totp.
|
|
3
|
+
import { UserQueries } from "../../user/index.ts";
|
|
4
|
+
import { base32Encode } from "../base32.ts";
|
|
5
|
+
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../constants.ts";
|
|
6
|
+
import { findUserMfaRow } from "../db/queries.ts";
|
|
7
|
+
import { mfaAlreadyEnabled } from "../errors.ts";
|
|
8
|
+
import { signMfaSetupToken } from "../mfa-setup-token.ts";
|
|
9
|
+
import { buildOtpauthUri } from "../otpauth-uri.ts";
|
|
10
|
+
import { generateRecoveryCodes, hashRecoveryCodes } from "../recovery-codes.ts";
|
|
11
|
+
import { generateTotpSecret } from "../totp.ts";
|
|
12
12
|
|
|
13
13
|
export type EnableStartOptions = {
|
|
14
14
|
readonly setupTokenSecret: string;
|
|
@@ -43,8 +43,8 @@ import {
|
|
|
43
43
|
type ChunkedMigrationStopReason,
|
|
44
44
|
classifyStoredEnvelope,
|
|
45
45
|
runChunkedMigration,
|
|
46
|
-
} from "../../shared/index.
|
|
47
|
-
import { userMfaEntity, userMfaTable } from "../schema/user-mfa.
|
|
46
|
+
} from "../../shared/index.ts";
|
|
47
|
+
import { userMfaEntity, userMfaTable } from "../schema/user-mfa.ts";
|
|
48
48
|
|
|
49
49
|
const DEFAULT_BATCH_SIZE = 100;
|
|
50
50
|
const DEFAULT_MAX_FAILURES = 10;
|