@cosmicdrift/kumiko-samples 0.369.0 → 0.371.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 +14 -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 +19 -4
- 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 +14 -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 +17 -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 +88 -22
- 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 +5 -4
- 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 +6 -0
- package/packages/bundled-features/src/channel-email/email-channel.ts +4 -4
- package/packages/bundled-features/src/channel-email/env.ts +28 -0
- package/packages/bundled-features/src/channel-email/feature.ts +8 -4
- package/packages/bundled-features/src/channel-email/index.ts +6 -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/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 +13 -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 +15 -13
- 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 +20 -20
- 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 +204 -108
- 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 +28 -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 +73 -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 +1 -4
- 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 +0 -3
- package/packages/bundled-features/src/mail-transport-inmemory/index.ts +1 -2
- package/packages/bundled-features/src/mail-transport-smtp/changes.json +8 -0
- package/packages/bundled-features/src/mail-transport-smtp/feature.ts +2 -5
- 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 +12 -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 +17 -13
- package/packages/bundled-features/src/secrets/handlers/delete.write.ts +5 -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 +5 -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 -1
- 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 +6 -6
- 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/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 +31 -31
- 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 +7 -7
- 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 +44 -3
- 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,9 +17,10 @@ import type {
|
|
|
17
17
|
} from "@cosmicdrift/kumiko-framework/api";
|
|
18
18
|
import type { TenantId, WriteResult } from "@cosmicdrift/kumiko-framework/engine";
|
|
19
19
|
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
20
|
-
import { subscriptionAggregateId } from "./aggregate-id.
|
|
21
|
-
import { SubscriptionFoundationQueries, SubscriptionStatuses } from "./constants.
|
|
22
|
-
import {
|
|
20
|
+
import { subscriptionAggregateId } from "./aggregate-id.ts";
|
|
21
|
+
import { SubscriptionFoundationQueries, SubscriptionStatuses } from "./constants.ts";
|
|
22
|
+
import type { PaymentEvent, SubscriptionEvent } from "./types.ts";
|
|
23
|
+
import { createSubscriptionWebhookRoute } from "./webhook-handler.ts";
|
|
23
24
|
|
|
24
25
|
// Outside /api — signature routes carry their own auth (verify()) and are
|
|
25
26
|
// not JWT-guarded, so provider dashboards (Stripe, PayPal, ...) point here.
|
|
@@ -38,8 +39,30 @@ export type SubscriptionTierSyncDeps<TTier extends string> = {
|
|
|
38
39
|
// idempotent caller (e.g. Stripe, whose retry re-runs the already-committed
|
|
39
40
|
// primary write as a no-op) gets a second attempt at the sync step itself.
|
|
40
41
|
readonly onSyncError?: "log" | "fail-webhook";
|
|
42
|
+
/** Runs after every webhook whose sync succeeded, also when the tier stayed the same
|
|
43
|
+
* (`changed: false`). Not called when the tenant has no subscription yet, when a
|
|
44
|
+
* manual grant was kept, or when the sync failed. A throw counts as a sync failure
|
|
45
|
+
* and follows `onSyncError`. */
|
|
46
|
+
readonly afterSync?: (result: TierSyncResult<TTier>) => Promise<void>;
|
|
41
47
|
};
|
|
42
48
|
|
|
49
|
+
export type TierSyncResult<TTier extends string> = {
|
|
50
|
+
readonly tenantId: TenantId;
|
|
51
|
+
/** The tier the subscription yields. */
|
|
52
|
+
readonly tier: TTier;
|
|
53
|
+
/** True when this sync created or updated the tenant's tier assignment. */
|
|
54
|
+
readonly changed: boolean;
|
|
55
|
+
readonly event: SubscriptionEvent | PaymentEvent;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
type SyncError = { code: string; message: string };
|
|
59
|
+
type SyncOutcome<TTier extends string> =
|
|
60
|
+
| { readonly error: SyncError }
|
|
61
|
+
| {
|
|
62
|
+
readonly error: null;
|
|
63
|
+
readonly applied?: { readonly tier: TTier; readonly changed: boolean };
|
|
64
|
+
};
|
|
65
|
+
|
|
43
66
|
// A manual grant that differs from what billing would assign is reported with this
|
|
44
67
|
// code but never fails the webhook: a provider retry cannot resolve it.
|
|
45
68
|
export const TIER_SYNC_MANUAL_GRANT_SKIPPED = "tier_sync_manual_grant_skipped";
|
|
@@ -92,10 +115,10 @@ function findTierAssignment(
|
|
|
92
115
|
export function createSubscriptionTierSync<TTier extends string>(
|
|
93
116
|
deps: SubscriptionTierSyncDeps<TTier>,
|
|
94
117
|
) {
|
|
95
|
-
async function
|
|
118
|
+
async function runTierSync(
|
|
96
119
|
tenantId: TenantId,
|
|
97
120
|
routeDeps: Pick<SignatureExtraRouteDeps, "dispatchSystemQuery" | "dispatchSystemWrite">,
|
|
98
|
-
): Promise<
|
|
121
|
+
): Promise<SyncOutcome<TTier>> {
|
|
99
122
|
try {
|
|
100
123
|
const subscriptionId = subscriptionAggregateId(tenantId);
|
|
101
124
|
const subscriptionRows = asRows(
|
|
@@ -106,7 +129,7 @@ export function createSubscriptionTierSync<TTier extends string>(
|
|
|
106
129
|
}),
|
|
107
130
|
);
|
|
108
131
|
const sub = subscriptionRows.find((row) => row["id"] === subscriptionId);
|
|
109
|
-
if (!sub) return null;
|
|
132
|
+
if (!sub) return { error: null };
|
|
110
133
|
|
|
111
134
|
const effective = effectiveTierFromSubscription(
|
|
112
135
|
typeof sub["status"] === "string" ? sub["status"] : undefined,
|
|
@@ -135,17 +158,23 @@ export function createSubscriptionTierSync<TTier extends string>(
|
|
|
135
158
|
});
|
|
136
159
|
if (!created.isSuccess) {
|
|
137
160
|
return {
|
|
138
|
-
|
|
139
|
-
|
|
161
|
+
error: {
|
|
162
|
+
code: "tier_sync_failed",
|
|
163
|
+
message: `tier-engine create with "${effective}" failed: ${created.error?.code ?? "unknown"}`,
|
|
164
|
+
},
|
|
140
165
|
};
|
|
141
166
|
}
|
|
142
|
-
return null;
|
|
167
|
+
return { error: null, applied: { tier: effective, changed: true } };
|
|
168
|
+
}
|
|
169
|
+
if (assignment.tier === effective) {
|
|
170
|
+
return { error: null, applied: { tier: effective, changed: false } };
|
|
143
171
|
}
|
|
144
|
-
if (assignment.tier === effective) return null;
|
|
145
172
|
if (assignment.source === TierAssignmentSources.manual) {
|
|
146
173
|
return {
|
|
147
|
-
|
|
148
|
-
|
|
174
|
+
error: {
|
|
175
|
+
code: TIER_SYNC_MANUAL_GRANT_SKIPPED,
|
|
176
|
+
message: `manual tier grant "${String(assignment.tier)}" kept although the subscription yields "${effective}"`,
|
|
177
|
+
},
|
|
149
178
|
};
|
|
150
179
|
}
|
|
151
180
|
|
|
@@ -160,11 +189,13 @@ export function createSubscriptionTierSync<TTier extends string>(
|
|
|
160
189
|
});
|
|
161
190
|
if (!result.isSuccess) {
|
|
162
191
|
return {
|
|
163
|
-
|
|
164
|
-
|
|
192
|
+
error: {
|
|
193
|
+
code: "tier_sync_failed",
|
|
194
|
+
message: `tier-engine update to "${effective}" failed: ${result.error?.code ?? "unknown"}`,
|
|
195
|
+
},
|
|
165
196
|
};
|
|
166
197
|
}
|
|
167
|
-
return null;
|
|
198
|
+
return { error: null, applied: { tier: effective, changed: true } };
|
|
168
199
|
} catch (error) {
|
|
169
200
|
// dispatchSystemQuery throws (AccessDenied/NotFound/Validation) rather
|
|
170
201
|
// than returning an error envelope — e.g. a consumer that mounts
|
|
@@ -172,17 +203,52 @@ export function createSubscriptionTierSync<TTier extends string>(
|
|
|
172
203
|
// a failed dispatchSystemWrite instead of letting it bubble into the
|
|
173
204
|
// webhook response as an unhandled 500.
|
|
174
205
|
return {
|
|
175
|
-
|
|
176
|
-
|
|
206
|
+
error: {
|
|
207
|
+
code: "tier_sync_failed",
|
|
208
|
+
message: error instanceof Error ? error.message : "tier sync threw a non-Error value",
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async function syncTierFromSubscription(
|
|
215
|
+
tenantId: TenantId,
|
|
216
|
+
routeDeps: Pick<SignatureExtraRouteDeps, "dispatchSystemQuery" | "dispatchSystemWrite">,
|
|
217
|
+
): Promise<SyncError | null> {
|
|
218
|
+
return (await runTierSync(tenantId, routeDeps)).error;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
async function syncAndNotify(
|
|
222
|
+
tenantId: TenantId,
|
|
223
|
+
event: SubscriptionEvent | PaymentEvent,
|
|
224
|
+
routeDeps: Pick<SignatureExtraRouteDeps, "dispatchSystemQuery" | "dispatchSystemWrite">,
|
|
225
|
+
): Promise<SyncError | null> {
|
|
226
|
+
const outcome = await runTierSync(tenantId, routeDeps);
|
|
227
|
+
if (outcome.error !== null || outcome.applied === undefined || !deps.afterSync) {
|
|
228
|
+
return outcome.error;
|
|
229
|
+
}
|
|
230
|
+
try {
|
|
231
|
+
await deps.afterSync({ tenantId, event, ...outcome.applied });
|
|
232
|
+
return null;
|
|
233
|
+
} catch (error) {
|
|
234
|
+
return {
|
|
235
|
+
code: "tier_sync_after_hook_failed",
|
|
236
|
+
message: error instanceof Error ? error.message : "afterSync threw a non-Error value",
|
|
177
237
|
};
|
|
178
238
|
}
|
|
179
239
|
}
|
|
180
240
|
|
|
181
|
-
|
|
241
|
+
// `path` must keep the `:providerName` param the webhook route resolves the provider from.
|
|
242
|
+
function createWebhookRoute(options: { readonly path?: string } = {}): ExtraRouteDefinition {
|
|
182
243
|
return createSubscriptionWebhookRoute({
|
|
183
|
-
path: SUBSCRIPTION_WEBHOOK_PATH,
|
|
184
|
-
afterDispatch: async (
|
|
185
|
-
|
|
244
|
+
path: options.path ?? SUBSCRIPTION_WEBHOOK_PATH,
|
|
245
|
+
afterDispatch: async (
|
|
246
|
+
dispatched: WriteResult,
|
|
247
|
+
tenantId,
|
|
248
|
+
routeDeps,
|
|
249
|
+
event,
|
|
250
|
+
): Promise<WriteResult> => {
|
|
251
|
+
const syncError = await syncAndNotify(tenantId, event, routeDeps);
|
|
186
252
|
if (syncError) {
|
|
187
253
|
// biome-ignore lint/suspicious/noConsole: operator visibility for a post-commit sync failure
|
|
188
254
|
console.warn(
|
|
@@ -208,5 +274,5 @@ export function createSubscriptionTierSync<TTier extends string>(
|
|
|
208
274
|
});
|
|
209
275
|
}
|
|
210
276
|
|
|
211
|
-
return { createWebhookRoute, syncTierFromSubscription };
|
|
277
|
+
return { createWebhookRoute, syncTierFromSubscription, syncAndNotify };
|
|
212
278
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { EntityTableMeta } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { declareEscapeHatch, type TenantDataHookCtx } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import { archiveStream } from "@cosmicdrift/kumiko-framework/event-store";
|
|
4
|
-
import { resolveProfileForTenant } from "../compliance-profiles/index.
|
|
5
|
-
import { paymentAggregateId, subscriptionAggregateId } from "./aggregate-id.
|
|
6
|
-
import { PAYMENT_AGGREGATE_TYPE, SUBSCRIPTION_AGGREGATE_TYPE } from "./events.
|
|
7
|
-
import { paymentsProjectionTable, subscriptionsProjectionTable } from "./projection.
|
|
4
|
+
import { resolveProfileForTenant } from "../compliance-profiles/index.ts";
|
|
5
|
+
import { paymentAggregateId, subscriptionAggregateId } from "./aggregate-id.ts";
|
|
6
|
+
import { PAYMENT_AGGREGATE_TYPE, SUBSCRIPTION_AGGREGATE_TYPE } from "./events.ts";
|
|
7
|
+
import { paymentsProjectionTable, subscriptionsProjectionTable } from "./projection.ts";
|
|
8
8
|
|
|
9
9
|
// providerCustomerId/providerSubscriptionId are `personal: "tenant"` on the
|
|
10
10
|
// entity (envelope-encrypted with the tenant subject key, see entities.ts) —
|
|
@@ -36,9 +36,9 @@ import {
|
|
|
36
36
|
type SubscriptionEventType,
|
|
37
37
|
type SubscriptionStatus,
|
|
38
38
|
type TerminationScope,
|
|
39
|
-
} from "./constants.
|
|
40
|
-
import type { OrderItem } from "./consumer-protection/consent-gate.
|
|
41
|
-
import type { ConsentLocale } from "./consumer-protection/consent-locale.
|
|
39
|
+
} from "./constants.ts";
|
|
40
|
+
import type { OrderItem } from "./consumer-protection/consent-gate.ts";
|
|
41
|
+
import type { ConsentLocale } from "./consumer-protection/consent-locale.ts";
|
|
42
42
|
|
|
43
43
|
// =============================================================================
|
|
44
44
|
// Normalisierter Webhook-Event
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
// re-exported from index.ts.
|
|
5
5
|
|
|
6
6
|
import * as z from "zod";
|
|
7
|
-
import { isTerminationScope, TERMINATION_SCOPES } from "./constants.
|
|
8
|
-
import { CONSENT_LOCALES, type ConsentLocale } from "./consumer-protection/consent-locale.
|
|
7
|
+
import { isTerminationScope, TERMINATION_SCOPES } from "./constants.ts";
|
|
8
|
+
import { CONSENT_LOCALES, type ConsentLocale } from "./consumer-protection/consent-locale.ts";
|
|
9
9
|
import {
|
|
10
10
|
type BillingFoundationOptions,
|
|
11
11
|
type ConsumerProtectionOptions,
|
|
12
12
|
isLegalLinkSet,
|
|
13
13
|
type LegalLinkSet,
|
|
14
|
-
} from "./types.
|
|
14
|
+
} from "./types.ts";
|
|
15
15
|
|
|
16
16
|
function isRootRelativePath(path: string): boolean {
|
|
17
17
|
return path.startsWith("/") && !path.startsWith("//");
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
SubscriptionFoundationHandlers,
|
|
22
22
|
SubscriptionFoundationQueries,
|
|
23
23
|
SubscriptionStatuses,
|
|
24
|
-
} from "../constants.
|
|
25
|
-
import type { BillingPlansResult, BillingPlanView } from "../types.
|
|
26
|
-
import { CancelContractDialog } from "./cancel-contract-dialog.
|
|
27
|
-
import { CheckoutConsentDialog, type CheckoutConsentPayload } from "./checkout-consent-dialog.
|
|
24
|
+
} from "../constants.ts";
|
|
25
|
+
import type { BillingPlansResult, BillingPlanView } from "../types.ts";
|
|
26
|
+
import { CancelContractDialog } from "./cancel-contract-dialog.tsx";
|
|
27
|
+
import { CheckoutConsentDialog, type CheckoutConsentPayload } from "./checkout-consent-dialog.tsx";
|
|
28
28
|
|
|
29
29
|
type UseTranslation = ReturnType<typeof useTranslation>;
|
|
30
30
|
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from "@cosmicdrift/kumiko-renderer";
|
|
10
10
|
import { ModeSwitch } from "@cosmicdrift/kumiko-renderer-web";
|
|
11
11
|
import { type ReactNode, useState } from "react";
|
|
12
|
-
import { SubscriptionFoundationHandlers } from "../constants.
|
|
13
|
-
import type { ContractTerminationDeclarationType, ContractTerminationKind } from "../events.
|
|
12
|
+
import { SubscriptionFoundationHandlers } from "../constants.ts";
|
|
13
|
+
import type { ContractTerminationDeclarationType, ContractTerminationKind } from "../events.ts";
|
|
14
14
|
|
|
15
15
|
type TerminateContractReceipt = {
|
|
16
16
|
readonly requestId: string;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import type { WriteResult } from "@cosmicdrift/kumiko-headless";
|
|
4
4
|
import { useLocale, usePrimitives, useTranslation } from "@cosmicdrift/kumiko-renderer";
|
|
5
5
|
import { type ReactNode, useState } from "react";
|
|
6
|
-
import { resolveConsentLocale } from "../consumer-protection/consent-locale.
|
|
7
|
-
import type { BillingPlansResult } from "../types.
|
|
6
|
+
import { resolveConsentLocale } from "../consumer-protection/consent-locale.ts";
|
|
7
|
+
import type { BillingPlansResult } from "../types.ts";
|
|
8
8
|
|
|
9
9
|
export const CONSENT_TEXT_OUTDATED_CODE = "consent_text_outdated";
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @runtime client
|
|
2
2
|
import type { TranslationsByLocale } from "@cosmicdrift/kumiko-renderer";
|
|
3
3
|
import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer-web";
|
|
4
|
-
import { BILLING_FOUNDATION_FEATURE, BILLING_PLANS_PANEL_COMPONENT } from "../constants.
|
|
5
|
-
import { BillingPlansPanel } from "./billing-plans-panel.
|
|
4
|
+
import { BILLING_FOUNDATION_FEATURE, BILLING_PLANS_PANEL_COMPONENT } from "../constants.ts";
|
|
5
|
+
import { BillingPlansPanel } from "./billing-plans-panel.tsx";
|
|
6
6
|
|
|
7
7
|
export type BillingFoundationClientOptions = {
|
|
8
8
|
readonly translations?: TranslationsByLocale;
|
|
@@ -12,24 +12,24 @@ export {
|
|
|
12
12
|
SubscriptionFoundationQueries,
|
|
13
13
|
type SubscriptionStatus,
|
|
14
14
|
SubscriptionStatuses,
|
|
15
|
-
} from "../constants.
|
|
15
|
+
} from "../constants.ts";
|
|
16
16
|
export {
|
|
17
17
|
CONSENT_LOCALES,
|
|
18
18
|
type ConsentLocale,
|
|
19
19
|
resolveConsentLocale,
|
|
20
|
-
} from "../consumer-protection/consent-locale.
|
|
20
|
+
} from "../consumer-protection/consent-locale.ts";
|
|
21
21
|
export type {
|
|
22
22
|
BillingPlanBenefit,
|
|
23
23
|
BillingPlanCatalog,
|
|
24
24
|
BillingPlansResult,
|
|
25
25
|
BillingPlanView,
|
|
26
26
|
LegalLinkSet,
|
|
27
|
-
} from "../types.
|
|
28
|
-
export { BillingPlansPanel } from "./billing-plans-panel.
|
|
27
|
+
} from "../types.ts";
|
|
28
|
+
export { BillingPlansPanel } from "./billing-plans-panel.tsx";
|
|
29
29
|
export {
|
|
30
30
|
CheckoutConsentDialog,
|
|
31
31
|
type CheckoutConsentDialogProps,
|
|
32
32
|
type CheckoutConsentPayload,
|
|
33
33
|
CONSENT_TEXT_OUTDATED_CODE,
|
|
34
|
-
} from "./checkout-consent-dialog.
|
|
35
|
-
export { type BillingFoundationClientOptions, billingFoundationClient } from "./client-plugin.
|
|
34
|
+
} from "./checkout-consent-dialog.tsx";
|
|
35
|
+
export { type BillingFoundationClientOptions, billingFoundationClient } from "./client-plugin.tsx";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
BillingEventKinds,
|
|
12
12
|
SUBSCRIPTION_PROVIDER_EXTENSION,
|
|
13
13
|
SubscriptionFoundationHandlers,
|
|
14
|
-
} from "./constants.
|
|
15
|
-
import type { PaymentEvent, SubscriptionEvent, SubscriptionProviderPlugin } from "./types.
|
|
14
|
+
} from "./constants.ts";
|
|
15
|
+
import type { PaymentEvent, SubscriptionEvent, SubscriptionProviderPlugin } from "./types.ts";
|
|
16
16
|
|
|
17
17
|
export type SubscriptionWebhookRouteOptions = {
|
|
18
18
|
/** Route path — MUST carry the `:providerName` path-param. Default
|
|
@@ -27,6 +27,7 @@ export type SubscriptionWebhookRouteOptions = {
|
|
|
27
27
|
dispatched: import("@cosmicdrift/kumiko-framework/engine").WriteResult,
|
|
28
28
|
tenantId: import("@cosmicdrift/kumiko-framework/engine").TenantId,
|
|
29
29
|
deps: import("@cosmicdrift/kumiko-framework/api").SignatureExtraRouteDeps,
|
|
30
|
+
event: SubscriptionEvent | PaymentEvent,
|
|
30
31
|
) => Promise<import("@cosmicdrift/kumiko-framework/engine").WriteResult>;
|
|
31
32
|
};
|
|
32
33
|
|
|
@@ -113,7 +114,7 @@ export function createSubscriptionWebhookRoute(options: SubscriptionWebhookRoute
|
|
|
113
114
|
return respondFromDispatch(
|
|
114
115
|
c,
|
|
115
116
|
dispatched.isSuccess && options.afterDispatch
|
|
116
|
-
? await options.afterDispatch(dispatched, tenantId, deps)
|
|
117
|
+
? await options.afterDispatch(dispatched, tenantId, deps, parsed)
|
|
117
118
|
: dispatched,
|
|
118
119
|
"subscription_payment_webhook_processing_failed",
|
|
119
120
|
"Internal error processing payment event",
|
|
@@ -138,7 +139,7 @@ export function createSubscriptionWebhookRoute(options: SubscriptionWebhookRoute
|
|
|
138
139
|
return respondFromDispatch(
|
|
139
140
|
c,
|
|
140
141
|
dispatched.isSuccess && options.afterDispatch
|
|
141
|
-
? await options.afterDispatch(dispatched, tenantId, deps)
|
|
142
|
+
? await options.afterDispatch(dispatched, tenantId, deps, parsed)
|
|
142
143
|
: dispatched,
|
|
143
144
|
"subscription_webhook_processing_failed",
|
|
144
145
|
"Internal error processing subscription event",
|
|
@@ -13,13 +13,13 @@ import { AccessDeniedError } from "@cosmicdrift/kumiko-framework/errors";
|
|
|
13
13
|
import { eventsTable, VersionConflictError } from "@cosmicdrift/kumiko-framework/event-store";
|
|
14
14
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
15
15
|
import * as z from "zod";
|
|
16
|
-
import { capCounterAggregateId, rollingCapAggregateId } from "./aggregate-id.
|
|
16
|
+
import { capCounterAggregateId, rollingCapAggregateId } from "./aggregate-id.ts";
|
|
17
17
|
import {
|
|
18
18
|
CAP_COUNTER_ROLLING_AGGREGATE_TYPE,
|
|
19
19
|
ROLLING_INCREMENTED_EVENT_QN,
|
|
20
20
|
ROLLING_RELEASED_EVENT_QN,
|
|
21
|
-
} from "./constants.
|
|
22
|
-
import { capCounterEntity } from "./entity.
|
|
21
|
+
} from "./constants.ts";
|
|
22
|
+
import { capCounterEntity } from "./entity.ts";
|
|
23
23
|
|
|
24
24
|
const { table, executor } = createEntityExecutor("cap-counter", capCounterEntity);
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CapCounterContext } from "./book-cap-usage.
|
|
1
|
+
import type { CapCounterContext } from "./book-cap-usage.ts";
|
|
2
2
|
import {
|
|
3
3
|
type CalendarCapReservation,
|
|
4
4
|
consumeCalendarCapReservation,
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
releaseExpiredCapReservations,
|
|
7
7
|
reserveCalendarCap,
|
|
8
8
|
settleCalendarCapReservation,
|
|
9
|
-
} from "./cap-reservation.
|
|
9
|
+
} from "./cap-reservation.ts";
|
|
10
10
|
import {
|
|
11
11
|
assertBelowHardCap,
|
|
12
12
|
enforceCapAndMaybeNotify,
|
|
13
13
|
type SoftHitNotifier,
|
|
14
|
-
} from "./enforce-cap.
|
|
15
|
-
import type { CalendarCapDef } from "./with-cap-enforcement.
|
|
14
|
+
} from "./enforce-cap.ts";
|
|
15
|
+
import type { CalendarCapDef } from "./with-cap-enforcement.ts";
|
|
16
16
|
|
|
17
17
|
export type CalendarCapUsageReservationSpec = Omit<CalendarCapDef, "amount" | "notify"> & {
|
|
18
18
|
readonly amount: number;
|
|
@@ -16,7 +16,7 @@ import type {
|
|
|
16
16
|
ReservationHandle,
|
|
17
17
|
} from "@cosmicdrift/kumiko-types/handlers";
|
|
18
18
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
19
|
-
import { rollingCapAggregateId } from "./aggregate-id.
|
|
19
|
+
import { rollingCapAggregateId } from "./aggregate-id.ts";
|
|
20
20
|
import {
|
|
21
21
|
applyCapDeltaOn,
|
|
22
22
|
type BookCapUsageOptions,
|
|
@@ -26,15 +26,15 @@ import {
|
|
|
26
26
|
resolveCapCounterScope,
|
|
27
27
|
retryCounterWriteOnVersionConflict,
|
|
28
28
|
retryOnStreamVersionConflict,
|
|
29
|
-
} from "./book-cap-usage.
|
|
29
|
+
} from "./book-cap-usage.ts";
|
|
30
30
|
import {
|
|
31
31
|
CAP_COUNTER_ROLLING_AGGREGATE_TYPE,
|
|
32
32
|
CAP_RESERVATION_TTL_MINUTES,
|
|
33
33
|
CAP_SETTLED_TOMBSTONE_TTL_MINUTES,
|
|
34
34
|
ROLLING_INCREMENTED_EVENT_QN,
|
|
35
35
|
ROLLING_RELEASED_EVENT_QN,
|
|
36
|
-
} from "./constants.
|
|
37
|
-
import { capReservationsTable } from "./tables.
|
|
36
|
+
} from "./constants.ts";
|
|
37
|
+
import { capReservationsTable } from "./tables.ts";
|
|
38
38
|
|
|
39
39
|
type CapReservationRow = {
|
|
40
40
|
readonly id: string;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.370.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "The deprecated capCounterFeature constant is removed",
|
|
6
|
+
"detail": "capCounterFeature was kept next to createCapCounterFeature() for one release. Mount the feature by calling createCapCounterFeature().",
|
|
7
|
+
"migration": "Run bun kumiko-upgrade --apply. It replaces capCounterFeature with createCapCounterFeature().",
|
|
8
|
+
"codemod": "scripts/codemod/feature-factory.ts"
|
|
9
|
+
},
|
|
2
10
|
{
|
|
3
11
|
"version": "0.368.0",
|
|
4
12
|
"type": "improvement",
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
markCapSoftWarned,
|
|
7
7
|
readRollingCapUsage,
|
|
8
8
|
resolveCapCounterScope,
|
|
9
|
-
} from "./book-cap-usage.
|
|
10
|
-
import { capCounterEntity } from "./entity.
|
|
9
|
+
} from "./book-cap-usage.ts";
|
|
10
|
+
import { capCounterEntity } from "./entity.ts";
|
|
11
11
|
|
|
12
12
|
const { table } = createEntityExecutor("cap-counter", capCounterEntity);
|
|
13
13
|
|
|
@@ -55,18 +55,18 @@ import {
|
|
|
55
55
|
CAP_COUNTER_LIST_SCREEN_ID,
|
|
56
56
|
ROLLING_INCREMENTED_EVENT_SHORT,
|
|
57
57
|
ROLLING_RELEASED_EVENT_SHORT,
|
|
58
|
-
} from "./constants.
|
|
59
|
-
import { capCounterEntity } from "./entity.
|
|
60
|
-
import { getCounterQuery } from "./handlers/get-counter.query.
|
|
61
|
-
import { incrementCapHandler } from "./handlers/increment.write.
|
|
58
|
+
} from "./constants.ts";
|
|
59
|
+
import { capCounterEntity } from "./entity.ts";
|
|
60
|
+
import { getCounterQuery } from "./handlers/get-counter.query.ts";
|
|
61
|
+
import { incrementCapHandler } from "./handlers/increment.write.ts";
|
|
62
62
|
import {
|
|
63
63
|
incrementRollingCapHandler,
|
|
64
64
|
rollingIncrementedSchema,
|
|
65
65
|
rollingReleasedSchema,
|
|
66
|
-
} from "./handlers/increment-rolling.write.
|
|
67
|
-
import { markSoftWarnedHandler } from "./handlers/mark-soft-warned.write.
|
|
68
|
-
import { CAP_COUNTER_I18N } from "./i18n.
|
|
69
|
-
import { capReservationsTableMeta } from "./tables.
|
|
66
|
+
} from "./handlers/increment-rolling.write.ts";
|
|
67
|
+
import { markSoftWarnedHandler } from "./handlers/mark-soft-warned.write.ts";
|
|
68
|
+
import { CAP_COUNTER_I18N } from "./i18n.ts";
|
|
69
|
+
import { capReservationsTableMeta } from "./tables.ts";
|
|
70
70
|
|
|
71
71
|
export function createCapCounterFeature() {
|
|
72
72
|
return defineFeature(
|
|
@@ -154,6 +154,3 @@ export function createCapCounterFeature() {
|
|
|
154
154
|
{ dedupeOptions: {} },
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
|
-
|
|
158
|
-
/** @deprecated Use createCapCounterFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
159
|
-
export const capCounterFeature = createCapCounterFeature();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createEntityExecutor, type QueryHandlerDef } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { capCounterEntity } from "../entity.
|
|
3
|
+
import { capCounterEntity } from "../entity.ts";
|
|
4
4
|
|
|
5
5
|
const { table } = createEntityExecutor("cap-counter", capCounterEntity);
|
|
6
6
|
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
import type { WriteHandlerDef } from "@cosmicdrift/kumiko-framework/engine";
|
|
22
22
|
import * as z from "zod";
|
|
23
|
-
import { rollingCapAggregateId } from "../aggregate-id.
|
|
24
|
-
import { CAP_COUNTER_ROLLING_AGGREGATE_TYPE, ROLLING_INCREMENTED_EVENT_QN } from "../constants.
|
|
23
|
+
import { rollingCapAggregateId } from "../aggregate-id.ts";
|
|
24
|
+
import { CAP_COUNTER_ROLLING_AGGREGATE_TYPE, ROLLING_INCREMENTED_EVENT_QN } from "../constants.ts";
|
|
25
25
|
|
|
26
26
|
const incrementRollingSchema = z.object({
|
|
27
27
|
/** App-defined cap-name. e.g. "ai-tokens-7day", "egress-bytes-24h". */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WriteHandlerDef } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { bookCapUsage } from "../book-cap-usage.
|
|
3
|
+
import { bookCapUsage } from "../book-cap-usage.ts";
|
|
4
4
|
|
|
5
5
|
const incrementSchema = z.object({
|
|
6
6
|
/** App-defined cap-name. e.g. "platform-mails", "ai-tokens-7day". */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WriteHandlerDef } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { markCapSoftWarned } from "../book-cap-usage.
|
|
3
|
+
import { markCapSoftWarned } from "../book-cap-usage.ts";
|
|
4
4
|
|
|
5
5
|
// mark-soft-warned — sets lastSoftWarnedAt on the counter so subsequent
|
|
6
6
|
// soft-cap-hits in the same period don't re-trigger notifications.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Public API of the cap-counter bundled-feature.
|
|
2
2
|
|
|
3
|
-
export { capCounterAggregateId, rollingCapAggregateId } from "./aggregate-id.
|
|
3
|
+
export { capCounterAggregateId, rollingCapAggregateId } from "./aggregate-id.ts";
|
|
4
4
|
export {
|
|
5
5
|
type BookCapUsageOptions,
|
|
6
6
|
bookCapUsage,
|
|
@@ -8,7 +8,7 @@ export {
|
|
|
8
8
|
markCapSoftWarned,
|
|
9
9
|
type ReadRollingCapUsageOptions,
|
|
10
10
|
readRollingCapUsage,
|
|
11
|
-
} from "./book-cap-usage.
|
|
11
|
+
} from "./book-cap-usage.ts";
|
|
12
12
|
export {
|
|
13
13
|
type CalendarCapReservationHandle,
|
|
14
14
|
type CalendarCapReservationHandleSpec,
|
|
@@ -16,12 +16,12 @@ export {
|
|
|
16
16
|
type CalendarCapUsageReservationSpec,
|
|
17
17
|
calendarCapReservationHandle,
|
|
18
18
|
reserveCalendarCapUsage,
|
|
19
|
-
} from "./calendar-cap-usage-reservation.
|
|
19
|
+
} from "./calendar-cap-usage-reservation.ts";
|
|
20
20
|
export {
|
|
21
21
|
CapReservationOverConsumedError,
|
|
22
22
|
CapReservationSettledError,
|
|
23
23
|
CapSettleBelowConsumedError,
|
|
24
|
-
} from "./cap-reservation.
|
|
24
|
+
} from "./cap-reservation.ts";
|
|
25
25
|
export {
|
|
26
26
|
CAP_COUNTER_FEATURE,
|
|
27
27
|
CAP_COUNTER_ROLLING_AGGREGATE_TYPE,
|
|
@@ -31,7 +31,7 @@ export {
|
|
|
31
31
|
ROLLING_INCREMENTED_EVENT_SHORT,
|
|
32
32
|
ROLLING_RELEASED_EVENT_QN,
|
|
33
33
|
ROLLING_RELEASED_EVENT_SHORT,
|
|
34
|
-
} from "./constants.
|
|
34
|
+
} from "./constants.ts";
|
|
35
35
|
export {
|
|
36
36
|
CAP_TOLERANCES,
|
|
37
37
|
CapExceededError,
|
|
@@ -47,23 +47,23 @@ export {
|
|
|
47
47
|
enforceStockCap,
|
|
48
48
|
type SoftHitNotifier,
|
|
49
49
|
type StockCapResult,
|
|
50
|
-
} from "./enforce-cap.
|
|
51
|
-
export { capCounterEntity } from "./entity.
|
|
52
|
-
export {
|
|
53
|
-
export { readPayloadField } from "./payload-field.
|
|
50
|
+
} from "./enforce-cap.ts";
|
|
51
|
+
export { capCounterEntity } from "./entity.ts";
|
|
52
|
+
export { createCapCounterFeature } from "./feature.ts";
|
|
53
|
+
export { readPayloadField } from "./payload-field.ts";
|
|
54
54
|
export {
|
|
55
55
|
type CapGuardContext,
|
|
56
56
|
type CapLimitContext,
|
|
57
57
|
createStockCapGuard,
|
|
58
58
|
type StockCapGuard,
|
|
59
59
|
type StockCapSpec,
|
|
60
|
-
} from "./stock-cap-guard.
|
|
61
|
-
export { capReservationsTable, capReservationsTableMeta } from "./tables.
|
|
60
|
+
} from "./stock-cap-guard.ts";
|
|
61
|
+
export { capReservationsTable, capReservationsTableMeta } from "./tables.ts";
|
|
62
62
|
export {
|
|
63
63
|
createValueCapGuard,
|
|
64
64
|
type ValueCapGuard,
|
|
65
65
|
type ValueCapSpec,
|
|
66
|
-
} from "./value-cap-guard.
|
|
66
|
+
} from "./value-cap-guard.ts";
|
|
67
67
|
export {
|
|
68
68
|
type CalendarCapDef,
|
|
69
69
|
type CalendarCapResolver,
|
|
@@ -71,4 +71,4 @@ export {
|
|
|
71
71
|
type RollingCapResolver,
|
|
72
72
|
withCapEnforcement,
|
|
73
73
|
withRollingCapEnforcement,
|
|
74
|
-
} from "./with-cap-enforcement.
|
|
74
|
+
} from "./with-cap-enforcement.ts";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
type WriteFailure,
|
|
16
16
|
writeFailure,
|
|
17
17
|
} from "@cosmicdrift/kumiko-framework/errors";
|
|
18
|
-
import { enforceStockCap } from "./enforce-cap.
|
|
18
|
+
import { enforceStockCap } from "./enforce-cap.ts";
|
|
19
19
|
|
|
20
20
|
// Runtime inputs a tier's cap limit may depend on, e.g. a SystemAdmin-edited
|
|
21
21
|
// budget config key. `config` is the calling handler's accessor, so it is
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
type WriteFailure,
|
|
9
9
|
writeFailure,
|
|
10
10
|
} from "@cosmicdrift/kumiko-framework/errors";
|
|
11
|
-
import { readPayloadField } from "./payload-field.
|
|
12
|
-
import type { CapGuardContext, CapLimitContext } from "./stock-cap-guard.
|
|
11
|
+
import { readPayloadField } from "./payload-field.ts";
|
|
12
|
+
import type { CapGuardContext, CapLimitContext } from "./stock-cap-guard.ts";
|
|
13
13
|
|
|
14
14
|
export type ValueCapSpec<TCaps> = {
|
|
15
15
|
readonly field: string;
|
|
@@ -29,15 +29,15 @@ import type {
|
|
|
29
29
|
WriteEvent,
|
|
30
30
|
WriteHandlerDef,
|
|
31
31
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
32
|
-
import { reserveEnforcedCalendarCap } from "./calendar-cap-usage-reservation.
|
|
33
|
-
import { releaseExpiredCapReservations, reserveRollingCap } from "./cap-reservation.
|
|
32
|
+
import { reserveEnforcedCalendarCap } from "./calendar-cap-usage-reservation.ts";
|
|
33
|
+
import { releaseExpiredCapReservations, reserveRollingCap } from "./cap-reservation.ts";
|
|
34
34
|
import {
|
|
35
35
|
assertBelowHardCap,
|
|
36
36
|
type CapToleranceProfileName,
|
|
37
37
|
enforceRollingCapAndMaybeNotify,
|
|
38
38
|
type SoftHitNotifier,
|
|
39
|
-
} from "./enforce-cap.
|
|
40
|
-
import { chainReservations } from "./reservation-chain.
|
|
39
|
+
} from "./enforce-cap.ts";
|
|
40
|
+
import { chainReservations } from "./reservation-chain.ts";
|
|
41
41
|
|
|
42
42
|
// =============================================================================
|
|
43
43
|
// Calendar-Period-Wrapper
|