@cosmicdrift/kumiko-bundled-features 0.377.0 → 0.379.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-security/feature.js +2 -2
- package/dist/account-security/index.d.ts +2 -2
- package/dist/account-security/index.js +2 -2
- package/dist/account-security/{constants.js → web/constants.js} +0 -1
- package/dist/account-security/{i18n.js → web/i18n.js} +0 -1
- package/dist/admin-shell/feature.js +4 -3
- package/dist/admin-shell/index.d.ts +2 -2
- package/dist/admin-shell/index.js +2 -2
- package/dist/admin-shell/web/client-plugin.js +2 -3
- package/dist/admin-shell/{constants.js → web/constants.js} +0 -1
- package/dist/admin-shell/web/default-translations.d.ts +2 -0
- package/dist/admin-shell/web/default-translations.js +4 -0
- package/dist/admin-shell/web/i18n.d.ts +5 -2
- package/dist/admin-shell/web/i18n.js +50 -5
- package/dist/admin-shell/web/index.js +0 -1
- package/dist/audit/feature.js +58 -59
- package/dist/audit/handlers/audit-events.d.ts +102 -0
- package/dist/audit/handlers/audit-events.js +112 -0
- package/dist/audit/handlers/audit-system-db.d.ts +1 -0
- package/dist/audit/handlers/audit-system-db.js +9 -0
- package/dist/audit/handlers/details-all-tenants.query.d.ts +15 -0
- package/dist/audit/handlers/details-all-tenants.query.js +20 -0
- package/dist/audit/handlers/details.query.d.ts +2 -1
- package/dist/audit/handlers/details.query.js +8 -24
- package/dist/audit/handlers/list-all-tenants.query.d.ts +41 -0
- package/dist/audit/handlers/list-all-tenants.query.js +32 -0
- package/dist/audit/handlers/list.query.d.ts +2 -1
- package/dist/audit/handlers/list.query.js +9 -99
- package/dist/audit/handlers/resolve-audit-tenant.d.ts +3 -1
- package/dist/audit/handlers/resolve-audit-tenant.js +21 -7
- package/dist/audit/index.d.ts +1 -1
- package/dist/audit/index.js +1 -1
- package/dist/audit/run-escape-hatch-retention.js +1 -1
- package/dist/audit/screens.d.ts +65 -0
- package/dist/audit/screens.js +73 -0
- package/dist/audit/web/client-plugin.js +2 -3
- package/dist/audit/{constants.d.ts → web/constants.d.ts} +8 -0
- package/dist/audit/{constants.js → web/constants.js} +8 -1
- package/dist/audit/web/default-translations.d.ts +2 -0
- package/dist/audit/web/default-translations.js +3 -0
- package/dist/audit/web/i18n.d.ts +5 -2
- package/dist/audit/web/i18n.js +31 -4
- package/dist/audit/web/index.js +0 -1
- package/dist/auth-email-password/bootstrap.d.ts +1 -1
- package/dist/auth-email-password/bootstrap.js +4 -4
- package/dist/auth-email-password/errors.js +1 -1
- package/dist/auth-email-password/feature.js +2 -2
- package/dist/auth-email-password/handlers/confirm-account-unlock.write.js +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.js +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.js +3 -3
- package/dist/auth-email-password/handlers/invite-info.query.js +1 -1
- package/dist/auth-email-password/handlers/login.write.d.ts +1 -0
- package/dist/auth-email-password/handlers/login.write.js +26 -1
- package/dist/auth-email-password/handlers/request-account-unlock.write.js +1 -1
- package/dist/auth-email-password/handlers/request-email-verification.write.js +1 -1
- package/dist/auth-email-password/handlers/request-password-reset.write.js +1 -1
- package/dist/auth-email-password/handlers/reset-password.write.js +1 -1
- package/dist/auth-email-password/handlers/verify-email.write.js +1 -1
- package/dist/auth-email-password/index.d.ts +1 -1
- package/dist/auth-email-password/index.js +1 -1
- package/dist/auth-email-password/mail-notifications.js +1 -1
- package/dist/auth-email-password/signup-activation.js +1 -1
- package/dist/auth-email-password/web/auth-client.js +0 -1
- package/dist/auth-email-password/web/auth-form-logic.js +0 -1
- package/dist/auth-email-password/web/auth-form-primitives.js +0 -1
- package/dist/auth-email-password/web/auth-gate.js +0 -1
- package/dist/auth-email-password/web/auth-redirect.js +0 -1
- package/dist/auth-email-password/web/client-actions.js +0 -1
- package/dist/auth-email-password/web/client-plugin.js +1 -2
- package/dist/auth-email-password/web/confirm-account-unlock-screen.js +0 -1
- package/dist/auth-email-password/{constants.js → web/constants.js} +3 -6
- package/dist/auth-email-password/web/default-topbar-actions.js +0 -1
- package/dist/auth-email-password/web/forgot-password-screen.js +0 -1
- package/dist/auth-email-password/{i18n.js → web/i18n.js} +3 -4
- package/dist/auth-email-password/web/index.d.ts +1 -1
- package/dist/auth-email-password/web/index.js +1 -2
- package/dist/auth-email-password/web/invite-accept-screen.d.ts +2 -2
- package/dist/auth-email-password/web/invite-accept-screen.js +0 -1
- package/dist/auth-email-password/web/login-screen.js +0 -1
- package/dist/auth-email-password/{mail-i18n.js → web/mail-i18n.js} +0 -1
- package/dist/auth-email-password/web/request-account-unlock-screen.js +0 -1
- package/dist/auth-email-password/web/reset-password-screen.js +0 -1
- package/dist/auth-email-password/web/session-bootstrap-error.js +0 -1
- package/dist/auth-email-password/web/session.js +0 -1
- package/dist/auth-email-password/web/signup-complete-screen.d.ts +2 -2
- package/dist/auth-email-password/web/signup-complete-screen.js +0 -1
- package/dist/auth-email-password/web/signup-screen.js +0 -1
- package/dist/auth-email-password/web/tenant-menu-items.js +0 -1
- package/dist/auth-email-password/web/tenant-switcher.js +0 -1
- package/dist/auth-email-password/web/use-shell-user.js +0 -1
- package/dist/auth-email-password/web/user-menu.js +0 -1
- package/dist/auth-email-password/web/verify-email-screen.js +0 -1
- package/dist/auth-mfa/errors.d.ts +1 -1
- package/dist/auth-mfa/errors.js +2 -2
- package/dist/auth-mfa/handlers/enable-confirm-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/enable-start-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/enable-start.write.js +1 -1
- package/dist/auth-mfa/handlers/verify.write.js +1 -1
- package/dist/auth-mfa/index.d.ts +1 -1
- package/dist/auth-mfa/index.js +1 -1
- package/dist/auth-mfa/mfa-status-checker.js +1 -1
- package/dist/auth-mfa/screens.js +1 -1
- package/dist/auth-mfa/web/client-plugin.js +0 -1
- package/dist/auth-mfa/{constants.js → web/constants.js} +0 -1
- package/dist/auth-mfa/web/i18n.js +0 -1
- package/dist/auth-mfa/web/index.js +0 -1
- package/dist/auth-mfa/web/mfa-client.js +0 -1
- package/dist/auth-mfa/web/mfa-disable-dialog.js +1 -2
- package/dist/auth-mfa/web/mfa-recovery-codes-reveal.js +0 -1
- package/dist/auth-mfa/web/mfa-regenerate-recovery-dialog.js +1 -2
- package/dist/auth-mfa/web/mfa-setup-preauth-screen.js +11 -18
- package/dist/auth-mfa/web/mfa-verify-screen.js +0 -1
- package/dist/billing-foundation/checkout-core.js +1 -1
- package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/consent-text.js +1 -1
- package/dist/billing-foundation/consumer-protection/issue-confirmation.js +7 -3
- package/dist/billing-foundation/consumer-protection/mail-notifications.js +3 -1
- package/dist/billing-foundation/consumer-protection/register-consent.js +1 -1
- package/dist/billing-foundation/consumer-protection/register-termination.js +8 -2
- package/dist/billing-foundation/consumer-protection/stored-user-email.d.ts +1 -0
- package/dist/billing-foundation/consumer-protection/stored-user-email.js +8 -0
- package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +5 -1
- package/dist/billing-foundation/consumer-protection/termination-mail.js +3 -1
- package/dist/billing-foundation/consumer-protection/termination-notify.js +1 -1
- package/dist/billing-foundation/consumer-protection/termination-pages.js +109 -15
- package/dist/billing-foundation/consumer-protection/termination-record.d.ts +8 -1
- package/dist/billing-foundation/consumer-protection/termination-record.js +76 -3
- package/dist/billing-foundation/consumer-protection/termination-request.js +33 -6
- package/dist/billing-foundation/consumer-protection/termination-revoke.d.ts +28 -0
- package/dist/billing-foundation/consumer-protection/termination-revoke.js +149 -0
- package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +17 -1
- package/dist/billing-foundation/consumer-protection/termination-texts.js +39 -0
- package/dist/billing-foundation/events.d.ts +9 -0
- package/dist/billing-foundation/events.js +14 -2
- package/dist/billing-foundation/feature.js +1 -1
- package/dist/billing-foundation/handlers/process-event.write.d.ts +5 -1
- package/dist/billing-foundation/handlers/process-event.write.js +57 -3
- package/dist/billing-foundation/handlers/switch-plan.write.js +1 -1
- package/dist/billing-foundation/handlers/sync-subscription.write.js +1 -1
- package/dist/billing-foundation/index.d.ts +2 -2
- package/dist/billing-foundation/index.js +2 -2
- package/dist/billing-foundation/plan-catalog.js +1 -1
- package/dist/billing-foundation/screens.js +1 -1
- package/dist/billing-foundation/subscription-tier-sync.js +1 -1
- package/dist/billing-foundation/types.d.ts +14 -2
- package/dist/billing-foundation/types.js +1 -1
- package/dist/billing-foundation/validate-options.js +3 -3
- package/dist/billing-foundation/web/billing-contact-plan.js +1 -2
- package/dist/billing-foundation/web/billing-plans-panel.js +1 -2
- package/dist/billing-foundation/web/cancel-contract-dialog.js +1 -2
- package/dist/billing-foundation/web/checkout-consent-dialog.js +1 -2
- package/dist/billing-foundation/web/client-plugin.js +1 -1
- package/dist/billing-foundation/{constants.d.ts → web/constants.d.ts} +21 -14
- package/dist/billing-foundation/{constants.js → web/constants.js} +35 -31
- package/dist/billing-foundation/{consumer-protection → web/consumer-protection}/consent-locale.js +0 -1
- package/dist/billing-foundation/{contact-card.js → web/contact-card.js} +0 -1
- package/dist/billing-foundation/web/index.d.ts +2 -2
- package/dist/billing-foundation/web/index.js +2 -3
- package/dist/billing-foundation/web/localized-params.js +0 -1
- package/dist/billing-foundation/webhook-handler.js +4 -1
- package/dist/cap-counter/stock-cap-guard.js +8 -0
- package/dist/cap-overview/feature.js +1 -1
- package/dist/cap-overview/handlers/caps-usage.query.js +1 -1
- package/dist/cap-overview/handlers/tenant-caps-list.query.js +2 -2
- package/dist/cap-overview/index.d.ts +2 -2
- package/dist/cap-overview/index.js +2 -2
- package/dist/cap-overview/screens.js +1 -1
- package/dist/cap-overview/web/cap-cards-panel.js +1 -1
- package/dist/cap-overview/web/cap-usage-bar.js +1 -2
- package/dist/cap-overview/web/client-plugin.js +1 -1
- package/dist/cap-overview/{constants.js → web/constants.js} +0 -1
- package/dist/cap-overview/web/index.js +0 -1
- package/dist/cap-overview/{usage-math.d.ts → web/usage-math.d.ts} +1 -1
- package/dist/compliance-profiles/feature.js +1 -1
- package/dist/compliance-profiles/index.d.ts +1 -1
- package/dist/compliance-profiles/index.js +1 -1
- package/dist/compliance-profiles/web/client-plugin.js +1 -2
- package/dist/compliance-profiles/web/compliance-profile-catalog.js +1 -2
- package/dist/compliance-profiles/{constants.js → web/constants.js} +0 -1
- package/dist/compliance-profiles/web/index.js +0 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/web/client-plugin.d.ts +1 -1
- package/dist/config/web/client-plugin.js +1 -2
- package/dist/config/{constants.js → web/constants.js} +0 -1
- package/dist/config/web/i18n.js +1 -1
- package/dist/config/web/index.d.ts +1 -1
- package/dist/config/web/index.js +1 -2
- package/dist/config/write-helpers.js +1 -1
- package/dist/custom-fields/feature.js +1 -1
- package/dist/custom-fields/handlers/clear-custom-field.write.js +1 -1
- package/dist/custom-fields/handlers/define-tenant-field.write.js +1 -1
- package/dist/custom-fields/handlers/delete-system-field.write.js +1 -1
- package/dist/custom-fields/handlers/delete-tenant-field.write.js +1 -1
- package/dist/custom-fields/handlers/set-custom-field.write.js +1 -1
- package/dist/custom-fields/handlers/update-tenant-field.write.js +1 -1
- package/dist/custom-fields/index.d.ts +1 -1
- package/dist/custom-fields/index.js +1 -1
- package/dist/custom-fields/lib/value-schema.js +1 -1
- package/dist/custom-fields/schemas.js +1 -1
- package/dist/custom-fields/web/client-plugin.js +1 -2
- package/dist/custom-fields/{constants.js → web/constants.js} +18 -19
- package/dist/custom-fields/web/custom-fields-form-section.js +1 -2
- package/dist/custom-fields/web/i18n.js +0 -1
- package/dist/custom-fields/web/index.d.ts +1 -1
- package/dist/custom-fields/web/index.js +1 -2
- package/dist/custom-fields/wire-for-entity.js +1 -1
- package/dist/delivery/address-opt-out.js +1 -1
- package/dist/delivery/attempt-log-retention.js +21 -3
- package/dist/delivery/constants.d.ts +1 -1
- package/dist/delivery/constants.js +2 -2
- package/dist/delivery/i18n.js +1 -1
- package/dist/delivery/unsubscribe-page.js +1 -1
- package/dist/delivery/web/client-plugin.js +1 -1
- package/dist/delivery/web/delivery-channel-cell.js +0 -1
- package/dist/delivery/web/delivery-error-cell.js +0 -1
- package/dist/delivery/web/delivery-status-cell.js +1 -2
- package/dist/delivery/web/delivery-time-cell.js +0 -1
- package/dist/delivery/web/delivery-type-cell.js +0 -1
- package/dist/delivery/web/index.js +0 -1
- package/dist/delivery/{public-names.js → web/public-names.js} +0 -1
- package/dist/document-ingest-foundation/events.d.ts +1 -0
- package/dist/document-ingest-foundation/events.js +3 -0
- package/dist/document-ingest-foundation/executor.js +2 -1
- package/dist/document-ingest-foundation/feature.js +16 -5
- package/dist/document-ingest-foundation/index.d.ts +1 -1
- package/dist/document-ingest-foundation/index.js +1 -1
- package/dist/feature-toggles/feature.d.ts +1 -1
- package/dist/feature-toggles/feature.js +2 -2
- package/dist/feature-toggles/handlers/list.query.js +1 -1
- package/dist/feature-toggles/handlers/registered.query.js +1 -1
- package/dist/feature-toggles/handlers/set.write.js +1 -1
- package/dist/feature-toggles/index.d.ts +1 -1
- package/dist/feature-toggles/index.js +1 -1
- package/dist/feature-toggles/web/client-plugin.js +1 -2
- package/dist/feature-toggles/{constants.js → web/constants.js} +0 -1
- package/dist/feature-toggles/web/index.js +0 -1
- package/dist/folders/feature.js +1 -1
- package/dist/folders/handlers/clear-folder.write.js +1 -1
- package/dist/folders/handlers/delete-folder.write.js +1 -1
- package/dist/folders/handlers/set-folder.write.js +1 -1
- package/dist/folders/index.d.ts +1 -1
- package/dist/folders/index.js +1 -1
- package/dist/folders/web/client-plugin.js +1 -2
- package/dist/folders/{constants.js → web/constants.js} +0 -1
- package/dist/folders/web/folder-manager.js +1 -2
- package/dist/folders/web/folder-section.js +1 -2
- package/dist/folders/web/i18n.js +0 -1
- package/dist/folders/web/index.d.ts +1 -1
- package/dist/folders/web/index.js +1 -2
- package/dist/folders/web/tree.js +0 -1
- package/dist/form-draft/db/queries/cleanup.d.ts +3 -2
- package/dist/form-draft/db/queries/cleanup.js +18 -9
- package/dist/form-draft/decrypt-draft.d.ts +2 -0
- package/dist/form-draft/decrypt-draft.js +19 -0
- package/dist/form-draft/entity.js +6 -9
- package/dist/form-draft/feature.js +1 -1
- package/dist/form-draft/handlers/cleanup.job.d.ts +1 -0
- package/dist/form-draft/handlers/cleanup.job.js +17 -4
- package/dist/form-draft/handlers/discard.write.js +1 -1
- package/dist/form-draft/handlers/get.query.js +6 -7
- package/dist/form-draft/handlers/list.query.js +11 -7
- package/dist/form-draft/handlers/save.write.js +1 -1
- package/dist/form-draft/index.d.ts +1 -1
- package/dist/form-draft/index.js +1 -1
- package/dist/form-draft/lookup.d.ts +2 -2
- package/dist/form-draft/lookup.js +7 -2
- package/dist/form-draft/schemas.js +1 -1
- package/dist/form-draft/{constants.js → web/constants.js} +0 -1
- package/dist/form-draft-user-data/hooks.js +2 -2
- package/dist/inbound-mail-foundation/handlers/list-accounts.query.d.ts +1 -1
- package/dist/inbound-mail-foundation/handlers/list-accounts.query.js +11 -3
- package/dist/inbound-mail-foundation/retention-sweep.js +7 -5
- package/dist/jobs/feature.js +2 -2
- package/dist/jobs/handlers/retry.write.js +1 -1
- package/dist/jobs/handlers/trigger.write.js +1 -1
- package/dist/jobs/index.d.ts +1 -1
- package/dist/jobs/index.js +1 -1
- package/dist/jobs/web/client-plugin.js +2 -3
- package/dist/jobs/{constants.js → web/constants.js} +0 -1
- package/dist/jobs/web/default-translations.d.ts +2 -0
- package/dist/jobs/web/default-translations.js +3 -0
- package/dist/jobs/web/i18n.d.ts +5 -2
- package/dist/jobs/web/i18n.js +51 -4
- package/dist/jobs/web/index.js +0 -1
- package/dist/ledger/entity.d.ts +1 -1
- package/dist/ledger/entity.js +1 -1
- package/dist/ledger/feature.js +1 -1
- package/dist/ledger/handlers/confirm-schedule-period.write.js +2 -5
- package/dist/ledger/handlers/create-transaction.write.js +1 -1
- package/dist/ledger/handlers/reports.query.js +1 -1
- package/dist/ledger/handlers/reverse-transaction.write.js +1 -1
- package/dist/ledger/index.d.ts +1 -1
- package/dist/ledger/index.js +1 -1
- package/dist/ledger/recurring.d.ts +1 -1
- package/dist/ledger/reports.d.ts +1 -1
- package/dist/ledger/schemas.js +1 -1
- package/dist/ledger/{constants.js → web/constants.js} +0 -1
- package/dist/ledger/web/index.d.ts +1 -1
- package/dist/ledger/web/index.js +1 -2
- package/dist/legal-pages/feature.d.ts +1 -1
- package/dist/legal-pages/feature.js +1 -1
- package/dist/legal-pages/index.d.ts +1 -1
- package/dist/legal-pages/index.js +1 -1
- package/dist/legal-pages/lib/boot-check.d.ts +1 -1
- package/dist/legal-pages/lib/boot-check.js +1 -1
- package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
- package/dist/legal-pages/web/client-plugin.js +1 -2
- package/dist/legal-pages/{constants.js → web/constants.js} +6 -8
- package/dist/legal-pages/web/index.js +0 -1
- package/dist/mail-foundation/i18n.d.ts +5 -2
- package/dist/mail-foundation/i18n.js +3 -2
- package/dist/mail-transport-smtp/i18n.d.ts +1 -1
- package/dist/mail-transport-smtp/i18n.js +1 -1
- package/dist/managed-pages/feature.js +1 -1
- package/dist/managed-pages/web/client-plugin.js +1 -2
- package/dist/managed-pages/web/default-translations.d.ts +2 -0
- package/dist/managed-pages/web/default-translations.js +11 -0
- package/dist/managed-pages/web/i18n.d.ts +5 -2
- package/dist/managed-pages/web/i18n.js +53 -12
- package/dist/managed-pages/web/index.d.ts +1 -1
- package/dist/managed-pages/web/index.js +1 -2
- package/dist/metrics/compute.d.ts +1 -1
- package/dist/metrics/compute.js +1 -1
- package/dist/metrics/feature.js +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/metrics/types.d.ts +1 -1
- package/dist/metrics/validate.js +1 -1
- package/dist/metrics/{constants.js → web/constants.js} +0 -1
- package/dist/metrics/window.d.ts +1 -1
- package/dist/notes-history/feature.js +1 -1
- package/dist/notes-history/handlers/add-note.write.js +1 -1
- package/dist/notes-history/index.d.ts +1 -1
- package/dist/notes-history/index.js +1 -1
- package/dist/notes-history/web/client-plugin.js +1 -2
- package/dist/notes-history/{constants.js → web/constants.js} +0 -1
- package/dist/notes-history/web/i18n.js +0 -1
- package/dist/notes-history/web/index.d.ts +1 -1
- package/dist/notes-history/web/index.js +1 -2
- package/dist/notes-history/web/notes-section.js +2 -3
- package/dist/personal-access-tokens/feature.d.ts +2 -2
- package/dist/personal-access-tokens/feature.js +6 -4
- package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
- package/dist/personal-access-tokens/handlers/create.write.js +1 -1
- package/dist/personal-access-tokens/handlers/revoke.write.js +1 -1
- package/dist/personal-access-tokens/hash.js +1 -1
- package/dist/personal-access-tokens/i18n.d.ts +1 -1
- package/dist/personal-access-tokens/i18n.js +1 -1
- package/dist/personal-access-tokens/index.d.ts +5 -5
- package/dist/personal-access-tokens/index.js +3 -3
- package/dist/personal-access-tokens/resolver.d.ts +1 -1
- package/dist/personal-access-tokens/resolver.js +1 -1
- package/dist/personal-access-tokens/schema/api-token.js +1 -1
- package/dist/personal-access-tokens/screens.d.ts +1 -1
- package/dist/personal-access-tokens/screens.js +1 -1
- package/dist/personal-access-tokens/{constants.js → web/constants.js} +0 -1
- package/dist/presets/index.d.ts +0 -1
- package/dist/presets/index.js +0 -1
- package/dist/presets/security-baseline.d.ts +1 -1
- package/dist/presets/security-baseline.js +1 -1
- package/dist/secrets/feature.js +1 -1
- package/dist/secrets/handlers/delete.write.js +1 -1
- package/dist/secrets/handlers/list.query.js +1 -1
- package/dist/secrets/handlers/set.write.js +1 -1
- package/dist/secrets/i18n.js +1 -1
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/{constants.js → web/constants.js} +0 -1
- package/dist/secrets/write-gate.js +1 -1
- package/dist/sessions/feature.js +7 -4
- package/dist/sessions/{i18n.js → web/i18n.js} +0 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/purge-files-reaching-subject.js +7 -3
- package/dist/subscription-stripe/feature.js +2 -1
- package/dist/subscription-stripe/plugin-methods.d.ts +3 -0
- package/dist/subscription-stripe/plugin-methods.js +14 -0
- package/dist/subscription-stripe/verify-webhook.js +1 -0
- package/dist/tags/feature.js +1 -1
- package/dist/tags/handlers/assign-tag.write.js +11 -7
- package/dist/tags/handlers/create-tag.write.js +1 -1
- package/dist/tags/handlers/delete-tag.write.js +4 -1
- package/dist/tags/handlers/remove-tag.write.js +1 -1
- package/dist/tags/handlers/update-tag.write.js +1 -1
- package/dist/tags/index.d.ts +1 -1
- package/dist/tags/index.js +1 -1
- package/dist/tags/screens.js +1 -1
- package/dist/tags/web/client-plugin.js +1 -2
- package/dist/tags/{constants.d.ts → web/constants.d.ts} +1 -0
- package/dist/tags/{constants.js → web/constants.js} +3 -1
- package/dist/tags/web/entity-tags.js +1 -2
- package/dist/tags/web/i18n.js +2 -2
- package/dist/tags/web/index.d.ts +1 -1
- package/dist/tags/web/index.js +1 -2
- package/dist/tags/web/tag-filter.js +1 -2
- package/dist/tags/web/tag-manager.js +5 -4
- package/dist/tags/web/tag-picker.js +0 -1
- package/dist/tags/web/tag-section.js +1 -2
- package/dist/tags/web/tags-cell.js +1 -2
- package/dist/template-resolver/api.d.ts +21 -23
- package/dist/template-resolver/api.js +34 -6
- package/dist/template-resolver/compile-document-body.d.ts +3 -0
- package/dist/template-resolver/compile-document-body.js +51 -4
- package/dist/template-resolver/compile-steps-block.js +2 -2
- package/dist/template-resolver/document-ops.d.ts +1 -1
- package/dist/template-resolver/document-ops.js +3 -3
- package/dist/template-resolver/document-sanitizer.d.ts +2 -2
- package/dist/template-resolver/document-sanitizer.js +23 -3
- package/dist/template-resolver/feature.d.ts +11 -0
- package/dist/template-resolver/feature.js +68 -35
- package/dist/template-resolver/handlers/by-slug.query.js +6 -1
- package/dist/template-resolver/handlers/by-tenant.query.js +6 -2
- package/dist/template-resolver/handlers/collection-item.query.js +2 -1
- package/dist/template-resolver/handlers/collection-list.query.js +2 -1
- package/dist/template-resolver/handlers/collection-set.write.d.ts +2 -1
- package/dist/template-resolver/handlers/collection-set.write.js +15 -3
- package/dist/template-resolver/handlers/collection-shared.d.ts +1 -2
- package/dist/template-resolver/handlers/collection-shared.js +0 -4
- package/dist/template-resolver/handlers/copy-locale.write.d.ts +2 -1
- package/dist/template-resolver/handlers/copy-locale.write.js +69 -65
- package/dist/template-resolver/handlers/diff-to-system.query.js +5 -1
- package/dist/template-resolver/handlers/discard-draft.write.d.ts +3 -2
- package/dist/template-resolver/handlers/discard-draft.write.js +19 -7
- package/dist/template-resolver/handlers/document-base.d.ts +1 -1
- package/dist/template-resolver/handlers/document-base.js +6 -1
- package/dist/template-resolver/handlers/document-blocks.query.d.ts +1 -1
- package/dist/template-resolver/handlers/document-blocks.query.js +2 -2
- package/dist/template-resolver/handlers/export-bundle.query.js +5 -2
- package/dist/template-resolver/handlers/find-by-id.query.js +4 -2
- package/dist/template-resolver/handlers/import-bundle.write.d.ts +2 -1
- package/dist/template-resolver/handlers/import-bundle.write.js +30 -25
- package/dist/template-resolver/handlers/layout-source.query.js +5 -5
- package/dist/template-resolver/handlers/list.query.js +5 -2
- package/dist/template-resolver/handlers/overview.query.d.ts +12 -3
- package/dist/template-resolver/handlers/overview.query.js +87 -51
- package/dist/template-resolver/handlers/patch-draft.write.d.ts +2 -1
- package/dist/template-resolver/handlers/patch-draft.write.js +93 -87
- package/dist/template-resolver/handlers/reset-to-system.write.d.ts +2 -1
- package/dist/template-resolver/handlers/reset-to-system.write.js +51 -44
- package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +2 -1
- package/dist/template-resolver/handlers/resource-link-pdf.write.js +34 -28
- package/dist/template-resolver/handlers/resource-remove.write.d.ts +2 -1
- package/dist/template-resolver/handlers/resource-remove.write.js +39 -33
- package/dist/template-resolver/handlers/resource-shared.js +1 -1
- package/dist/template-resolver/handlers/resource-upload.write.d.ts +2 -1
- package/dist/template-resolver/handlers/resource-upload.write.js +105 -97
- package/dist/template-resolver/handlers/send-test-shared.d.ts +5 -0
- package/dist/template-resolver/handlers/send-test-shared.js +19 -0
- package/dist/template-resolver/handlers/send-test-status.query.d.ts +9 -0
- package/dist/template-resolver/handlers/send-test-status.query.js +18 -0
- package/dist/template-resolver/handlers/send-test.write.d.ts +2 -1
- package/dist/template-resolver/handlers/send-test.write.js +89 -91
- package/dist/template-resolver/handlers/set.write.d.ts +2 -1
- package/dist/template-resolver/handlers/set.write.js +95 -91
- package/dist/template-resolver/handlers/shared.js +1 -1
- package/dist/template-resolver/handlers/template-gates.d.ts +1 -1
- package/dist/template-resolver/handlers/template-gates.js +1 -1
- package/dist/template-resolver/handlers/template-write.d.ts +1 -1
- package/dist/template-resolver/handlers/template-write.js +1 -1
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +6 -7
- package/dist/template-resolver/handlers/toggle-status.write.js +28 -10
- package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +2 -1
- package/dist/template-resolver/handlers/upsert-tenant.write.js +30 -24
- package/dist/template-resolver/handlers/usage.query.js +3 -2
- package/dist/template-resolver/handlers/validate.query.d.ts +1 -1
- package/dist/template-resolver/handlers/validate.query.js +3 -1
- package/dist/template-resolver/i18n.d.ts +3 -0
- package/dist/template-resolver/i18n.js +24 -0
- package/dist/template-resolver/index.d.ts +8 -5
- package/dist/template-resolver/index.js +6 -4
- package/dist/template-resolver/layout-appearance.js +1 -1
- package/dist/template-resolver/layout-regions.d.ts +1 -1
- package/dist/template-resolver/seeding.d.ts +4 -1
- package/dist/template-resolver/seeding.js +13 -7
- package/dist/template-resolver/store-template-resource.js +2 -2
- package/dist/template-resolver/table.js +1 -1
- package/dist/template-resolver/template-bundle.js +2 -2
- package/dist/template-resolver/template-delivery-policy.d.ts +22 -0
- package/dist/template-resolver/template-delivery-policy.js +40 -0
- package/dist/template-resolver/template-draft.d.ts +1 -1
- package/dist/template-resolver/template-draft.js +1 -1
- package/dist/template-resolver/template-edit-policy.d.ts +22 -0
- package/dist/template-resolver/template-edit-policy.js +45 -0
- package/dist/template-resolver/template-meta.d.ts +2 -2
- package/dist/template-resolver/template-meta.js +2 -2
- package/dist/template-resolver/template-preview.d.ts +1 -1
- package/dist/template-resolver/template-preview.js +15 -6
- package/dist/template-resolver/template-usage.d.ts +1 -1
- package/dist/template-resolver/template-usage.js +1 -1
- package/dist/template-resolver/template-validation.js +34 -14
- package/dist/template-resolver/testing.js +1 -1
- package/dist/template-resolver/user-content-table.js +1 -1
- package/dist/template-resolver/web/client-plugin.js +1 -2
- package/dist/template-resolver/{constants.d.ts → web/constants.d.ts} +4 -1
- package/dist/template-resolver/{constants.js → web/constants.js} +9 -10
- package/dist/template-resolver/{document-blocks.d.ts → web/document-blocks.d.ts} +2 -2
- package/dist/template-resolver/{document-blocks.js → web/document-blocks.js} +1 -0
- package/dist/template-resolver/web/document-editor-extensions.d.ts +1 -0
- package/dist/template-resolver/web/document-editor-extensions.js +22 -2
- package/dist/template-resolver/web/document-editor.js +0 -1
- package/dist/template-resolver/web/document-images.d.ts +2 -0
- package/dist/template-resolver/web/document-images.js +27 -0
- package/dist/template-resolver/{document-schema.d.ts → web/document-schema.d.ts} +2 -1
- package/dist/template-resolver/{document-schema.js → web/document-schema.js} +4 -1
- package/dist/template-resolver/{document-steps.js → web/document-steps.js} +0 -1
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.js +24 -9
- package/dist/template-resolver/web/document-toolbar-blocks.d.ts +4 -2
- package/dist/template-resolver/web/document-toolbar-blocks.js +1 -1
- package/dist/template-resolver/web/editor-handle.js +1 -1
- package/dist/template-resolver/web/i18n.js +5 -1
- package/dist/template-resolver/web/index.d.ts +3 -3
- package/dist/template-resolver/web/index.js +3 -4
- package/dist/template-resolver/{mail-constants.js → web/mail-constants.js} +0 -1
- package/dist/template-resolver/{pdf-constants.js → web/pdf-constants.js} +0 -1
- package/dist/template-resolver/web/placeholder-line-editor-lazy.js +0 -1
- package/dist/template-resolver/web/placeholder-line-editor.js +6 -4
- package/dist/template-resolver/{qualified-names.d.ts → web/qualified-names.d.ts} +2 -0
- package/dist/template-resolver/{qualified-names.js → web/qualified-names.js} +2 -1
- package/dist/template-resolver/web/use-stable-by-key.js +0 -1
- package/dist/tenant/handlers/add-member.write.js +1 -1
- package/dist/tenant/index.d.ts +1 -1
- package/dist/tenant/index.js +1 -1
- package/dist/tenant/invitation-table.js +1 -1
- package/dist/tenant/invited-membership.js +1 -1
- package/dist/tenant/last-tenant-admin.js +1 -1
- package/dist/tenant/member-role-options.js +1 -1
- package/dist/tenant/screens.js +1 -1
- package/dist/tenant/web/client-plugin.js +1 -2
- package/dist/tenant/{constants.js → web/constants.js} +3 -6
- package/dist/tenant/web/index.js +0 -1
- package/dist/tenant/web/member-roles-cell.js +0 -1
- package/dist/tenant/web/member-status-cell.js +0 -1
- package/dist/tenant-lifecycle/stages.js +2 -3
- package/dist/tier-engine/entity.d.ts +1 -1
- package/dist/tier-engine/entity.js +1 -1
- package/dist/tier-engine/feature.js +2 -2
- package/dist/tier-engine/handlers/set-tenant-tier.write.js +1 -1
- package/dist/tier-engine/index.d.ts +1 -1
- package/dist/tier-engine/index.js +1 -1
- package/dist/tier-engine/web/client-plugin.js +2 -3
- package/dist/tier-engine/{constants.js → web/constants.js} +2 -3
- package/dist/tier-engine/{i18n.js → web/i18n.js} +0 -1
- package/dist/tier-engine/web/index.js +0 -1
- package/dist/user/handlers/create.write.js +1 -1
- package/dist/user/handlers/update-roles.js +1 -1
- package/dist/user/handlers/update.write.js +1 -1
- package/dist/user/index.d.ts +1 -1
- package/dist/user/index.js +1 -1
- package/dist/user/invited-global-roles.d.ts +1 -1
- package/dist/user/invited-global-roles.js +1 -1
- package/dist/user/schema/user.js +1 -1
- package/dist/user/{constants.js → web/constants.js} +0 -1
- package/dist/user-data-rights/env.js +1 -1
- package/dist/user-data-rights/feature.js +3 -3
- package/dist/user-data-rights/index.d.ts +1 -1
- package/dist/user-data-rights/index.js +1 -1
- package/dist/user-data-rights/lib/resolve-tenant-model.js +1 -1
- package/dist/user-data-rights/mail-notifications.js +1 -1
- package/dist/user-data-rights/web/client-plugin.js +2 -3
- package/dist/user-data-rights/web/confirm-deletion-screen.js +0 -1
- package/dist/user-data-rights/{constants.js → web/constants.js} +11 -12
- package/dist/user-data-rights/web/default-translations.d.ts +2 -0
- package/dist/user-data-rights/web/default-translations.js +59 -0
- package/dist/user-data-rights/web/i18n.d.ts +5 -2
- package/dist/user-data-rights/web/i18n.js +37 -59
- package/dist/user-data-rights/web/index.d.ts +1 -1
- package/dist/user-data-rights/web/index.js +1 -2
- package/dist/user-data-rights/web/privacy-center-screen.js +1 -2
- package/dist/user-data-rights/web/request-deletion-screen.js +0 -1
- package/dist/user-data-rights-defaults/hooks/file-ref.userdata-hook.js +6 -1
- package/dist/user-profile/feature.js +1 -1
- package/dist/user-profile/handlers/change-email.write.js +1 -1
- package/dist/user-profile/index.d.ts +1 -1
- package/dist/user-profile/index.js +1 -1
- package/dist/user-profile/web/client-plugin.js +2 -3
- package/dist/user-profile/{constants.js → web/constants.js} +0 -1
- package/dist/user-profile/{i18n.js → web/i18n.js} +0 -1
- package/dist/user-profile/web/profile-screen.js +2 -3
- package/dist/waitlist/entity.js +1 -1
- package/dist/waitlist/feature.js +1 -1
- package/dist/waitlist/handlers/export-purge.write.js +1 -1
- package/dist/waitlist/handlers/invite.write.js +1 -1
- package/dist/waitlist/handlers/reject.write.js +1 -1
- package/dist/waitlist/handlers/submit.write.js +4 -3
- package/dist/waitlist/import.d.ts +1 -1
- package/dist/waitlist/index.d.ts +1 -1
- package/dist/waitlist/index.js +1 -1
- package/dist/waitlist/legacy-migrate.js +1 -1
- package/dist/waitlist/link-on-signup.js +1 -1
- package/dist/waitlist/mail.d.ts +0 -1
- package/dist/waitlist/mail.js +6 -4
- package/dist/waitlist/payloads.js +1 -1
- package/dist/waitlist/screens.js +1 -1
- package/dist/waitlist/{constants.js → web/constants.js} +0 -1
- package/kumiko-es-tables.json +102 -0
- package/package.json +30 -29
- package/src/audit/changes.json +7 -0
- package/src/auth-email-password/changes.json +6 -0
- package/src/auth-mfa/changes.json +6 -0
- package/src/billing-foundation/changes.json +18 -0
- package/src/cap-counter/changes.json +12 -0
- package/src/delivery/changes.json +6 -0
- package/src/document-ingest-foundation/changes.json +6 -0
- package/src/files/changes.json +7 -0
- package/src/form-draft/changes.json +7 -0
- package/src/inbound-mail-foundation/changes.json +6 -0
- package/src/ledger/changes.json +7 -0
- package/src/mail-foundation/changes.json +6 -0
- package/src/presets/changes.json +7 -0
- package/src/tags/changes.json +6 -0
- package/src/template-resolver/changes.json +63 -0
- package/src/user-data-rights/changes.json +14 -0
- package/src/waitlist/changes.json +6 -0
- package/dist/admin-shell/i18n.d.ts +0 -5
- package/dist/admin-shell/i18n.js +0 -51
- package/dist/audit/i18n.d.ts +0 -5
- package/dist/audit/i18n.js +0 -22
- package/dist/jobs/i18n.d.ts +0 -5
- package/dist/jobs/i18n.js +0 -52
- package/dist/managed-pages/i18n.d.ts +0 -5
- package/dist/managed-pages/i18n.js +0 -55
- package/dist/presets/dsgvo-self-service.d.ts +0 -10
- package/dist/presets/dsgvo-self-service.js +0 -24
- package/dist/user-data-rights/i18n.d.ts +0 -5
- package/dist/user-data-rights/i18n.js +0 -39
- /package/dist/account-security/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/account-security/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/admin-shell/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/auth-email-password/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/auth-email-password/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/auth-email-password/{mail-i18n.d.ts → web/mail-i18n.d.ts} +0 -0
- /package/dist/auth-mfa/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/billing-foundation/{consumer-protection → web/consumer-protection}/consent-locale.d.ts +0 -0
- /package/dist/billing-foundation/{contact-card.d.ts → web/contact-card.d.ts} +0 -0
- /package/dist/cap-overview/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/cap-overview/{usage-math.js → web/usage-math.js} +0 -0
- /package/dist/compliance-profiles/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/config/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/custom-fields/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/delivery/{public-names.d.ts → web/public-names.d.ts} +0 -0
- /package/dist/feature-toggles/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/folders/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/form-draft/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/jobs/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/ledger/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/legal-pages/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/metrics/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/notes-history/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/personal-access-tokens/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/personal-access-tokens/{scopes.d.ts → web/scopes.d.ts} +0 -0
- /package/dist/personal-access-tokens/{scopes.js → web/scopes.js} +0 -0
- /package/dist/secrets/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/sessions/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/template-resolver/{document-steps.d.ts → web/document-steps.d.ts} +0 -0
- /package/dist/template-resolver/{mail-constants.d.ts → web/mail-constants.d.ts} +0 -0
- /package/dist/template-resolver/{pdf-constants.d.ts → web/pdf-constants.d.ts} +0 -0
- /package/dist/template-resolver/{placeholder-text.d.ts → web/placeholder-text.d.ts} +0 -0
- /package/dist/template-resolver/{placeholder-text.js → web/placeholder-text.js} +0 -0
- /package/dist/tenant/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/tier-engine/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/tier-engine/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/user/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-data-rights/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-profile/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-profile/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/waitlist/{constants.d.ts → web/constants.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UnprocessableError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
-
import { AuthErrors } from "./constants.js";
|
|
2
|
+
import { AuthErrors } from "./web/constants.js";
|
|
3
3
|
// @wrapper-known error-helper
|
|
4
4
|
export function invalidCredentials() {
|
|
5
5
|
return writeFailure(new UnprocessableError(AuthErrors.invalidCredentials, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
-
import { MIN_HMAC_SECRET_LENGTH } from "./constants.js";
|
|
5
4
|
import { changePasswordWrite } from "./handlers/change-password.write.js";
|
|
6
5
|
import { createConfirmAccountUnlockHandler } from "./handlers/confirm-account-unlock.write.js";
|
|
7
6
|
import { createInviteAcceptHandler } from "./handlers/invite-accept.write.js";
|
|
@@ -20,8 +19,9 @@ import { createSignupConfirmHandler } from "./handlers/signup-confirm.write.js";
|
|
|
20
19
|
import { createSignupRequestHandler, } from "./handlers/signup-request.write.js";
|
|
21
20
|
import { createSwitchTenantMfaGateHandler } from "./handlers/switch-tenant-mfa-gate.write.js";
|
|
22
21
|
import { createVerifyEmailHandler } from "./handlers/verify-email.write.js";
|
|
23
|
-
import { AUTH_EMAIL_PASSWORD_MAIL_I18N } from "./mail-i18n.js";
|
|
24
22
|
import { AUTH_MAIL_VARIABLES, authMailLocalizedTemplate, INVITE_MAIL_VARIABLES, sendsMagicLinkMail, } from "./mail-notifications.js";
|
|
23
|
+
import { MIN_HMAC_SECRET_LENGTH } from "./web/constants.js";
|
|
24
|
+
import { AUTH_EMAIL_PASSWORD_MAIL_I18N } from "./web/mail-i18n.js";
|
|
25
25
|
/**
|
|
26
26
|
* Env-vars contract for the `auth-email-password` feature.
|
|
27
27
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { InternalError, UnprocessableError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
-
import { AuthErrors } from "../constants.js";
|
|
5
4
|
import { invalidUnlockToken } from "../errors.js";
|
|
6
5
|
import { clearLockoutState } from "../lockout-store.js";
|
|
7
6
|
import { verifyUnlockToken } from "../unlock-token.js";
|
|
7
|
+
import { AuthErrors } from "../web/constants.js";
|
|
8
8
|
// Confirm step of the unlock flow. Unlike reset/verify, there's no entity
|
|
9
9
|
// write: the token's HMAC signature already proves it was minted for an
|
|
10
10
|
// existing, non-deleted user (see request-account-unlock.write.ts's
|
|
@@ -33,10 +33,10 @@ import { grantInvitedMembershipRole } from "../../tenant/invited-membership.js";
|
|
|
33
33
|
import { grantInvitedGlobalRoles, parseInvitedGlobalRoles, } from "../../user/invited-global-roles.js";
|
|
34
34
|
// kumiko-lint-ignore cross-feature-import login-style password-check
|
|
35
35
|
import { userTable } from "../../user/schema/user.js";
|
|
36
|
-
import { AUTH_LOCKOUT_DEFAULT_DURATION_MINUTES, AUTH_LOCKOUT_DEFAULT_MAX_FAILED_ATTEMPTS, } from "../constants.js";
|
|
37
36
|
import { invalidCredentials, invalidInviteToken, inviteEmailMismatch } from "../errors.js";
|
|
38
37
|
import { burnInviteToken, deleteInviteToken, getInvitationIdForToken, unburnInviteToken, } from "../invite-token-store.js";
|
|
39
38
|
import { passwordSchema } from "../password-policy.js";
|
|
39
|
+
import { AUTH_LOCKOUT_DEFAULT_DURATION_MINUTES, AUTH_LOCKOUT_DEFAULT_MAX_FAILED_ATTEMPTS, } from "../web/constants.js";
|
|
40
40
|
import { gateEnforceAccountStatus, gateEnforceEmailVerified, gateEnforceLockout, gateEnforceMfa, gateVerifyPassword, } from "./login.write.js";
|
|
41
41
|
const InviteAcceptWithLoginSchema = z.object({
|
|
42
42
|
token: z.string().min(1),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
import { type GlobalRole } from "../../user/constants.ts";
|
|
2
|
+
import { type GlobalRole } from "../../user/web/constants.ts";
|
|
3
3
|
import type { AuthMailLocale } from "../email-templates.ts";
|
|
4
4
|
export type InviteCreateData = {
|
|
5
5
|
readonly kind: "invite-created";
|
|
@@ -29,15 +29,15 @@ import { INVITATION_STATUS, tenantInvitationEntity, tenantInvitationsTable, } fr
|
|
|
29
29
|
import { membershipVersionOf } from "../../tenant/invited-membership.js";
|
|
30
30
|
// kumiko-lint-ignore cross-feature-import membership-role validation owned by tenant-feature
|
|
31
31
|
import { findForbiddenMembershipRole, findForbiddenRoleAssignment, reservedMembershipRoleError, unassignableMembershipRoleError, } from "../../tenant/membership-roles.js";
|
|
32
|
-
// kumiko-lint-ignore cross-feature-import global-role options are owned by the user feature
|
|
33
|
-
import { GLOBAL_ROLE_OPTIONS } from "../../user/constants.js";
|
|
34
32
|
// kumiko-lint-ignore cross-feature-import invitee lookup by email reads the user row
|
|
35
33
|
import { userTable } from "../../user/schema/user.js";
|
|
36
|
-
import
|
|
34
|
+
// kumiko-lint-ignore cross-feature-import global-role options are owned by the user feature
|
|
35
|
+
import { GLOBAL_ROLE_OPTIONS } from "../../user/web/constants.js";
|
|
37
36
|
import { inviteAlreadyAccepted } from "../errors.js";
|
|
38
37
|
import { invalidateExistingInviteToken, storeInviteToken } from "../invite-token-store.js";
|
|
39
38
|
import { dispatchMagicLinkMail, resolveHandlerMailLocale } from "../magic-link-mail.js";
|
|
40
39
|
import { AuthMailNotificationTypes } from "../mail-notifications.js";
|
|
40
|
+
import { AUTH_INVITE_DEFAULT_TTL_MINUTES } from "../web/constants.js";
|
|
41
41
|
const InviteCreateSchema = z.object({
|
|
42
42
|
email: z.email(),
|
|
43
43
|
role: z.string().min(1).max(50),
|
|
@@ -13,8 +13,8 @@ import { decryptStoredPii } from "../../shared/index.js";
|
|
|
13
13
|
import { INVITATION_STATUS, tenantInvitationsTable } from "../../tenant/invitation-table.js";
|
|
14
14
|
// kumiko-lint-ignore cross-feature-import login-style account lookup, same as invite-accept-with-login
|
|
15
15
|
import { userTable } from "../../user/schema/user.js";
|
|
16
|
-
import { AuthErrors } from "../constants.js";
|
|
17
16
|
import { getInvitationIdForToken } from "../invite-token-store.js";
|
|
17
|
+
import { AuthErrors } from "../web/constants.js";
|
|
18
18
|
const InviteInfoSchema = z.object({
|
|
19
19
|
token: z.string().min(1),
|
|
20
20
|
});
|
|
@@ -47,6 +47,7 @@ type AuthenticatableUserRow = AuthUserRow & {
|
|
|
47
47
|
};
|
|
48
48
|
/** Uniform response on any credential miss — burns argon2 cost (#774). */
|
|
49
49
|
export declare function gateResolveAuthUser(found: AuthUserRow | null, password: string): Promise<GateOutcome<AuthenticatableUserRow>>;
|
|
50
|
+
export declare function gateCountUnknownUser(ctx: HandlerContext, email: string, maxFailedAttempts: number, lockoutDurationMinutes: number): Promise<GateOutcome<undefined>>;
|
|
50
51
|
/**
|
|
51
52
|
* Lockout BEFORE password verify — locked accounts can't be password-probed.
|
|
52
53
|
* Fail-open without Redis (IP rate-limit still covers partially).
|
|
@@ -4,9 +4,9 @@ import * as z from "zod";
|
|
|
4
4
|
import { verifyDummyPassword, verifyPassword } from "../../shared/index.js";
|
|
5
5
|
import { USER_STATUS, UserQueries } from "../../user/index.js";
|
|
6
6
|
import { parseAuthUserRow } from "../auth-user-row.js";
|
|
7
|
-
import { AUTH_LOCKOUT_DEFAULT_DURATION_MINUTES, AUTH_LOCKOUT_DEFAULT_MAX_FAILED_ATTEMPTS, } from "../constants.js";
|
|
8
7
|
import { accountLocked, accountRestricted, emailNotVerified, invalidCredentials, noMembership, } from "../errors.js";
|
|
9
8
|
import { clearLockoutState, getLockoutState, recordFailedAttempt } from "../lockout-store.js";
|
|
9
|
+
import { AUTH_LOCKOUT_DEFAULT_DURATION_MINUTES, AUTH_LOCKOUT_DEFAULT_MAX_FAILED_ATTEMPTS, } from "../web/constants.js";
|
|
10
10
|
const SYSTEM_USER_ID = "00000000-0000-4000-8000-000000000000";
|
|
11
11
|
function reject(result) {
|
|
12
12
|
return { ok: false, result };
|
|
@@ -22,6 +22,26 @@ export async function gateResolveAuthUser(found, password) {
|
|
|
22
22
|
}
|
|
23
23
|
return ok({ ...found, passwordHash: found.passwordHash });
|
|
24
24
|
}
|
|
25
|
+
// Unknown and deleted addresses are counted too, under a keyed digest of the
|
|
26
|
+
// address exactly as findForAuth looks it up (no own normalization: a differently
|
|
27
|
+
// cased spelling is a different, unknown address and must not share a counter with a
|
|
28
|
+
// registered one). ctx.rateLimitDigest is derived from the JWT secret, so that after the
|
|
29
|
+
// threshold they answer account_locked exactly like a registered address.
|
|
30
|
+
// Without a digest key (no rate-limit wiring) they stay plain invalid_credentials.
|
|
31
|
+
function unknownEmailLockoutSubject(ctx, email) {
|
|
32
|
+
const digest = ctx.rateLimitDigest?.(email);
|
|
33
|
+
return digest === undefined ? undefined : `email:${digest}`;
|
|
34
|
+
}
|
|
35
|
+
export async function gateCountUnknownUser(ctx, email, maxFailedAttempts, lockoutDurationMinutes) {
|
|
36
|
+
const subject = unknownEmailLockoutSubject(ctx, email);
|
|
37
|
+
if (!ctx.redis || subject === undefined)
|
|
38
|
+
return ok(undefined);
|
|
39
|
+
const locked = await gateEnforceLockout(ctx, subject);
|
|
40
|
+
if (!locked.ok)
|
|
41
|
+
return locked;
|
|
42
|
+
await recordFailedAttempt(ctx.redis, subject, maxFailedAttempts, lockoutDurationMinutes);
|
|
43
|
+
return ok(undefined);
|
|
44
|
+
}
|
|
25
45
|
/**
|
|
26
46
|
* Lockout BEFORE password verify — locked accounts can't be password-probed.
|
|
27
47
|
* Fail-open without Redis (IP rate-limit still covers partially).
|
|
@@ -164,6 +184,11 @@ export function createLoginHandler(opts = {}) {
|
|
|
164
184
|
handler: async (event, ctx) => {
|
|
165
185
|
const systemUser = createSystemUser(SYSTEM_USER_ID);
|
|
166
186
|
const foundRow = parseAuthUserRow(await ctx.queryAs(systemUser, UserQueries.findForAuth, { email: event.payload.email }));
|
|
187
|
+
if (!foundRow?.passwordHash || foundRow.isDeleted) {
|
|
188
|
+
const unknown = await gateCountUnknownUser(ctx, event.payload.email, maxFailedAttempts, lockoutDurationMinutes);
|
|
189
|
+
if (!unknown.ok)
|
|
190
|
+
return unknown.result;
|
|
191
|
+
}
|
|
167
192
|
const userGate = await gateResolveAuthUser(foundRow, event.payload.password);
|
|
168
193
|
if (!userGate.ok)
|
|
169
194
|
return userGate.result;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AUTH_UNLOCK_DEFAULT_TTL_MINUTES, AuthErrors } from "../constants.js";
|
|
2
1
|
import { AuthMailNotificationTypes } from "../mail-notifications.js";
|
|
3
2
|
import { signUnlockToken } from "../unlock-token.js";
|
|
3
|
+
import { AUTH_UNLOCK_DEFAULT_TTL_MINUTES, AuthErrors } from "../web/constants.js";
|
|
4
4
|
import { createTokenRequestHandler, } from "./token-request-handler.js";
|
|
5
5
|
// @wrapper-known semantic-alias
|
|
6
6
|
export function createRequestAccountUnlockHandler(opts) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AUTH_VERIFY_DEFAULT_TTL_MINUTES, AuthErrors } from "../constants.js";
|
|
2
1
|
import { AuthMailNotificationTypes } from "../mail-notifications.js";
|
|
3
2
|
import { signVerificationToken } from "../verification-token.js";
|
|
3
|
+
import { AUTH_VERIFY_DEFAULT_TTL_MINUTES, AuthErrors } from "../web/constants.js";
|
|
4
4
|
import { createTokenRequestHandler, } from "./token-request-handler.js";
|
|
5
5
|
// @wrapper-known semantic-alias
|
|
6
6
|
export function createRequestEmailVerificationHandler(opts) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AUTH_RESET_DEFAULT_TTL_MINUTES, AuthErrors } from "../constants.js";
|
|
2
1
|
import { AuthMailNotificationTypes } from "../mail-notifications.js";
|
|
3
2
|
import { signResetToken } from "../reset-token.js";
|
|
3
|
+
import { AUTH_RESET_DEFAULT_TTL_MINUTES, AuthErrors } from "../web/constants.js";
|
|
4
4
|
import { createTokenRequestHandler, } from "./token-request-handler.js";
|
|
5
5
|
// @wrapper-known semantic-alias
|
|
6
6
|
export function createRequestPasswordResetHandler(opts) {
|
|
@@ -2,10 +2,10 @@ import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
|
2
2
|
import { UnprocessableError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { hashPassword } from "../../shared/index.js";
|
|
5
|
-
import { AuthErrors } from "../constants.js";
|
|
6
5
|
import { invalidResetToken } from "../errors.js";
|
|
7
6
|
import { passwordSchema } from "../password-policy.js";
|
|
8
7
|
import { verifyResetToken } from "../reset-token.js";
|
|
8
|
+
import { AuthErrors } from "../web/constants.js";
|
|
9
9
|
import { runConfirmTokenFlow } from "./confirm-token-flow.js";
|
|
10
10
|
// Confirm step of the reset flow. Token-verify happens inline; the
|
|
11
11
|
// post-verify pipeline (burn, load user, memberships, try-all-tenants,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { UnprocessableError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
-
import { AuthErrors } from "../constants.js";
|
|
5
4
|
import { invalidVerificationToken } from "../errors.js";
|
|
6
5
|
import { verifyVerificationToken } from "../verification-token.js";
|
|
6
|
+
import { AuthErrors } from "../web/constants.js";
|
|
7
7
|
import { runConfirmTokenFlow } from "./confirm-token-flow.js";
|
|
8
8
|
const VerifyEmailSchema = z.object({
|
|
9
9
|
token: z.string().min(1),
|
|
@@ -2,7 +2,6 @@ export { hashPassword, verifyPassword } from "../shared/password-hashing.ts";
|
|
|
2
2
|
export { type AuthPath, type AuthPaths, DEFAULT_AUTH_PATHS, makeAuthPaths } from "./auth-paths.ts";
|
|
3
3
|
export type { BootstrapConfigValue, BootstrapDeps, BootstrapInvite, BootstrapInviteOutcome, BootstrapPlan, BootstrapReport, BootstrapSeedDeps, BootstrapSystemAdmin, BootstrapTenant, BootstrapTenantOutcome, } from "./bootstrap.ts";
|
|
4
4
|
export { BootstrapPlanError, BootstrapWriteError, bootstrapTenants } from "./bootstrap.ts";
|
|
5
|
-
export { AUTH_EMAIL_PASSWORD_FEATURE, AuthErrors, AuthHandlers, AuthQueries } from "./constants.ts";
|
|
6
5
|
export type { AuthMailLocale } from "./email-templates.ts";
|
|
7
6
|
export type { AccountLockoutOptions, AccountUnlockOptions, AuthEmailPasswordOptions, EmailVerificationOptions, InviteOptions, PasswordResetOptions, SignupOptions, } from "./feature.ts";
|
|
8
7
|
export { authEmailPasswordEnvSchema, createAuthEmailPasswordFeature } from "./feature.ts";
|
|
@@ -11,3 +10,4 @@ export { AUTH_SELF_REGISTRATION_FEATURE, createAuthSelfRegistrationToggleFeature
|
|
|
11
10
|
export { signToken, TokenPurpose, type VerifyResult, verifyToken } from "./signed-token.ts";
|
|
12
11
|
export { type IssuedSignupActivation, type IssueSignupActivationArgs, issueSignupActivation, SIGNUP_ACTIVATION_NOTIFICATION_TYPE, } from "./signup-activation.ts";
|
|
13
12
|
export { invalidateExistingSignupToken, normalizeEmail, SIGNUP_TOKEN_KEY_PREFIXES, storeSignupToken, } from "./signup-token-store.ts";
|
|
13
|
+
export { AUTH_EMAIL_PASSWORD_FEATURE, AuthErrors, AuthHandlers, AuthQueries, } from "./web/constants.ts";
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
export { hashPassword, verifyPassword } from "../shared/password-hashing.js";
|
|
8
8
|
export { DEFAULT_AUTH_PATHS, makeAuthPaths } from "./auth-paths.js";
|
|
9
9
|
export { BootstrapPlanError, BootstrapWriteError, bootstrapTenants } from "./bootstrap.js";
|
|
10
|
-
export { AUTH_EMAIL_PASSWORD_FEATURE, AuthErrors, AuthHandlers, AuthQueries } from "./constants.js";
|
|
11
10
|
export { authEmailPasswordEnvSchema, createAuthEmailPasswordFeature } from "./feature.js";
|
|
12
11
|
export { AuthMailNotificationTypes } from "./mail-notifications.js";
|
|
13
12
|
export { AUTH_SELF_REGISTRATION_FEATURE, createAuthSelfRegistrationToggleFeature, } from "./self-registration-toggle.js";
|
|
@@ -19,3 +18,4 @@ export { AUTH_SELF_REGISTRATION_FEATURE, createAuthSelfRegistrationToggleFeature
|
|
|
19
18
|
export { signToken, TokenPurpose, verifyToken } from "./signed-token.js";
|
|
20
19
|
export { issueSignupActivation, SIGNUP_ACTIVATION_NOTIFICATION_TYPE, } from "./signup-activation.js";
|
|
21
20
|
export { invalidateExistingSignupToken, normalizeEmail, SIGNUP_TOKEN_KEY_PREFIXES, storeSignupToken, } from "./signup-token-store.js";
|
|
21
|
+
export { AUTH_EMAIL_PASSWORD_FEATURE, AuthErrors, AuthHandlers, AuthQueries, } from "./web/constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QnTypes, qn, templateVariable, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { hasMailTranslationKey, listMailLocales, mailT, resolveMailLocale, } from "@cosmicdrift/kumiko-framework/i18n";
|
|
3
3
|
import { escapeHtml, escapeHtmlAttr } from "@cosmicdrift/kumiko-renderer/headless";
|
|
4
|
-
import { AUTH_EMAIL_PASSWORD_FEATURE } from "./constants.js";
|
|
4
|
+
import { AUTH_EMAIL_PASSWORD_FEATURE } from "./web/constants.js";
|
|
5
5
|
export const AUTH_MAIL_KINDS = {
|
|
6
6
|
passwordReset: { name: "password-reset", translationKey: "reset" },
|
|
7
7
|
accountUnlock: { name: "account-unlock", translationKey: "unlock" },
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
// cannot drift between the two.
|
|
6
6
|
import { generateToken } from "@cosmicdrift/kumiko-framework/api";
|
|
7
7
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
8
|
-
import { AUTH_SIGNUP_DEFAULT_TTL_MINUTES } from "./constants.js";
|
|
9
8
|
import { dispatchMagicLinkMail } from "./magic-link-mail.js";
|
|
10
9
|
import { AuthMailNotificationTypes } from "./mail-notifications.js";
|
|
11
10
|
import { invalidateExistingSignupToken, normalizeEmail, storeSignupToken, } from "./signup-token-store.js";
|
|
11
|
+
import { AUTH_SIGNUP_DEFAULT_TTL_MINUTES } from "./web/constants.js";
|
|
12
12
|
export const SIGNUP_ACTIVATION_NOTIFICATION_TYPE = AuthMailNotificationTypes.signupActivation;
|
|
13
13
|
export async function issueSignupActivation(args) {
|
|
14
14
|
const ttlSeconds = (args.tokenTtlMinutes ?? AUTH_SIGNUP_DEFAULT_TTL_MINUTES) * 60;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Shared Web-Primitives für die Auth-Screens. Nur noch Layout/Style-
|
|
4
3
|
// Helpers — Form/Field/Input/Button/Banner kommen jetzt über
|
|
5
4
|
// usePrimitives() aus dem Framework-Vertrag, damit Native dieselben
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Auth-Gate: rendert den LoginScreen solange der Session-Status
|
|
4
3
|
// "unauthenticated" ist, sonst die Kinder. "loading" zeigt einen
|
|
5
4
|
// minimalen Placeholder — die initiale Refresh-Runde liefert in der
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// Client-Feature-Factory für auth-email-password. Wird vom App-Code
|
|
3
2
|
// in createKumikoApp({ clientFeatures: [emailPasswordClient()] })
|
|
4
3
|
// eingehängt und bringt Session-Context + AuthGate + Default-UI-
|
|
5
4
|
// Translations (de/en) mit. Alles ist overridbar — Login-Screen,
|
|
6
5
|
// Strings pro Locale, pro Key.
|
|
7
|
-
import { defaultTranslations, mergeTranslations } from "../i18n.js";
|
|
8
6
|
import { makeSessionAuthGate, } from "./auth-gate.js";
|
|
9
7
|
import { emailPasswordClientActions } from "./client-actions.js";
|
|
8
|
+
import { defaultTranslations, mergeTranslations } from "./i18n.js";
|
|
10
9
|
export function emailPasswordClient(options = {}) {
|
|
11
10
|
const translations = mergeTranslations(defaultTranslations, options.translations ?? {});
|
|
12
11
|
return {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// ConfirmAccountUnlockScreen — reads `?token=...` from the URL, auto-posts
|
|
4
3
|
// it to /api/auth/confirm-account-unlock on mount, shows success/error.
|
|
5
4
|
// Idempotent server-side (clearLockoutState is a no-op when already
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// runtime-isolation guard complaining. Runtime may import "client" files
|
|
5
|
-
// (see RUNTIME_RULES), so server-side access (handlers, dispatcher) stays
|
|
6
|
-
// intact as well.
|
|
1
|
+
// Pure string constants — no DB/Node builtins. They live under web/ so browser
|
|
2
|
+
// code (Members screen etc.) can import them without the runtime-isolation
|
|
3
|
+
// guard complaining; runtime may import client files, so handlers keep using them.
|
|
7
4
|
export const AUTH_EMAIL_PASSWORD_FEATURE = "auth-email-password";
|
|
8
5
|
// Minimum length for reset/verify hmacSecret — mirrors the ≥32-char
|
|
9
6
|
// JWT_SECRET env check (HMAC-SHA256 key material).
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Standard-Topbar-Actions Komposition für Apps mit Auth + Workspaces.
|
|
4
3
|
// Bündelt das Pattern das jeder App-Sample sonst hand-ausschreibt:
|
|
5
4
|
// TenantSwitcher (links) → optional Extras (z.B. LanguageSwitcher) →
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// ForgotPasswordScreen — Form mit email-input. Submit triggert
|
|
4
3
|
// /api/auth/request-password-reset (silent-success, kein account-
|
|
5
4
|
// enumeration). UI zeigt unconditional ein "Wenn Account existiert,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// English UI copy for this feature. emailPasswordClient() mounts it as a
|
|
3
2
|
// LocaleProvider fallback. Apps override keys via
|
|
4
3
|
// `emailPasswordClient({ translations })`. German/Spanish ship in
|
|
@@ -129,7 +128,7 @@ export const defaultTranslations = {
|
|
|
129
128
|
"auth.tenant.switcher.none": "No tenant",
|
|
130
129
|
},
|
|
131
130
|
};
|
|
132
|
-
//
|
|
133
|
-
// TranslationsByLocale)
|
|
134
|
-
// (auth-email-password/web)
|
|
131
|
+
// The canonical implementation lives in the renderer (next to
|
|
132
|
+
// TranslationsByLocale); the re-export keeps the existing import surface
|
|
133
|
+
// (auth-email-password/web) stable.
|
|
135
134
|
export { mergeTranslations } from "@cosmicdrift/kumiko-renderer";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { defaultTranslations, mergeTranslations } from "../i18n.ts";
|
|
2
1
|
export type { AuthTokenFailure, CurrentUserProfile, LoginFailure, LoginRequest, LoginResponse, ResetPasswordFailure, SignupConfirmSuccess, TenantSummary, VerifyEmailFailure, } from "./auth-client.ts";
|
|
3
2
|
export { AuthRequestError, confirmAccountUnlock, confirmSignup, requestAccountUnlock, requestEmailVerification, requestPasswordReset, requestSignup, resetPassword, toLoginResponse, verifyEmail, } from "./auth-client.ts";
|
|
4
3
|
export type { AuthCardProps, AuthShellRenderer } from "./auth-form-primitives.tsx";
|
|
@@ -14,6 +13,7 @@ export type { DefaultTopbarActionsProps } from "./default-topbar-actions.tsx";
|
|
|
14
13
|
export { DefaultTopbarActions } from "./default-topbar-actions.tsx";
|
|
15
14
|
export type { ForgotPasswordScreenProps } from "./forgot-password-screen.tsx";
|
|
16
15
|
export { ForgotPasswordScreen } from "./forgot-password-screen.tsx";
|
|
16
|
+
export { defaultTranslations, mergeTranslations } from "./i18n.ts";
|
|
17
17
|
export type { InviteAcceptScreenProps } from "./invite-accept-screen.tsx";
|
|
18
18
|
export { InviteAcceptScreen } from "./invite-accept-screen.tsx";
|
|
19
19
|
export type { AuthLegalLink, LoginScreenProps } from "./login-screen.tsx";
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// Public exports für die Browser-Seite des auth-email-password Features.
|
|
3
2
|
// Wird über den Sub-Path-Export `@cosmicdrift/kumiko-bundled-features/auth-email-
|
|
4
3
|
// password/web` konsumiert — die Server-Seite (defineFeature) lebt in
|
|
5
4
|
// `@cosmicdrift/kumiko-bundled-features/auth-email-password` und hat keine
|
|
6
5
|
// React-/DOM-Deps. Trennung bleibt sauber so wie renderer vs renderer/web.
|
|
7
|
-
export { defaultTranslations, mergeTranslations } from "../i18n.js";
|
|
8
6
|
export { AuthRequestError, confirmAccountUnlock, confirmSignup, requestAccountUnlock, requestEmailVerification, requestPasswordReset, requestSignup, resetPassword, toLoginResponse, verifyEmail, } from "./auth-client.js";
|
|
9
7
|
export { AuthCard, AuthShellProvider, useAuthShell } from "./auth-form-primitives.js";
|
|
10
8
|
export { createLoginRoute, makeAuthGate, makeSessionAuthGate } from "./auth-gate.js";
|
|
@@ -13,6 +11,7 @@ export { emailPasswordClient } from "./client-plugin.js";
|
|
|
13
11
|
export { ConfirmAccountUnlockScreen } from "./confirm-account-unlock-screen.js";
|
|
14
12
|
export { DefaultTopbarActions } from "./default-topbar-actions.js";
|
|
15
13
|
export { ForgotPasswordScreen } from "./forgot-password-screen.js";
|
|
14
|
+
export { defaultTranslations, mergeTranslations } from "./i18n.js";
|
|
16
15
|
export { InviteAcceptScreen } from "./invite-accept-screen.js";
|
|
17
16
|
export { LoginScreen } from "./login-screen.js";
|
|
18
17
|
export { RequestAccountUnlockScreen } from "./request-account-unlock-screen.js";
|
|
@@ -6,8 +6,8 @@ export type InviteAcceptScreenProps = {
|
|
|
6
6
|
* `(data) => "/${data.tenantId}/"`. Function-form receives the roles this
|
|
7
7
|
* flow grants in the target tenant; branch 1 reports the invitation's
|
|
8
8
|
* role, which for an existing member is not their full role set there.
|
|
9
|
-
* @deprecated Configure auth.postAuthLanding on the server; its landingPath wins.
|
|
10
|
-
* Kept as fallback. */
|
|
9
|
+
* @deprecated Removed in 0.390.0. Configure auth.postAuthLanding on the server; its landingPath wins.
|
|
10
|
+
* Kept as fallback until 0.390.0. */
|
|
11
11
|
readonly loggedInHref?: string | ((args: {
|
|
12
12
|
tenantId: string;
|
|
13
13
|
roles: readonly string[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Default-LoginScreen. Reine E-Mail-+-Passwort-Form, zentriert, Card-
|
|
4
3
|
// Layout. Texte kommen aus `useTranslation()` — die Default-Bundles
|
|
5
4
|
// (de+en) liefert das Feature selber mit (translations.ts); Apps die
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// RequestAccountUnlockScreen — form with an email input. Submit triggers
|
|
4
3
|
// /api/auth/request-account-unlock (silent-success, no account
|
|
5
4
|
// enumeration). UI unconditionally shows an "if your account is locked,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// ResetPasswordScreen — liest `?token=...` aus der URL, zeigt Form mit
|
|
4
3
|
// new + confirm-password. Submit triggert /api/auth/reset-password mit
|
|
5
4
|
// dem Token. Server collapses alle Token-Verify-Failures auf einen
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Rendered by auth-gate's LoginRoute when the session bootstrap failed for a reason other than "not logged in".
|
|
4
3
|
import { usePrimitives, useTranslation } from "@cosmicdrift/kumiko-renderer";
|
|
5
4
|
import { useState } from "react";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Session-State für den Browser-Renderer. Hält den aktuell eingeloggten
|
|
4
3
|
// User (Profile + aktive Tenant-Zuordnung + Memberships), reagiert auf
|
|
5
4
|
// Login/Logout/Switch-Tenant und refresh't die Daten automatisch.
|
|
@@ -7,8 +7,8 @@ export type SignupCompleteScreenProps = {
|
|
|
7
7
|
/** Where to send the user after activation. Function-form receives the tenantKey, the
|
|
8
8
|
* roles granted by this flow in that tenant, and the claimed `handover` entity when
|
|
9
9
|
* signup claimed a try-first grant. Default "/".
|
|
10
|
-
* @deprecated Configure auth.postAuthLanding on the server; its landingPath wins.
|
|
11
|
-
* Kept as fallback. */
|
|
10
|
+
* @deprecated Removed in 0.390.0. Configure auth.postAuthLanding on the server; its landingPath wins.
|
|
11
|
+
* Kept as fallback until 0.390.0. */
|
|
12
12
|
readonly loggedInHref?: string | ((args: {
|
|
13
13
|
tenantKey: string;
|
|
14
14
|
roles: readonly string[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Tenant choices as dropdown entries — the TenantSwitcher's list for a user
|
|
4
3
|
// menu that carries the shell controls. Renders nothing for a single tenant.
|
|
5
4
|
import { useTranslation } from "@cosmicdrift/kumiko-renderer";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// TenantSwitcher — kleines Dropdown, zeigt den aktiven Tenant und
|
|
4
3
|
// erlaubt Wechsel zu anderen Memberships. Auf Radix-DropdownMenu für
|
|
5
4
|
// konsistentes Verhalten (Click-outside/Escape/Keyboard-Nav).
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// UserMenu — Avatar-Dropdown für die Topbar (variant="pill", Default) oder den
|
|
4
3
|
// Sidebar-Footer (variant="sidebar" = die sidebar-07-NavUser-Row). Zeigt
|
|
5
4
|
// Name/Email + Logout. Auf Radix-DropdownMenu, damit Click-outside, Escape,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// VerifyEmailScreen — liest `?token=...` aus URL, schickt ihn auto an
|
|
4
3
|
// /api/auth/verify-email beim Mount, zeigt success/error. Idempotent
|
|
5
4
|
// auf Server-Seite (mehrfaches Klicken setzt emailVerified=true erneut),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type WriteFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
-
export { AuthMfaErrorCodes as AuthMfaErrors } from "./constants.ts";
|
|
2
|
+
export { AuthMfaErrorCodes as AuthMfaErrors } from "./web/constants.ts";
|
|
3
3
|
export declare function mfaAlreadyEnabled(): WriteFailure;
|
|
4
4
|
export declare function mfaNotEnabled(): WriteFailure;
|
|
5
5
|
export declare function invalidSetupToken(): WriteFailure;
|
package/dist/auth-mfa/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnprocessableError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
-
import { AuthMfaErrorCodes } from "./constants.js";
|
|
3
|
-
export { AuthMfaErrorCodes as AuthMfaErrors } from "./constants.js";
|
|
2
|
+
import { AuthMfaErrorCodes } from "./web/constants.js";
|
|
3
|
+
export { AuthMfaErrorCodes as AuthMfaErrors } from "./web/constants.js";
|
|
4
4
|
export function mfaAlreadyEnabled() {
|
|
5
5
|
return writeFailure(new UnprocessableError(AuthMfaErrorCodes.mfaAlreadyEnabled, {
|
|
6
6
|
i18nKey: "auth.mfa.errors.mfaAlreadyEnabled",
|
|
@@ -7,13 +7,13 @@ import * as z from "zod";
|
|
|
7
7
|
import { burnToken, sessionLocaleField, sessionTimezoneField } from "../../shared/index.js";
|
|
8
8
|
import { USER_STATUS, UserQueries } from "../../user/index.js";
|
|
9
9
|
import { base32Decode } from "../base32.js";
|
|
10
|
-
import { MFA_VERIFY_LOCKOUT_MINUTES, MFA_VERIFY_MAX_ATTEMPTS } from "../constants.js";
|
|
11
10
|
import { findUserMfaRow } from "../db/queries.js";
|
|
12
11
|
import { invalidSetupToken, invalidTotpCode, mfaAlreadyEnabled, tooManyAttempts, } from "../errors.js";
|
|
13
12
|
import { verifyMfaSetupToken } from "../mfa-setup-token.js";
|
|
14
13
|
import { clearMfaVerifyAttempts, getMfaVerifyLockoutState, recordFailedMfaVerifyAttempt, } from "../mfa-verify-attempts.js";
|
|
15
14
|
import { encodeRecoveryCodes, userMfaEntity, userMfaTable } from "../schema/user-mfa.js";
|
|
16
15
|
import { verifyTotp } from "../totp.js";
|
|
16
|
+
import { MFA_VERIFY_LOCKOUT_MINUTES, MFA_VERIFY_MAX_ATTEMPTS } from "../web/constants.js";
|
|
17
17
|
const executor = createEventStoreExecutor(userMfaTable, userMfaEntity, {
|
|
18
18
|
entityName: "user-mfa",
|
|
19
19
|
});
|
|
@@ -2,7 +2,6 @@ import { createTenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
|
2
2
|
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { base32Encode } from "../base32.js";
|
|
5
|
-
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../constants.js";
|
|
6
5
|
import { findUserMfaRow } from "../db/queries.js";
|
|
7
6
|
import { invalidChallengeToken, mfaAlreadyEnabled } from "../errors.js";
|
|
8
7
|
import { verifyMfaPreauthSetupToken } from "../mfa-preauth-setup-token.js";
|
|
@@ -10,6 +9,7 @@ import { signMfaSetupToken } from "../mfa-setup-token.js";
|
|
|
10
9
|
import { buildOtpauthUri } from "../otpauth-uri.js";
|
|
11
10
|
import { generateRecoveryCodes, hashRecoveryCodes } from "../recovery-codes.js";
|
|
12
11
|
import { generateTotpSecret } from "../totp.js";
|
|
12
|
+
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../web/constants.js";
|
|
13
13
|
const ENABLE_START_PREAUTH_TENANT_REASON = "reads the MFA enrollment of the tenant named in the signed login/setup token, not the guest dispatch tenant";
|
|
14
14
|
// Pre-auth twin of enable-start.write.ts: identity comes from a verified
|
|
15
15
|
// preauthSetupToken (minted by login.write.ts when enforcement policy
|
|
@@ -2,13 +2,13 @@ import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { UserQueries } from "../../user/index.js";
|
|
4
4
|
import { base32Encode } from "../base32.js";
|
|
5
|
-
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../constants.js";
|
|
6
5
|
import { findUserMfaRow } from "../db/queries.js";
|
|
7
6
|
import { mfaAlreadyEnabled } from "../errors.js";
|
|
8
7
|
import { signMfaSetupToken } from "../mfa-setup-token.js";
|
|
9
8
|
import { buildOtpauthUri } from "../otpauth-uri.js";
|
|
10
9
|
import { generateRecoveryCodes, hashRecoveryCodes } from "../recovery-codes.js";
|
|
11
10
|
import { generateTotpSecret } from "../totp.js";
|
|
11
|
+
import { MFA_SETUP_TOKEN_TTL_MINUTES } from "../web/constants.js";
|
|
12
12
|
const FALLBACK_ACCOUNT_LABEL = "account";
|
|
13
13
|
// The authenticator app shows this label, so an internal user id must never leak into it.
|
|
14
14
|
function readableAccountLabel(me) {
|