@cosmicdrift/kumiko-bundled-features 0.378.0 → 0.379.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-security/feature.js +2 -2
- package/dist/account-security/index.d.ts +2 -2
- package/dist/account-security/index.js +2 -2
- package/dist/account-security/{constants.js → web/constants.js} +0 -1
- package/dist/account-security/{i18n.js → web/i18n.js} +0 -1
- package/dist/admin-shell/feature.js +4 -3
- package/dist/admin-shell/index.d.ts +2 -2
- package/dist/admin-shell/index.js +2 -2
- package/dist/admin-shell/web/client-plugin.js +2 -3
- package/dist/admin-shell/{constants.js → web/constants.js} +0 -1
- package/dist/admin-shell/web/default-translations.d.ts +2 -0
- package/dist/admin-shell/web/default-translations.js +4 -0
- package/dist/admin-shell/web/i18n.d.ts +5 -2
- package/dist/admin-shell/web/i18n.js +50 -5
- package/dist/admin-shell/web/index.js +0 -1
- package/dist/audit/feature.js +58 -59
- package/dist/audit/handlers/audit-events.d.ts +102 -0
- package/dist/audit/handlers/audit-events.js +112 -0
- package/dist/audit/handlers/audit-system-db.d.ts +1 -0
- package/dist/audit/handlers/audit-system-db.js +9 -0
- package/dist/audit/handlers/details-all-tenants.query.d.ts +15 -0
- package/dist/audit/handlers/details-all-tenants.query.js +20 -0
- package/dist/audit/handlers/details.query.d.ts +2 -1
- package/dist/audit/handlers/details.query.js +8 -24
- package/dist/audit/handlers/list-all-tenants.query.d.ts +41 -0
- package/dist/audit/handlers/list-all-tenants.query.js +32 -0
- package/dist/audit/handlers/list.query.d.ts +2 -1
- package/dist/audit/handlers/list.query.js +9 -99
- package/dist/audit/handlers/resolve-audit-tenant.d.ts +3 -1
- package/dist/audit/handlers/resolve-audit-tenant.js +21 -7
- package/dist/audit/index.d.ts +1 -1
- package/dist/audit/index.js +1 -1
- package/dist/audit/run-escape-hatch-retention.js +1 -1
- package/dist/audit/screens.d.ts +65 -0
- package/dist/audit/screens.js +73 -0
- package/dist/audit/web/client-plugin.js +2 -3
- package/dist/audit/{constants.d.ts → web/constants.d.ts} +8 -0
- package/dist/audit/{constants.js → web/constants.js} +8 -1
- package/dist/audit/web/default-translations.d.ts +2 -0
- package/dist/audit/web/default-translations.js +3 -0
- package/dist/audit/web/i18n.d.ts +5 -2
- package/dist/audit/web/i18n.js +31 -4
- package/dist/audit/web/index.js +0 -1
- package/dist/auth-email-password/bootstrap.d.ts +1 -1
- package/dist/auth-email-password/bootstrap.js +4 -4
- package/dist/auth-email-password/errors.js +1 -1
- package/dist/auth-email-password/feature.js +2 -2
- package/dist/auth-email-password/handlers/confirm-account-unlock.write.js +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.js +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.js +3 -3
- package/dist/auth-email-password/handlers/invite-info.query.js +1 -1
- package/dist/auth-email-password/handlers/login.write.d.ts +1 -0
- package/dist/auth-email-password/handlers/login.write.js +26 -1
- package/dist/auth-email-password/handlers/request-account-unlock.write.js +1 -1
- package/dist/auth-email-password/handlers/request-email-verification.write.js +1 -1
- package/dist/auth-email-password/handlers/request-password-reset.write.js +1 -1
- package/dist/auth-email-password/handlers/reset-password.write.js +1 -1
- package/dist/auth-email-password/handlers/verify-email.write.js +1 -1
- package/dist/auth-email-password/index.d.ts +1 -1
- package/dist/auth-email-password/index.js +1 -1
- package/dist/auth-email-password/mail-notifications.js +1 -1
- package/dist/auth-email-password/signup-activation.js +1 -1
- package/dist/auth-email-password/web/auth-client.js +0 -1
- package/dist/auth-email-password/web/auth-form-logic.js +0 -1
- package/dist/auth-email-password/web/auth-form-primitives.js +0 -1
- package/dist/auth-email-password/web/auth-gate.js +0 -1
- package/dist/auth-email-password/web/auth-redirect.js +0 -1
- package/dist/auth-email-password/web/client-actions.js +0 -1
- package/dist/auth-email-password/web/client-plugin.js +1 -2
- package/dist/auth-email-password/web/confirm-account-unlock-screen.js +0 -1
- package/dist/auth-email-password/{constants.js → web/constants.js} +3 -6
- package/dist/auth-email-password/web/default-topbar-actions.js +0 -1
- package/dist/auth-email-password/web/forgot-password-screen.js +0 -1
- package/dist/auth-email-password/{i18n.js → web/i18n.js} +3 -4
- package/dist/auth-email-password/web/index.d.ts +1 -1
- package/dist/auth-email-password/web/index.js +1 -2
- package/dist/auth-email-password/web/invite-accept-screen.d.ts +2 -2
- package/dist/auth-email-password/web/invite-accept-screen.js +0 -1
- package/dist/auth-email-password/web/login-screen.js +0 -1
- package/dist/auth-email-password/{mail-i18n.js → web/mail-i18n.js} +0 -1
- package/dist/auth-email-password/web/request-account-unlock-screen.js +0 -1
- package/dist/auth-email-password/web/reset-password-screen.js +0 -1
- package/dist/auth-email-password/web/session-bootstrap-error.js +0 -1
- package/dist/auth-email-password/web/session.js +0 -1
- package/dist/auth-email-password/web/signup-complete-screen.d.ts +2 -2
- package/dist/auth-email-password/web/signup-complete-screen.js +0 -1
- package/dist/auth-email-password/web/signup-screen.js +0 -1
- package/dist/auth-email-password/web/tenant-menu-items.js +0 -1
- package/dist/auth-email-password/web/tenant-switcher.js +0 -1
- package/dist/auth-email-password/web/use-shell-user.js +0 -1
- package/dist/auth-email-password/web/user-menu.js +0 -1
- package/dist/auth-email-password/web/verify-email-screen.js +0 -1
- package/dist/auth-mfa/errors.d.ts +1 -1
- package/dist/auth-mfa/errors.js +2 -2
- package/dist/auth-mfa/handlers/enable-confirm-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/enable-start-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/enable-start.write.js +1 -1
- package/dist/auth-mfa/handlers/verify.write.js +1 -1
- package/dist/auth-mfa/index.d.ts +1 -1
- package/dist/auth-mfa/index.js +1 -1
- package/dist/auth-mfa/mfa-status-checker.js +1 -1
- package/dist/auth-mfa/screens.js +1 -1
- package/dist/auth-mfa/web/client-plugin.js +0 -1
- package/dist/auth-mfa/{constants.js → web/constants.js} +0 -1
- package/dist/auth-mfa/web/i18n.js +0 -1
- package/dist/auth-mfa/web/index.js +0 -1
- package/dist/auth-mfa/web/mfa-client.js +0 -1
- package/dist/auth-mfa/web/mfa-disable-dialog.js +1 -2
- package/dist/auth-mfa/web/mfa-recovery-codes-reveal.js +0 -1
- package/dist/auth-mfa/web/mfa-regenerate-recovery-dialog.js +1 -2
- package/dist/auth-mfa/web/mfa-setup-preauth-screen.js +11 -18
- package/dist/auth-mfa/web/mfa-verify-screen.js +0 -1
- package/dist/billing-foundation/checkout-core.js +1 -1
- package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/consent-text.js +1 -1
- package/dist/billing-foundation/consumer-protection/issue-confirmation.js +7 -3
- package/dist/billing-foundation/consumer-protection/mail-notifications.js +3 -1
- package/dist/billing-foundation/consumer-protection/register-consent.js +1 -1
- package/dist/billing-foundation/consumer-protection/register-termination.js +8 -2
- package/dist/billing-foundation/consumer-protection/stored-user-email.d.ts +1 -0
- package/dist/billing-foundation/consumer-protection/stored-user-email.js +8 -0
- package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +5 -1
- package/dist/billing-foundation/consumer-protection/termination-mail.js +3 -1
- package/dist/billing-foundation/consumer-protection/termination-notify.js +1 -1
- package/dist/billing-foundation/consumer-protection/termination-pages.js +109 -15
- package/dist/billing-foundation/consumer-protection/termination-record.d.ts +8 -1
- package/dist/billing-foundation/consumer-protection/termination-record.js +76 -3
- package/dist/billing-foundation/consumer-protection/termination-request.js +33 -6
- package/dist/billing-foundation/consumer-protection/termination-revoke.d.ts +28 -0
- package/dist/billing-foundation/consumer-protection/termination-revoke.js +149 -0
- package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +17 -1
- package/dist/billing-foundation/consumer-protection/termination-texts.js +39 -0
- package/dist/billing-foundation/events.d.ts +9 -0
- package/dist/billing-foundation/events.js +14 -2
- package/dist/billing-foundation/feature.js +1 -1
- package/dist/billing-foundation/handlers/process-event.write.d.ts +5 -1
- package/dist/billing-foundation/handlers/process-event.write.js +57 -3
- package/dist/billing-foundation/handlers/switch-plan.write.js +1 -1
- package/dist/billing-foundation/handlers/sync-subscription.write.js +1 -1
- package/dist/billing-foundation/index.d.ts +2 -2
- package/dist/billing-foundation/index.js +2 -2
- package/dist/billing-foundation/plan-catalog.js +1 -1
- package/dist/billing-foundation/screens.js +1 -1
- package/dist/billing-foundation/subscription-tier-sync.js +1 -1
- package/dist/billing-foundation/types.d.ts +14 -2
- package/dist/billing-foundation/types.js +1 -1
- package/dist/billing-foundation/validate-options.js +3 -3
- package/dist/billing-foundation/web/billing-contact-plan.js +1 -2
- package/dist/billing-foundation/web/billing-plans-panel.js +1 -2
- package/dist/billing-foundation/web/cancel-contract-dialog.js +1 -2
- package/dist/billing-foundation/web/checkout-consent-dialog.js +1 -2
- package/dist/billing-foundation/web/client-plugin.js +1 -1
- package/dist/billing-foundation/{constants.d.ts → web/constants.d.ts} +21 -14
- package/dist/billing-foundation/{constants.js → web/constants.js} +35 -31
- package/dist/billing-foundation/{consumer-protection → web/consumer-protection}/consent-locale.js +0 -1
- package/dist/billing-foundation/{contact-card.js → web/contact-card.js} +0 -1
- package/dist/billing-foundation/web/index.d.ts +2 -2
- package/dist/billing-foundation/web/index.js +2 -3
- package/dist/billing-foundation/web/localized-params.js +0 -1
- package/dist/billing-foundation/webhook-handler.js +4 -1
- package/dist/cap-overview/feature.js +1 -1
- package/dist/cap-overview/handlers/caps-usage.query.js +1 -1
- package/dist/cap-overview/handlers/tenant-caps-list.query.js +2 -2
- package/dist/cap-overview/index.d.ts +2 -2
- package/dist/cap-overview/index.js +2 -2
- package/dist/cap-overview/screens.js +1 -1
- package/dist/cap-overview/web/cap-cards-panel.js +1 -1
- package/dist/cap-overview/web/cap-usage-bar.js +1 -2
- package/dist/cap-overview/web/client-plugin.js +1 -1
- package/dist/cap-overview/{constants.js → web/constants.js} +0 -1
- package/dist/cap-overview/web/index.js +0 -1
- package/dist/cap-overview/{usage-math.d.ts → web/usage-math.d.ts} +1 -1
- package/dist/compliance-profiles/feature.js +1 -1
- package/dist/compliance-profiles/index.d.ts +1 -1
- package/dist/compliance-profiles/index.js +1 -1
- package/dist/compliance-profiles/web/client-plugin.js +1 -2
- package/dist/compliance-profiles/web/compliance-profile-catalog.js +1 -2
- package/dist/compliance-profiles/{constants.js → web/constants.js} +0 -1
- package/dist/compliance-profiles/web/index.js +0 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/web/client-plugin.d.ts +1 -1
- package/dist/config/web/client-plugin.js +1 -2
- package/dist/config/{constants.js → web/constants.js} +0 -1
- package/dist/config/web/i18n.js +0 -1
- package/dist/config/web/index.d.ts +1 -1
- package/dist/config/web/index.js +1 -2
- package/dist/config/write-helpers.js +1 -1
- package/dist/custom-fields/feature.js +1 -1
- package/dist/custom-fields/handlers/clear-custom-field.write.js +1 -1
- package/dist/custom-fields/handlers/define-tenant-field.write.js +1 -1
- package/dist/custom-fields/handlers/delete-system-field.write.js +1 -1
- package/dist/custom-fields/handlers/delete-tenant-field.write.js +1 -1
- package/dist/custom-fields/handlers/set-custom-field.write.js +1 -1
- package/dist/custom-fields/handlers/update-tenant-field.write.js +1 -1
- package/dist/custom-fields/index.d.ts +1 -1
- package/dist/custom-fields/index.js +1 -1
- package/dist/custom-fields/lib/value-schema.js +1 -1
- package/dist/custom-fields/schemas.js +1 -1
- package/dist/custom-fields/web/client-plugin.js +1 -2
- package/dist/custom-fields/{constants.js → web/constants.js} +18 -19
- package/dist/custom-fields/web/custom-fields-form-section.js +1 -2
- package/dist/custom-fields/web/i18n.js +0 -1
- package/dist/custom-fields/web/index.d.ts +1 -1
- package/dist/custom-fields/web/index.js +1 -2
- package/dist/custom-fields/wire-for-entity.js +1 -1
- package/dist/delivery/address-opt-out.js +1 -1
- package/dist/delivery/attempt-log-retention.js +21 -3
- package/dist/delivery/constants.d.ts +1 -1
- package/dist/delivery/constants.js +2 -2
- package/dist/delivery/i18n.js +1 -1
- package/dist/delivery/unsubscribe-page.js +1 -1
- package/dist/delivery/web/client-plugin.js +1 -1
- package/dist/delivery/web/delivery-channel-cell.js +0 -1
- package/dist/delivery/web/delivery-error-cell.js +0 -1
- package/dist/delivery/web/delivery-status-cell.js +1 -2
- package/dist/delivery/web/delivery-time-cell.js +0 -1
- package/dist/delivery/web/delivery-type-cell.js +0 -1
- package/dist/delivery/web/index.js +0 -1
- package/dist/delivery/{public-names.js → web/public-names.js} +0 -1
- package/dist/document-ingest-foundation/events.d.ts +1 -0
- package/dist/document-ingest-foundation/events.js +3 -0
- package/dist/document-ingest-foundation/executor.js +2 -1
- package/dist/document-ingest-foundation/feature.js +16 -5
- package/dist/document-ingest-foundation/index.d.ts +1 -1
- package/dist/document-ingest-foundation/index.js +1 -1
- package/dist/feature-toggles/feature.d.ts +1 -1
- package/dist/feature-toggles/feature.js +2 -2
- package/dist/feature-toggles/handlers/list.query.js +1 -1
- package/dist/feature-toggles/handlers/registered.query.js +1 -1
- package/dist/feature-toggles/handlers/set.write.js +1 -1
- package/dist/feature-toggles/index.d.ts +1 -1
- package/dist/feature-toggles/index.js +1 -1
- package/dist/feature-toggles/web/client-plugin.js +1 -2
- package/dist/feature-toggles/{constants.js → web/constants.js} +0 -1
- package/dist/feature-toggles/web/index.js +0 -1
- package/dist/folders/feature.js +1 -1
- package/dist/folders/handlers/clear-folder.write.js +1 -1
- package/dist/folders/handlers/delete-folder.write.js +1 -1
- package/dist/folders/handlers/set-folder.write.js +1 -1
- package/dist/folders/index.d.ts +1 -1
- package/dist/folders/index.js +1 -1
- package/dist/folders/web/client-plugin.js +1 -2
- package/dist/folders/{constants.js → web/constants.js} +0 -1
- package/dist/folders/web/folder-manager.js +1 -2
- package/dist/folders/web/folder-section.js +1 -2
- package/dist/folders/web/i18n.js +0 -1
- package/dist/folders/web/index.d.ts +1 -1
- package/dist/folders/web/index.js +1 -2
- package/dist/folders/web/tree.js +0 -1
- package/dist/form-draft/db/queries/cleanup.d.ts +3 -2
- package/dist/form-draft/db/queries/cleanup.js +18 -9
- package/dist/form-draft/decrypt-draft.d.ts +2 -0
- package/dist/form-draft/decrypt-draft.js +19 -0
- package/dist/form-draft/entity.js +6 -9
- package/dist/form-draft/feature.js +1 -1
- package/dist/form-draft/handlers/cleanup.job.d.ts +1 -0
- package/dist/form-draft/handlers/cleanup.job.js +17 -4
- package/dist/form-draft/handlers/discard.write.js +1 -1
- package/dist/form-draft/handlers/get.query.js +6 -7
- package/dist/form-draft/handlers/list.query.js +11 -7
- package/dist/form-draft/handlers/save.write.js +1 -1
- package/dist/form-draft/index.d.ts +1 -1
- package/dist/form-draft/index.js +1 -1
- package/dist/form-draft/lookup.d.ts +2 -2
- package/dist/form-draft/lookup.js +7 -2
- package/dist/form-draft/schemas.js +1 -1
- package/dist/form-draft/{constants.js → web/constants.js} +0 -1
- package/dist/form-draft-user-data/hooks.js +2 -2
- package/dist/inbound-mail-foundation/retention-sweep.js +7 -5
- package/dist/jobs/feature.js +2 -2
- package/dist/jobs/handlers/retry.write.js +1 -1
- package/dist/jobs/handlers/trigger.write.js +1 -1
- package/dist/jobs/index.d.ts +1 -1
- package/dist/jobs/index.js +1 -1
- package/dist/jobs/web/client-plugin.js +2 -3
- package/dist/jobs/{constants.js → web/constants.js} +0 -1
- package/dist/jobs/web/default-translations.d.ts +2 -0
- package/dist/jobs/web/default-translations.js +3 -0
- package/dist/jobs/web/i18n.d.ts +5 -2
- package/dist/jobs/web/i18n.js +51 -4
- package/dist/jobs/web/index.js +0 -1
- package/dist/ledger/entity.d.ts +1 -1
- package/dist/ledger/entity.js +1 -1
- package/dist/ledger/feature.js +1 -1
- package/dist/ledger/handlers/confirm-schedule-period.write.js +2 -5
- package/dist/ledger/handlers/create-transaction.write.js +1 -1
- package/dist/ledger/handlers/reports.query.js +1 -1
- package/dist/ledger/handlers/reverse-transaction.write.js +1 -1
- package/dist/ledger/index.d.ts +1 -1
- package/dist/ledger/index.js +1 -1
- package/dist/ledger/recurring.d.ts +1 -1
- package/dist/ledger/reports.d.ts +1 -1
- package/dist/ledger/schemas.js +1 -1
- package/dist/ledger/{constants.js → web/constants.js} +0 -1
- package/dist/ledger/web/index.d.ts +1 -1
- package/dist/ledger/web/index.js +1 -2
- package/dist/legal-pages/feature.d.ts +1 -1
- package/dist/legal-pages/feature.js +1 -1
- package/dist/legal-pages/index.d.ts +1 -1
- package/dist/legal-pages/index.js +1 -1
- package/dist/legal-pages/lib/boot-check.d.ts +1 -1
- package/dist/legal-pages/lib/boot-check.js +1 -1
- package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
- package/dist/legal-pages/web/client-plugin.js +1 -2
- package/dist/legal-pages/{constants.js → web/constants.js} +6 -8
- package/dist/legal-pages/web/index.js +0 -1
- package/dist/managed-pages/feature.js +1 -1
- package/dist/managed-pages/web/client-plugin.js +1 -2
- package/dist/managed-pages/web/default-translations.d.ts +2 -0
- package/dist/managed-pages/web/default-translations.js +11 -0
- package/dist/managed-pages/web/i18n.d.ts +5 -2
- package/dist/managed-pages/web/i18n.js +53 -12
- package/dist/managed-pages/web/index.d.ts +1 -1
- package/dist/managed-pages/web/index.js +1 -2
- package/dist/metrics/compute.d.ts +1 -1
- package/dist/metrics/compute.js +1 -1
- package/dist/metrics/feature.js +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/metrics/types.d.ts +1 -1
- package/dist/metrics/validate.js +1 -1
- package/dist/metrics/{constants.js → web/constants.js} +0 -1
- package/dist/metrics/window.d.ts +1 -1
- package/dist/notes-history/feature.js +1 -1
- package/dist/notes-history/handlers/add-note.write.js +1 -1
- package/dist/notes-history/index.d.ts +1 -1
- package/dist/notes-history/index.js +1 -1
- package/dist/notes-history/web/client-plugin.js +1 -2
- package/dist/notes-history/{constants.js → web/constants.js} +0 -1
- package/dist/notes-history/web/i18n.js +0 -1
- package/dist/notes-history/web/index.d.ts +1 -1
- package/dist/notes-history/web/index.js +1 -2
- package/dist/notes-history/web/notes-section.js +2 -3
- package/dist/personal-access-tokens/feature.d.ts +2 -2
- package/dist/personal-access-tokens/feature.js +6 -4
- package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
- package/dist/personal-access-tokens/handlers/create.write.js +1 -1
- package/dist/personal-access-tokens/handlers/revoke.write.js +1 -1
- package/dist/personal-access-tokens/hash.js +1 -1
- package/dist/personal-access-tokens/i18n.d.ts +1 -1
- package/dist/personal-access-tokens/i18n.js +1 -1
- package/dist/personal-access-tokens/index.d.ts +5 -5
- package/dist/personal-access-tokens/index.js +3 -3
- package/dist/personal-access-tokens/resolver.d.ts +1 -1
- package/dist/personal-access-tokens/resolver.js +1 -1
- package/dist/personal-access-tokens/schema/api-token.js +1 -1
- package/dist/personal-access-tokens/screens.d.ts +1 -1
- package/dist/personal-access-tokens/screens.js +1 -1
- package/dist/personal-access-tokens/{constants.js → web/constants.js} +0 -1
- package/dist/presets/index.d.ts +0 -1
- package/dist/presets/index.js +0 -1
- package/dist/presets/security-baseline.d.ts +1 -1
- package/dist/presets/security-baseline.js +1 -1
- package/dist/secrets/feature.js +1 -1
- package/dist/secrets/handlers/delete.write.js +1 -1
- package/dist/secrets/handlers/list.query.js +1 -1
- package/dist/secrets/handlers/set.write.js +1 -1
- package/dist/secrets/i18n.js +1 -1
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/{constants.js → web/constants.js} +0 -1
- package/dist/secrets/write-gate.js +1 -1
- package/dist/sessions/feature.js +7 -4
- package/dist/sessions/{i18n.js → web/i18n.js} +0 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/purge-files-reaching-subject.js +7 -3
- package/dist/subscription-stripe/feature.js +2 -1
- package/dist/subscription-stripe/plugin-methods.d.ts +3 -0
- package/dist/subscription-stripe/plugin-methods.js +14 -0
- package/dist/subscription-stripe/verify-webhook.js +1 -0
- package/dist/tags/feature.js +1 -1
- package/dist/tags/handlers/assign-tag.write.js +11 -7
- package/dist/tags/handlers/create-tag.write.js +1 -1
- package/dist/tags/handlers/delete-tag.write.js +4 -1
- package/dist/tags/handlers/remove-tag.write.js +1 -1
- package/dist/tags/handlers/update-tag.write.js +1 -1
- package/dist/tags/index.d.ts +1 -1
- package/dist/tags/index.js +1 -1
- package/dist/tags/screens.js +1 -1
- package/dist/tags/web/client-plugin.js +1 -2
- package/dist/tags/{constants.d.ts → web/constants.d.ts} +1 -0
- package/dist/tags/{constants.js → web/constants.js} +3 -1
- package/dist/tags/web/entity-tags.js +1 -2
- package/dist/tags/web/i18n.js +2 -2
- package/dist/tags/web/index.d.ts +1 -1
- package/dist/tags/web/index.js +1 -2
- package/dist/tags/web/tag-filter.js +1 -2
- package/dist/tags/web/tag-manager.js +5 -4
- package/dist/tags/web/tag-picker.js +0 -1
- package/dist/tags/web/tag-section.js +1 -2
- package/dist/tags/web/tags-cell.js +1 -2
- package/dist/template-resolver/api.d.ts +21 -23
- package/dist/template-resolver/api.js +34 -6
- package/dist/template-resolver/compile-document-body.js +1 -1
- package/dist/template-resolver/compile-steps-block.js +2 -2
- package/dist/template-resolver/document-ops.d.ts +1 -1
- package/dist/template-resolver/document-ops.js +3 -3
- package/dist/template-resolver/document-sanitizer.d.ts +1 -1
- package/dist/template-resolver/document-sanitizer.js +3 -3
- package/dist/template-resolver/feature.d.ts +2 -0
- package/dist/template-resolver/feature.js +12 -4
- package/dist/template-resolver/handlers/by-slug.query.js +6 -1
- package/dist/template-resolver/handlers/by-tenant.query.js +6 -2
- package/dist/template-resolver/handlers/collection-item.query.js +1 -1
- package/dist/template-resolver/handlers/collection-list.query.js +1 -1
- package/dist/template-resolver/handlers/collection-set.write.d.ts +2 -1
- package/dist/template-resolver/handlers/collection-set.write.js +14 -2
- package/dist/template-resolver/handlers/copy-locale.write.js +2 -2
- package/dist/template-resolver/handlers/diff-to-system.query.js +5 -1
- package/dist/template-resolver/handlers/discard-draft.write.js +1 -1
- package/dist/template-resolver/handlers/document-base.d.ts +1 -1
- package/dist/template-resolver/handlers/document-base.js +6 -1
- package/dist/template-resolver/handlers/document-blocks.query.d.ts +1 -1
- package/dist/template-resolver/handlers/document-blocks.query.js +2 -2
- package/dist/template-resolver/handlers/export-bundle.query.js +5 -2
- package/dist/template-resolver/handlers/find-by-id.query.js +4 -2
- package/dist/template-resolver/handlers/layout-source.query.js +5 -5
- package/dist/template-resolver/handlers/list.query.js +5 -2
- package/dist/template-resolver/handlers/overview.query.d.ts +10 -2
- package/dist/template-resolver/handlers/overview.query.js +44 -12
- package/dist/template-resolver/handlers/patch-draft.write.js +1 -1
- package/dist/template-resolver/handlers/resource-shared.js +1 -1
- package/dist/template-resolver/handlers/resource-upload.write.js +1 -1
- package/dist/template-resolver/handlers/send-test.write.js +2 -2
- package/dist/template-resolver/handlers/set.write.js +1 -1
- package/dist/template-resolver/handlers/shared.js +1 -1
- package/dist/template-resolver/handlers/template-gates.d.ts +1 -1
- package/dist/template-resolver/handlers/template-gates.js +1 -1
- package/dist/template-resolver/handlers/template-write.d.ts +1 -1
- package/dist/template-resolver/handlers/template-write.js +1 -1
- package/dist/template-resolver/handlers/usage.query.js +3 -2
- package/dist/template-resolver/handlers/validate.query.d.ts +1 -1
- package/dist/template-resolver/handlers/validate.query.js +3 -1
- package/dist/template-resolver/i18n.d.ts +3 -0
- package/dist/template-resolver/i18n.js +24 -0
- package/dist/template-resolver/index.d.ts +4 -3
- package/dist/template-resolver/index.js +3 -3
- package/dist/template-resolver/layout-appearance.js +1 -1
- package/dist/template-resolver/layout-regions.d.ts +1 -1
- package/dist/template-resolver/seeding.d.ts +4 -1
- package/dist/template-resolver/seeding.js +13 -7
- package/dist/template-resolver/store-template-resource.js +2 -2
- package/dist/template-resolver/table.js +1 -1
- package/dist/template-resolver/template-bundle.js +2 -2
- package/dist/template-resolver/template-delivery-policy.d.ts +22 -0
- package/dist/template-resolver/template-delivery-policy.js +40 -0
- package/dist/template-resolver/template-draft.d.ts +1 -1
- package/dist/template-resolver/template-draft.js +1 -1
- package/dist/template-resolver/template-edit-policy.d.ts +1 -1
- package/dist/template-resolver/template-edit-policy.js +1 -1
- package/dist/template-resolver/template-meta.d.ts +2 -2
- package/dist/template-resolver/template-meta.js +2 -2
- package/dist/template-resolver/template-preview.d.ts +1 -1
- package/dist/template-resolver/template-preview.js +8 -4
- package/dist/template-resolver/template-usage.d.ts +1 -1
- package/dist/template-resolver/template-usage.js +1 -1
- package/dist/template-resolver/template-validation.js +1 -1
- package/dist/template-resolver/testing.js +1 -1
- package/dist/template-resolver/user-content-table.js +1 -1
- package/dist/template-resolver/web/client-plugin.js +1 -2
- package/dist/template-resolver/{constants.d.ts → web/constants.d.ts} +1 -1
- package/dist/template-resolver/{constants.js → web/constants.js} +7 -10
- package/dist/template-resolver/web/document-editor-extensions.js +2 -2
- package/dist/template-resolver/web/document-editor.js +0 -1
- package/dist/template-resolver/{document-images.js → web/document-images.js} +0 -1
- package/dist/template-resolver/{document-schema.js → web/document-schema.js} +0 -1
- package/dist/template-resolver/{document-steps.js → web/document-steps.js} +0 -1
- package/dist/template-resolver/web/document-tiptap-editor.js +2 -3
- package/dist/template-resolver/web/document-toolbar-blocks.d.ts +2 -2
- package/dist/template-resolver/web/document-toolbar-blocks.js +1 -1
- package/dist/template-resolver/web/editor-handle.js +1 -1
- package/dist/template-resolver/web/i18n.js +1 -1
- package/dist/template-resolver/web/index.d.ts +3 -3
- package/dist/template-resolver/web/index.js +3 -4
- package/dist/template-resolver/{mail-constants.js → web/mail-constants.js} +0 -1
- package/dist/template-resolver/{pdf-constants.js → web/pdf-constants.js} +0 -1
- package/dist/template-resolver/web/placeholder-line-editor-lazy.js +0 -1
- package/dist/template-resolver/web/placeholder-line-editor.js +6 -4
- package/dist/template-resolver/{qualified-names.js → web/qualified-names.js} +0 -1
- package/dist/template-resolver/web/use-stable-by-key.js +0 -1
- package/dist/tenant/handlers/add-member.write.js +1 -1
- package/dist/tenant/index.d.ts +1 -1
- package/dist/tenant/index.js +1 -1
- package/dist/tenant/invitation-table.js +1 -1
- package/dist/tenant/invited-membership.js +1 -1
- package/dist/tenant/last-tenant-admin.js +1 -1
- package/dist/tenant/member-role-options.js +1 -1
- package/dist/tenant/screens.js +1 -1
- package/dist/tenant/web/client-plugin.js +1 -2
- package/dist/tenant/{constants.js → web/constants.js} +3 -6
- package/dist/tenant/web/index.js +0 -1
- package/dist/tenant/web/member-roles-cell.js +0 -1
- package/dist/tenant/web/member-status-cell.js +0 -1
- package/dist/tenant-lifecycle/stages.js +2 -3
- package/dist/tier-engine/entity.d.ts +1 -1
- package/dist/tier-engine/entity.js +1 -1
- package/dist/tier-engine/feature.js +2 -2
- package/dist/tier-engine/handlers/set-tenant-tier.write.js +1 -1
- package/dist/tier-engine/index.d.ts +1 -1
- package/dist/tier-engine/index.js +1 -1
- package/dist/tier-engine/web/client-plugin.js +2 -3
- package/dist/tier-engine/{constants.js → web/constants.js} +2 -3
- package/dist/tier-engine/{i18n.js → web/i18n.js} +0 -1
- package/dist/tier-engine/web/index.js +0 -1
- package/dist/user/handlers/create.write.js +1 -1
- package/dist/user/handlers/update-roles.js +1 -1
- package/dist/user/handlers/update.write.js +1 -1
- package/dist/user/index.d.ts +1 -1
- package/dist/user/index.js +1 -1
- package/dist/user/invited-global-roles.d.ts +1 -1
- package/dist/user/invited-global-roles.js +1 -1
- package/dist/user/schema/user.js +1 -1
- package/dist/user/{constants.js → web/constants.js} +0 -1
- package/dist/user-data-rights/env.js +1 -1
- package/dist/user-data-rights/feature.js +3 -3
- package/dist/user-data-rights/index.d.ts +1 -1
- package/dist/user-data-rights/index.js +1 -1
- package/dist/user-data-rights/lib/resolve-tenant-model.js +1 -1
- package/dist/user-data-rights/mail-notifications.js +1 -1
- package/dist/user-data-rights/web/client-plugin.js +2 -3
- package/dist/user-data-rights/web/confirm-deletion-screen.js +0 -1
- package/dist/user-data-rights/{constants.js → web/constants.js} +11 -12
- package/dist/user-data-rights/web/default-translations.d.ts +2 -0
- package/dist/user-data-rights/web/default-translations.js +59 -0
- package/dist/user-data-rights/web/i18n.d.ts +5 -2
- package/dist/user-data-rights/web/i18n.js +37 -59
- package/dist/user-data-rights/web/index.d.ts +1 -1
- package/dist/user-data-rights/web/index.js +1 -2
- package/dist/user-data-rights/web/privacy-center-screen.js +1 -2
- package/dist/user-data-rights/web/request-deletion-screen.js +0 -1
- package/dist/user-data-rights-defaults/hooks/file-ref.userdata-hook.js +6 -1
- package/dist/user-profile/feature.js +1 -1
- package/dist/user-profile/handlers/change-email.write.js +1 -1
- package/dist/user-profile/index.d.ts +1 -1
- package/dist/user-profile/index.js +1 -1
- package/dist/user-profile/web/client-plugin.js +2 -3
- package/dist/user-profile/{constants.js → web/constants.js} +0 -1
- package/dist/user-profile/{i18n.js → web/i18n.js} +0 -1
- package/dist/user-profile/web/profile-screen.js +2 -3
- package/dist/waitlist/entity.js +1 -1
- package/dist/waitlist/feature.js +1 -1
- package/dist/waitlist/handlers/export-purge.write.js +1 -1
- package/dist/waitlist/handlers/invite.write.js +1 -1
- package/dist/waitlist/handlers/reject.write.js +1 -1
- package/dist/waitlist/handlers/submit.write.js +4 -3
- package/dist/waitlist/import.d.ts +1 -1
- package/dist/waitlist/index.d.ts +1 -1
- package/dist/waitlist/index.js +1 -1
- package/dist/waitlist/legacy-migrate.js +1 -1
- package/dist/waitlist/link-on-signup.js +1 -1
- package/dist/waitlist/mail.d.ts +0 -1
- package/dist/waitlist/mail.js +6 -4
- package/dist/waitlist/payloads.js +1 -1
- package/dist/waitlist/screens.js +1 -1
- package/dist/waitlist/{constants.js → web/constants.js} +0 -1
- package/kumiko-es-tables.json +102 -0
- package/package.json +30 -29
- package/src/audit/changes.json +7 -0
- package/src/auth-email-password/changes.json +6 -0
- package/src/auth-mfa/changes.json +6 -0
- package/src/billing-foundation/changes.json +18 -0
- package/src/delivery/changes.json +6 -0
- package/src/document-ingest-foundation/changes.json +6 -0
- package/src/files/changes.json +7 -0
- package/src/form-draft/changes.json +7 -0
- package/src/ledger/changes.json +7 -0
- package/src/presets/changes.json +7 -0
- package/src/tags/changes.json +6 -0
- package/src/template-resolver/changes.json +43 -0
- package/src/user-data-rights/changes.json +14 -0
- package/src/waitlist/changes.json +6 -0
- package/dist/admin-shell/i18n.d.ts +0 -5
- package/dist/admin-shell/i18n.js +0 -51
- package/dist/audit/i18n.d.ts +0 -5
- package/dist/audit/i18n.js +0 -22
- package/dist/jobs/i18n.d.ts +0 -5
- package/dist/jobs/i18n.js +0 -52
- package/dist/managed-pages/i18n.d.ts +0 -5
- package/dist/managed-pages/i18n.js +0 -55
- package/dist/presets/dsgvo-self-service.d.ts +0 -10
- package/dist/presets/dsgvo-self-service.js +0 -24
- package/dist/user-data-rights/i18n.d.ts +0 -5
- package/dist/user-data-rights/i18n.js +0 -39
- /package/dist/account-security/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/account-security/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/admin-shell/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/auth-email-password/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/auth-email-password/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/auth-email-password/{mail-i18n.d.ts → web/mail-i18n.d.ts} +0 -0
- /package/dist/auth-mfa/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/billing-foundation/{consumer-protection → web/consumer-protection}/consent-locale.d.ts +0 -0
- /package/dist/billing-foundation/{contact-card.d.ts → web/contact-card.d.ts} +0 -0
- /package/dist/cap-overview/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/cap-overview/{usage-math.js → web/usage-math.js} +0 -0
- /package/dist/compliance-profiles/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/config/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/custom-fields/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/delivery/{public-names.d.ts → web/public-names.d.ts} +0 -0
- /package/dist/feature-toggles/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/folders/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/form-draft/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/jobs/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/ledger/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/legal-pages/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/metrics/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/notes-history/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/personal-access-tokens/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/personal-access-tokens/{scopes.d.ts → web/scopes.d.ts} +0 -0
- /package/dist/personal-access-tokens/{scopes.js → web/scopes.js} +0 -0
- /package/dist/secrets/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/sessions/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/template-resolver/{document-blocks.d.ts → web/document-blocks.d.ts} +0 -0
- /package/dist/template-resolver/{document-blocks.js → web/document-blocks.js} +0 -0
- /package/dist/template-resolver/{document-images.d.ts → web/document-images.d.ts} +0 -0
- /package/dist/template-resolver/{document-schema.d.ts → web/document-schema.d.ts} +0 -0
- /package/dist/template-resolver/{document-steps.d.ts → web/document-steps.d.ts} +0 -0
- /package/dist/template-resolver/{mail-constants.d.ts → web/mail-constants.d.ts} +0 -0
- /package/dist/template-resolver/{pdf-constants.d.ts → web/pdf-constants.d.ts} +0 -0
- /package/dist/template-resolver/{placeholder-text.d.ts → web/placeholder-text.d.ts} +0 -0
- /package/dist/template-resolver/{placeholder-text.js → web/placeholder-text.js} +0 -0
- /package/dist/template-resolver/{qualified-names.d.ts → web/qualified-names.d.ts} +0 -0
- /package/dist/tenant/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/tier-engine/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/tier-engine/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/user/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-data-rights/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-profile/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-profile/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/waitlist/{constants.d.ts → web/constants.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineFeature, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { AuthMfaQueries, MFA_DISABLE_SCREEN_ID, MFA_ENABLE_SCREEN_ID, MFA_REGENERATE_RECOVERY_SCREEN_ID, } from "../auth-mfa/index.js";
|
|
3
3
|
import { SESSION_MINE_SCREEN_ID } from "../sessions/index.js";
|
|
4
|
-
import { ACCOUNT_SECURITY_FEATURE, ACCOUNT_SECURITY_NAV_LABEL, ACCOUNT_SECURITY_SCREEN_ID, ACCOUNT_SECURITY_SCREEN_QN, } from "./constants.js";
|
|
5
|
-
import { ACCOUNT_SECURITY_I18N } from "./i18n.js";
|
|
4
|
+
import { ACCOUNT_SECURITY_FEATURE, ACCOUNT_SECURITY_NAV_LABEL, ACCOUNT_SECURITY_SCREEN_ID, ACCOUNT_SECURITY_SCREEN_QN, } from "./web/constants.js";
|
|
5
|
+
import { ACCOUNT_SECURITY_I18N } from "./web/i18n.js";
|
|
6
6
|
const DEFAULT_ACCESS = {
|
|
7
7
|
openToAll: { reason: "signed-in users manage their own account security" },
|
|
8
8
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ACCOUNT_SECURITY_FEATURE, ACCOUNT_SECURITY_NAV_LABEL, ACCOUNT_SECURITY_SCREEN_ID, ACCOUNT_SECURITY_SCREEN_QN, ACCOUNT_SECURITY_SCREEN_TITLE_KEY, } from "./constants.ts";
|
|
2
1
|
export { type AccountSecurityFeatureOptions, type AccountSecurityNavOptions, accountSecurityMfaStatusVisibility, createAccountSecurityFeature, } from "./feature.ts";
|
|
3
|
-
export {
|
|
2
|
+
export { ACCOUNT_SECURITY_FEATURE, ACCOUNT_SECURITY_NAV_LABEL, ACCOUNT_SECURITY_SCREEN_ID, ACCOUNT_SECURITY_SCREEN_QN, ACCOUNT_SECURITY_SCREEN_TITLE_KEY, } from "./web/constants.ts";
|
|
3
|
+
export { ACCOUNT_SECURITY_I18N } from "./web/i18n.ts";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ACCOUNT_SECURITY_FEATURE, ACCOUNT_SECURITY_NAV_LABEL, ACCOUNT_SECURITY_SCREEN_ID, ACCOUNT_SECURITY_SCREEN_QN, ACCOUNT_SECURITY_SCREEN_TITLE_KEY, } from "./constants.js";
|
|
2
1
|
export { accountSecurityMfaStatusVisibility, createAccountSecurityFeature, } from "./feature.js";
|
|
3
|
-
export {
|
|
2
|
+
export { ACCOUNT_SECURITY_FEATURE, ACCOUNT_SECURITY_NAV_LABEL, ACCOUNT_SECURITY_SCREEN_ID, ACCOUNT_SECURITY_SCREEN_QN, ACCOUNT_SECURITY_SCREEN_TITLE_KEY, } from "./web/constants.js";
|
|
3
|
+
export { ACCOUNT_SECURITY_I18N } from "./web/i18n.js";
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
// composes workspaces and cross-feature nav entries.
|
|
4
4
|
import { access, defineFeature, } from "@cosmicdrift/kumiko-framework/engine";
|
|
5
5
|
import { DEFAULT_METRICS } from "../metrics/index.js";
|
|
6
|
-
import { ADMIN_SHELL_FEATURE, DEFAULT_PLATFORM_WORKSPACE_ID, DEFAULT_TENANT_WORKSPACE_ID, PLATFORM_OVERVIEW_SCREEN_ID, TENANT_OVERVIEW_SCREEN_ID, } from "./constants.js";
|
|
7
|
-
import { ADMIN_SHELL_I18N } from "./i18n.js";
|
|
8
6
|
import { OVERVIEW_TIME_RANGE, PLATFORM_SCOPE, PLATFORM_TENANT_FILTER, platformOverviewPanels, tenantOverviewPanels, } from "./overview-panels.js";
|
|
7
|
+
import { ADMIN_SHELL_FEATURE, DEFAULT_PLATFORM_WORKSPACE_ID, DEFAULT_TENANT_WORKSPACE_ID, PLATFORM_OVERVIEW_SCREEN_ID, TENANT_OVERVIEW_SCREEN_ID, } from "./web/constants.js";
|
|
8
|
+
import { ADMIN_SHELL_I18N } from "./web/i18n.js";
|
|
9
9
|
export function createAdminShellFeature(options = {}) {
|
|
10
10
|
const tenantWsId = options.workspaceIds?.tenant ?? DEFAULT_TENANT_WORKSPACE_ID;
|
|
11
11
|
const platformWsId = options.workspaceIds?.platform ?? DEFAULT_PLATFORM_WORKSPACE_ID;
|
|
@@ -15,7 +15,7 @@ export function createAdminShellFeature(options = {}) {
|
|
|
15
15
|
const registerWorkspaces = options.registerWorkspaces ?? true;
|
|
16
16
|
const metrics = options.metrics ?? DEFAULT_METRICS;
|
|
17
17
|
return defineFeature(ADMIN_SHELL_FEATURE, (r) => {
|
|
18
|
-
r.describe("Registers tenant-admin and platform-admin workspaces with provider nav into owner-feature screens (`tenant:screen:members`, `audit:screen:audit-log`, `tenant:screen:tenant-list`, `jobs:screen:job-runs`, optional `tier-engine:screen:tier-admin`, optional `cap-overview:screen:my-caps`/`cap-overview:screen:tenant-cap-list`, optional `document-designer` template navs) and the two overview dashboards, built from the metrics list (`metrics` option, default DEFAULT_METRICS). Mount after user, tenant, audit, jobs, metrics and metrics-system; pass `workspaceIds` to match app URL conventions (e.g. Studio `d`/`s`, PublicStatus `admin`/`sysadmin`). Client: `adminShellClient()`, `tenantClient()`, `auditClient()`, `jobsClient()`, optional `tierEngineClient()`.");
|
|
18
|
+
r.describe("Registers tenant-admin and platform-admin workspaces with provider nav into owner-feature screens (`tenant:screen:members`, `audit:screen:audit-log`, `audit:screen:audit-log-all-tenants`, `tenant:screen:tenant-list`, `jobs:screen:job-runs`, optional `tier-engine:screen:tier-admin`, optional `cap-overview:screen:my-caps`/`cap-overview:screen:tenant-cap-list`, optional `document-designer` template navs) and the two overview dashboards, built from the metrics list (`metrics` option, default DEFAULT_METRICS). Mount after user, tenant, audit, jobs, metrics and metrics-system; pass `workspaceIds` to match app URL conventions (e.g. Studio `d`/`s`, PublicStatus `admin`/`sysadmin`). Client: `adminShellClient()`, `tenantClient()`, `auditClient()`, `jobsClient()`, optional `tierEngineClient()`.");
|
|
19
19
|
r.uiHints({
|
|
20
20
|
displayLabel: "Admin Shell",
|
|
21
21
|
category: "operations",
|
|
@@ -45,6 +45,7 @@ export function createAdminShellFeature(options = {}) {
|
|
|
45
45
|
"admin-shell:nav:platform-overview",
|
|
46
46
|
"admin-shell:nav:tenants",
|
|
47
47
|
...(includeCapOverview ? ["admin-shell:nav:tenant-caps"] : []),
|
|
48
|
+
"audit:nav:audit-log-all-tenants",
|
|
48
49
|
"jobs:nav:job-runs",
|
|
49
50
|
...(includeDocumentDesigner ? ["document-designer:nav:platform-templates"] : []),
|
|
50
51
|
...(includeTierAdmin ? ["admin-shell:nav:tier-admin"] : []),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ADMIN_SHELL_FEATURE, DEFAULT_PLATFORM_WORKSPACE_ID, DEFAULT_TENANT_WORKSPACE_ID, PLATFORM_OVERVIEW_SCREEN_ID, TENANT_OVERVIEW_SCREEN_ID, } from "./constants.ts";
|
|
2
1
|
export { type CreateAdminShellOptions, createAdminShellFeature } from "./feature.ts";
|
|
3
|
-
export { ADMIN_SHELL_I18N } from "./i18n.ts";
|
|
4
2
|
export { isOverviewQueryAllowed, type OverviewWorkspaceKind, overviewAllowedQueries, PLATFORM_OVERVIEW_ALLOWED_QUERIES, TENANT_OVERVIEW_ALLOWED_QUERIES, TENANT_OVERVIEW_FORBIDDEN_QUERIES, } from "./overview-allowlist.ts";
|
|
3
|
+
export { ADMIN_SHELL_FEATURE, DEFAULT_PLATFORM_WORKSPACE_ID, DEFAULT_TENANT_WORKSPACE_ID, PLATFORM_OVERVIEW_SCREEN_ID, TENANT_OVERVIEW_SCREEN_ID, } from "./web/constants.ts";
|
|
4
|
+
export { ADMIN_SHELL_I18N } from "./web/i18n.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ADMIN_SHELL_FEATURE, DEFAULT_PLATFORM_WORKSPACE_ID, DEFAULT_TENANT_WORKSPACE_ID, PLATFORM_OVERVIEW_SCREEN_ID, TENANT_OVERVIEW_SCREEN_ID, } from "./constants.js";
|
|
2
1
|
export { createAdminShellFeature } from "./feature.js";
|
|
3
|
-
export { ADMIN_SHELL_I18N } from "./i18n.js";
|
|
4
2
|
export { isOverviewQueryAllowed, overviewAllowedQueries, PLATFORM_OVERVIEW_ALLOWED_QUERIES, TENANT_OVERVIEW_ALLOWED_QUERIES, TENANT_OVERVIEW_FORBIDDEN_QUERIES, } from "./overview-allowlist.js";
|
|
3
|
+
export { ADMIN_SHELL_FEATURE, DEFAULT_PLATFORM_WORKSPACE_ID, DEFAULT_TENANT_WORKSPACE_ID, PLATFORM_OVERVIEW_SCREEN_ID, TENANT_OVERVIEW_SCREEN_ID, } from "./web/constants.js";
|
|
4
|
+
export { ADMIN_SHELL_I18N } from "./web/i18n.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
import { mergeTranslations } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
-
import { ADMIN_SHELL_FEATURE } from "
|
|
4
|
-
import { defaultTranslations } from "./
|
|
2
|
+
import { ADMIN_SHELL_FEATURE } from "./constants.js";
|
|
3
|
+
import { defaultTranslations } from "./default-translations.js";
|
|
5
4
|
export function adminShellClient(options) {
|
|
6
5
|
return {
|
|
7
6
|
name: ADMIN_SHELL_FEATURE,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Client pivot of ADMIN_SHELL_I18N — same keys as server r.translations bundle.
|
|
2
|
+
import { translationsByLocaleFromKeys, } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
+
import { ADMIN_SHELL_I18N } from "./i18n.js";
|
|
4
|
+
export const defaultTranslations = translationsByLocaleFromKeys(ADMIN_SHELL_I18N);
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type LocalizedString = {
|
|
2
|
+
readonly en: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const ADMIN_SHELL_I18N: Readonly<Record<string, LocalizedString>>;
|
|
5
|
+
export {};
|
|
@@ -1,5 +1,50 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// Pure-Data i18n keys for admin-shell (server r.translations + client pivot).
|
|
2
|
+
// Without these keys nav labels and workspace tabs render raw QNs in the shell.
|
|
3
|
+
export const ADMIN_SHELL_I18N = {
|
|
4
|
+
"screen:tenant-overview.title": { en: "Overview" },
|
|
5
|
+
"screen:platform-overview.title": { en: "Overview" },
|
|
6
|
+
"admin-shell.screen.tenant-overview.subtitle": {
|
|
7
|
+
en: "Activity, failed jobs and deliveries, quotas and open admin tasks of this tenant.",
|
|
8
|
+
},
|
|
9
|
+
"admin-shell.screen.platform-overview.subtitle": {
|
|
10
|
+
en: "Tenant, user, job and delivery health across the whole installation.",
|
|
11
|
+
},
|
|
12
|
+
"admin-shell:workspace.tenant": { en: "Administration" },
|
|
13
|
+
"admin-shell:workspace.platform": { en: "Platform" },
|
|
14
|
+
"admin-shell:nav.tenantOverview": { en: "Overview" },
|
|
15
|
+
"admin-shell:nav.platformOverview": { en: "Overview" },
|
|
16
|
+
"admin-shell:nav.tenants": { en: "Tenants" },
|
|
17
|
+
"admin-shell:nav.tierAdmin": { en: "Assign tier" },
|
|
18
|
+
"admin-shell:nav.myCaps": { en: "Plans & Caps" },
|
|
19
|
+
"admin-shell:nav.tenantCaps": { en: "Plans & Caps" },
|
|
20
|
+
"admin-shell:overview.kpi.activeTenants": { en: "Active tenants" },
|
|
21
|
+
"admin-shell:overview.kpi.activeUsers7d": { en: "Active users, 7 days" },
|
|
22
|
+
"admin-shell:overview.kpi.activeMembers7d": { en: "Active members, 7 days" },
|
|
23
|
+
"admin-shell:overview.kpi.failedJobs24h": { en: "Failed jobs, 24 h" },
|
|
24
|
+
"admin-shell:overview.kpi.failedDeliveries24h": { en: "Failed deliveries, 24 h" },
|
|
25
|
+
"admin-shell:overview.chart.jobRunsByStatus": { en: "Job runs by status" },
|
|
26
|
+
"admin-shell:overview.chart.deliveriesByChannel": { en: "Deliveries by channel" },
|
|
27
|
+
"admin-shell:overview.chart.auditWrites": { en: "Changes per day" },
|
|
28
|
+
"admin-shell:overview.chart.auditWritesSubtitle": { en: "Audit log, 14 days" },
|
|
29
|
+
"admin-shell:overview.list.recentFailures": { en: "Recent failures" },
|
|
30
|
+
"admin-shell:overview.list.recentFailuresEmpty": { en: "No failed jobs" },
|
|
31
|
+
"admin-shell:overview.list.quotas": { en: "Quotas" },
|
|
32
|
+
"admin-shell:overview.list.quotasEmpty": { en: "No quotas configured" },
|
|
33
|
+
"admin-shell:overview.col.job": { en: "Job" },
|
|
34
|
+
"admin-shell:overview.col.startedAt": { en: "Started" },
|
|
35
|
+
"admin-shell:overview.col.failedAt": { en: "Failed at" },
|
|
36
|
+
"admin-shell:overview.col.reason": { en: "Reason" },
|
|
37
|
+
"admin-shell:overview.col.quota": { en: "Quota" },
|
|
38
|
+
"admin-shell:overview.col.used": { en: "Used" },
|
|
39
|
+
"admin-shell:overview.col.limit": { en: "Limit" },
|
|
40
|
+
"admin-shell:overview.col.usage": { en: "Usage" },
|
|
41
|
+
"admin-shell:overview.range.24h": { en: "24 hours" },
|
|
42
|
+
"admin-shell:overview.range.7d": { en: "7 days" },
|
|
43
|
+
"admin-shell:overview.range.30d": { en: "30 days" },
|
|
44
|
+
"admin-shell:overview.scope.badge": { en: "All tenants" },
|
|
45
|
+
"admin-shell:overview.scope.notice": {
|
|
46
|
+
en: "You are viewing data of all tenants. Cross-tenant queries are recorded in the audit log.",
|
|
47
|
+
},
|
|
48
|
+
"admin-shell:overview.filter.tenant": { en: "Tenant" },
|
|
49
|
+
"admin-shell:overview.filter.allTenants": { en: "All tenants" },
|
|
50
|
+
};
|
package/dist/audit/feature.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { access, createSystemConfig, defineFeature, i18nKey, SYSTEM_USER_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { AUDIT_LOG_DETAIL_SCREEN_ID, AUDIT_LOG_SCREEN_ID, AuditQueries, DEFAULT_ESCAPE_HATCH_RETENTION_DAYS, } from "./constants.js";
|
|
3
2
|
import { escapeHatchUsedSchema } from "./escape-hatch-audit-sink.js";
|
|
4
3
|
import { detailsQuery } from "./handlers/details.query.js";
|
|
4
|
+
import { detailsAllTenantsQuery } from "./handlers/details-all-tenants.query.js";
|
|
5
5
|
import { listQuery } from "./handlers/list.query.js";
|
|
6
|
-
import {
|
|
6
|
+
import { listAllTenantsQuery } from "./handlers/list-all-tenants.query.js";
|
|
7
7
|
import { runEscapeHatchRetention } from "./run-escape-hatch-retention.js";
|
|
8
|
+
import { AUDIT_LOG_ALL_TENANTS_COLUMNS, AUDIT_LOG_COLUMNS, AUDIT_LOG_DATE_RANGE_FACET, AUDIT_LOG_DETAIL_FIELD_LABELS, AUDIT_LOG_TENANT_FACET, auditLogDetailLayout, } from "./screens.js";
|
|
9
|
+
import { AUDIT_LOG_ALL_TENANTS_DETAIL_SCREEN_ID, AUDIT_LOG_ALL_TENANTS_NAV_ID, AUDIT_LOG_ALL_TENANTS_SCREEN_ID, AUDIT_LOG_DETAIL_SCREEN_ID, AUDIT_LOG_SCREEN_ID, AuditQueries, DEFAULT_ESCAPE_HATCH_RETENTION_DAYS, } from "./web/constants.js";
|
|
10
|
+
import { AUDIT_I18N } from "./web/i18n.js";
|
|
8
11
|
// Audit feature — exposes a filtered read over the framework's event log.
|
|
9
12
|
//
|
|
10
13
|
// Design: the event-store IS the audit trail (every entity write produces
|
|
@@ -20,13 +23,16 @@ import { runEscapeHatchRetention } from "./run-escape-hatch-retention.js";
|
|
|
20
23
|
// framework).
|
|
21
24
|
export function createAuditFeature() {
|
|
22
25
|
return defineFeature("audit", (r) => {
|
|
23
|
-
r.describe("Exposes the framework's event store as a paginated, filterable audit log via the `audit:query:list` handler (accessible to `Admin` and `SystemAdmin` roles). No separate table or projection \u2014 the event store is the audit trail by construction: every entity write already records who, when, what entity, and the event payload with PII stripped. A SystemAdmin can pass `scope: \"system\"` to read the app-instance system events such as `app.started
|
|
26
|
+
r.describe("Exposes the framework's event store as a paginated, filterable audit log via the `audit:query:list` handler (accessible to `Admin` and `SystemAdmin` roles). No separate table or projection \u2014 the event store is the audit trail by construction: every entity write already records who, when, what entity, and the event payload with PII stripped. A SystemAdmin can pass `scope: \"system\"` to read the app-instance system events such as `app.started`, and reads the events of every tenant (system tenant excluded) through `audit:query:list-all-tenants` and the `audit-log-all-tenants` screen. Filter by `aggregateType`, `aggregateId`, `eventType`, `userId`, or time range. Also records `audit:event:escape-hatch-used` whenever a handler uses one of the framework's escape hatches (unsafeRaw, acknowledgeCrossTenant, db.global() writes, or a granted identity switch).");
|
|
24
27
|
r.uiHints({
|
|
25
28
|
displayLabel: "Audit Log",
|
|
26
29
|
category: "compliance",
|
|
27
30
|
recommended: false,
|
|
28
31
|
});
|
|
29
32
|
r.translations({ keys: AUDIT_I18N });
|
|
33
|
+
// The all-tenants queries read through ctx.systemDb.acknowledgeCrossTenant; the own-tenant
|
|
34
|
+
// queries use assertTenantMatch on the same handle.
|
|
35
|
+
r.systemScope();
|
|
30
36
|
r.requires({ features: ["tenant", "user", "config"] });
|
|
31
37
|
// Registered so ops tools/MSPs can discover the type — escape-hatch-audit-sink.ts appends it via the low-level event-store API.
|
|
32
38
|
r.defineEvent("escape-hatch-used", escapeHatchUsedSchema, { piiFields: "none" });
|
|
@@ -58,35 +64,17 @@ export function createAuditFeature() {
|
|
|
58
64
|
const queries = {
|
|
59
65
|
list: r.queryHandler(listQuery),
|
|
60
66
|
details: r.queryHandler(detailsQuery),
|
|
67
|
+
listAllTenants: r.queryHandler(listAllTenantsQuery),
|
|
68
|
+
detailsAllTenants: r.queryHandler(detailsAllTenantsQuery),
|
|
61
69
|
};
|
|
62
70
|
r.screen({
|
|
63
71
|
id: AUDIT_LOG_SCREEN_ID,
|
|
64
72
|
type: "projectionList",
|
|
65
73
|
query: AuditQueries.list,
|
|
66
|
-
columns:
|
|
67
|
-
{
|
|
68
|
-
field: "createdAt",
|
|
69
|
-
label: i18nKey("audit.log.col.when"),
|
|
70
|
-
renderer: { format: "timestamp" },
|
|
71
|
-
},
|
|
72
|
-
{ field: "type", label: i18nKey("audit.log.col.type") },
|
|
73
|
-
{
|
|
74
|
-
field: "createdBy",
|
|
75
|
-
label: i18nKey("audit.log.col.actor"),
|
|
76
|
-
refEntity: "user:user",
|
|
77
|
-
refLabelField: "displayName",
|
|
78
|
-
},
|
|
79
|
-
],
|
|
74
|
+
columns: AUDIT_LOG_COLUMNS,
|
|
80
75
|
searchable: true,
|
|
81
76
|
defaultSort: { field: "createdAt", dir: "desc" },
|
|
82
|
-
facets: [
|
|
83
|
-
{
|
|
84
|
-
type: "dateRange",
|
|
85
|
-
field: "createdAt",
|
|
86
|
-
label: i18nKey("audit.log.col.when"),
|
|
87
|
-
params: { from: "from", to: "to" },
|
|
88
|
-
},
|
|
89
|
-
],
|
|
77
|
+
facets: [AUDIT_LOG_DATE_RANGE_FACET],
|
|
90
78
|
rowActions: [
|
|
91
79
|
{
|
|
92
80
|
kind: "navigate",
|
|
@@ -98,7 +86,7 @@ export function createAuditFeature() {
|
|
|
98
86
|
},
|
|
99
87
|
],
|
|
100
88
|
pagination: "infinite",
|
|
101
|
-
description: "
|
|
89
|
+
description: "audit.log.description",
|
|
102
90
|
access: { roles: access.admin },
|
|
103
91
|
});
|
|
104
92
|
r.screen({
|
|
@@ -106,43 +94,47 @@ export function createAuditFeature() {
|
|
|
106
94
|
type: "projectionDetail",
|
|
107
95
|
query: AuditQueries.details,
|
|
108
96
|
idParam: "id",
|
|
109
|
-
fieldLabels:
|
|
110
|
-
|
|
111
|
-
createdAt: i18nKey("audit.log.col.when"),
|
|
112
|
-
aggregateType: i18nKey("audit.log.col.aggregateType"),
|
|
113
|
-
aggregateId: i18nKey("audit.log.col.aggregateId"),
|
|
114
|
-
createdBy: i18nKey("audit.log.col.actor"),
|
|
115
|
-
id: i18nKey("audit.log.detail.field.id"),
|
|
116
|
-
payload: i18nKey("audit.log.detail.payload"),
|
|
117
|
-
metadata: i18nKey("audit.log.detail.metadata"),
|
|
118
|
-
},
|
|
119
|
-
layout: {
|
|
120
|
-
sections: [
|
|
121
|
-
{
|
|
122
|
-
fields: [
|
|
123
|
-
"type",
|
|
124
|
-
{ field: "createdAt", renderer: { format: "timestamp" } },
|
|
125
|
-
"aggregateType",
|
|
126
|
-
"aggregateId",
|
|
127
|
-
{ field: "createdBy", refEntity: "user:user", refLabelField: "displayName" },
|
|
128
|
-
"id",
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
// No section `title` here (fw#2312 label-dedup fix): each section
|
|
132
|
-
// holds exactly one field, so a title would repeat the field's own
|
|
133
|
-
// label (rendered by RenderField as the Field's heading) verbatim.
|
|
134
|
-
{
|
|
135
|
-
fields: [{ field: "payload", renderer: { format: "json" } }],
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
fields: [{ field: "metadata", renderer: { format: "json" } }],
|
|
139
|
-
},
|
|
140
|
-
],
|
|
141
|
-
},
|
|
97
|
+
fieldLabels: AUDIT_LOG_DETAIL_FIELD_LABELS,
|
|
98
|
+
layout: auditLogDetailLayout({ withTenant: false }),
|
|
142
99
|
description: "audit.log.detail.subtitle",
|
|
143
100
|
listScreenId: AUDIT_LOG_SCREEN_ID,
|
|
144
101
|
access: { roles: access.admin },
|
|
145
102
|
});
|
|
103
|
+
r.screen({
|
|
104
|
+
id: AUDIT_LOG_ALL_TENANTS_SCREEN_ID,
|
|
105
|
+
type: "projectionList",
|
|
106
|
+
query: AuditQueries.listAllTenants,
|
|
107
|
+
columns: AUDIT_LOG_ALL_TENANTS_COLUMNS,
|
|
108
|
+
defaultSort: { field: "createdAt", dir: "desc" },
|
|
109
|
+
facets: [AUDIT_LOG_DATE_RANGE_FACET, AUDIT_LOG_TENANT_FACET],
|
|
110
|
+
rowActions: [
|
|
111
|
+
{
|
|
112
|
+
kind: "navigate",
|
|
113
|
+
id: "details",
|
|
114
|
+
label: i18nKey("audit.log.details"),
|
|
115
|
+
screen: AUDIT_LOG_ALL_TENANTS_DETAIL_SCREEN_ID,
|
|
116
|
+
entityId: "id",
|
|
117
|
+
rowClick: true,
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
pagination: "infinite",
|
|
121
|
+
description: "audit.log.allTenants.description",
|
|
122
|
+
access: { roles: access.systemAdmin },
|
|
123
|
+
});
|
|
124
|
+
r.screen({
|
|
125
|
+
id: AUDIT_LOG_ALL_TENANTS_DETAIL_SCREEN_ID,
|
|
126
|
+
type: "projectionDetail",
|
|
127
|
+
query: AuditQueries.detailsAllTenants,
|
|
128
|
+
idParam: "id",
|
|
129
|
+
fieldLabels: {
|
|
130
|
+
...AUDIT_LOG_DETAIL_FIELD_LABELS,
|
|
131
|
+
tenantId: i18nKey("audit.log.col.tenant"),
|
|
132
|
+
},
|
|
133
|
+
layout: auditLogDetailLayout({ withTenant: true }),
|
|
134
|
+
description: "audit.log.detail.subtitle",
|
|
135
|
+
listScreenId: AUDIT_LOG_ALL_TENANTS_SCREEN_ID,
|
|
136
|
+
access: { roles: access.systemAdmin },
|
|
137
|
+
});
|
|
146
138
|
r.nav({
|
|
147
139
|
id: "audit-log",
|
|
148
140
|
label: "audit:nav.auditLog",
|
|
@@ -150,6 +142,13 @@ export function createAuditFeature() {
|
|
|
150
142
|
screen: "audit:screen:audit-log",
|
|
151
143
|
order: 30,
|
|
152
144
|
});
|
|
145
|
+
r.nav({
|
|
146
|
+
id: AUDIT_LOG_ALL_TENANTS_NAV_ID,
|
|
147
|
+
label: "audit:nav.auditLogAllTenants",
|
|
148
|
+
icon: "file",
|
|
149
|
+
screen: "audit:screen:audit-log-all-tenants",
|
|
150
|
+
order: 31,
|
|
151
|
+
});
|
|
153
152
|
return { queries };
|
|
154
153
|
}, { dedupeOptions: {} });
|
|
155
154
|
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type TenantDb, type WhereObject } from "@cosmicdrift/kumiko-framework/db";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
export declare const auditListPayloadShape: {
|
|
4
|
+
readonly cursor: z.ZodOptional<z.ZodString>;
|
|
5
|
+
readonly before: z.ZodOptional<z.ZodString>;
|
|
6
|
+
readonly search: z.ZodOptional<z.ZodString>;
|
|
7
|
+
readonly limit: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
readonly aggregateType: z.ZodOptional<z.ZodString>;
|
|
9
|
+
readonly aggregateId: z.ZodOptional<z.ZodUUID>;
|
|
10
|
+
readonly eventType: z.ZodOptional<z.ZodString>;
|
|
11
|
+
readonly userId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
readonly sort: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
createdAt: "createdAt";
|
|
14
|
+
type: "type";
|
|
15
|
+
}>>;
|
|
16
|
+
readonly sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
asc: "asc";
|
|
18
|
+
desc: "desc";
|
|
19
|
+
}>>;
|
|
20
|
+
readonly from: z.ZodOptional<z.ZodISODateTime>;
|
|
21
|
+
readonly to: z.ZodOptional<z.ZodISODateTime>;
|
|
22
|
+
};
|
|
23
|
+
export declare const auditEventIdSchema: z.ZodString;
|
|
24
|
+
export declare const AUDIT_DATE_RANGE_CHECK: {
|
|
25
|
+
isValid: (v: {
|
|
26
|
+
from?: string | undefined;
|
|
27
|
+
to?: string | undefined;
|
|
28
|
+
}) => boolean;
|
|
29
|
+
params: {
|
|
30
|
+
message: string;
|
|
31
|
+
path: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type AuditListFilters = {
|
|
35
|
+
aggregateType?: string | undefined;
|
|
36
|
+
aggregateId?: string | undefined;
|
|
37
|
+
eventType?: string | undefined;
|
|
38
|
+
search?: string | undefined;
|
|
39
|
+
userId?: string | undefined;
|
|
40
|
+
from?: string | undefined;
|
|
41
|
+
to?: string | undefined;
|
|
42
|
+
cursor?: string | undefined;
|
|
43
|
+
before?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
/** `tenantCondition` is a tenant id, or an operator object for reads across tenants. */
|
|
46
|
+
export declare function buildAuditWhere(tenantCondition: unknown, p: AuditListFilters, direction: "asc" | "desc"): WhereObject;
|
|
47
|
+
type AuditEventRow = {
|
|
48
|
+
id: bigint;
|
|
49
|
+
tenantId: string;
|
|
50
|
+
aggregateId: string;
|
|
51
|
+
aggregateType: string;
|
|
52
|
+
version: number;
|
|
53
|
+
type: string;
|
|
54
|
+
payload: Record<string, unknown>;
|
|
55
|
+
metadata: Record<string, unknown>;
|
|
56
|
+
createdAt: unknown;
|
|
57
|
+
createdBy: string;
|
|
58
|
+
};
|
|
59
|
+
export declare function serializeAuditEvent(r: AuditEventRow): {
|
|
60
|
+
id: string;
|
|
61
|
+
tenantId: string;
|
|
62
|
+
aggregateId: string;
|
|
63
|
+
aggregateType: string;
|
|
64
|
+
version: number;
|
|
65
|
+
type: string;
|
|
66
|
+
payload: unknown;
|
|
67
|
+
metadata: unknown;
|
|
68
|
+
createdAt: unknown;
|
|
69
|
+
createdBy: string;
|
|
70
|
+
};
|
|
71
|
+
export declare function loadAuditEvent(db: TenantDb, where: WhereObject): Promise<{
|
|
72
|
+
id: string;
|
|
73
|
+
tenantId: string;
|
|
74
|
+
aggregateId: string;
|
|
75
|
+
aggregateType: string;
|
|
76
|
+
version: number;
|
|
77
|
+
type: string;
|
|
78
|
+
payload: unknown;
|
|
79
|
+
metadata: unknown;
|
|
80
|
+
createdAt: unknown;
|
|
81
|
+
createdBy: string;
|
|
82
|
+
} | null>;
|
|
83
|
+
export declare function listAuditEvents(db: TenantDb, where: WhereObject, p: {
|
|
84
|
+
limit: number;
|
|
85
|
+
sort?: "createdAt" | "type" | undefined;
|
|
86
|
+
}, direction: "asc" | "desc"): Promise<{
|
|
87
|
+
rows: {
|
|
88
|
+
id: string;
|
|
89
|
+
tenantId: string;
|
|
90
|
+
aggregateId: string;
|
|
91
|
+
aggregateType: string;
|
|
92
|
+
version: number;
|
|
93
|
+
type: string;
|
|
94
|
+
payload: unknown;
|
|
95
|
+
metadata: unknown;
|
|
96
|
+
createdAt: unknown;
|
|
97
|
+
createdBy: string;
|
|
98
|
+
}[];
|
|
99
|
+
nextCursor: string | null;
|
|
100
|
+
nextBefore: string | null;
|
|
101
|
+
}>;
|
|
102
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Query building and row mapping shared by every audit read handler, so the own-tenant
|
|
2
|
+
// and the all-tenants variants cannot drift apart. The tenant condition is the only part
|
|
3
|
+
// that differs per handler and is passed in.
|
|
4
|
+
//
|
|
5
|
+
// Event payloads hold PII as subject-KMS ciphertext; it is replaced by
|
|
6
|
+
// REDACTED_PII_PLACEHOLDER before returning (payload and metadata), since the API leak guard refuses ciphertext.
|
|
7
|
+
import { selectMany } from "@cosmicdrift/kumiko-framework/db";
|
|
8
|
+
import { eventsTable } from "@cosmicdrift/kumiko-framework/event-store";
|
|
9
|
+
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
10
|
+
import * as z from "zod";
|
|
11
|
+
import { redactPiiCiphertext } from "../../shared/index.js";
|
|
12
|
+
const MAX_LIMIT = 100;
|
|
13
|
+
// At most 18 digits keeps the id inside bigint, so an oversized cursor or id is a 422, not a 500.
|
|
14
|
+
const CURSOR_PATTERN = /^\d{1,18}$/;
|
|
15
|
+
export const auditListPayloadShape = {
|
|
16
|
+
cursor: z.string().regex(CURSOR_PATTERN, "cursor must be a positive integer").optional(),
|
|
17
|
+
before: z.string().regex(CURSOR_PATTERN, "cursor must be a positive integer").optional(),
|
|
18
|
+
search: z.string().trim().optional(),
|
|
19
|
+
limit: z.number().int().min(1).max(MAX_LIMIT).default(50),
|
|
20
|
+
aggregateType: z.string().optional(),
|
|
21
|
+
aggregateId: z.uuid().optional(),
|
|
22
|
+
eventType: z.string().optional(),
|
|
23
|
+
userId: z.string().optional(),
|
|
24
|
+
sort: z.enum(["createdAt", "type"]).optional(),
|
|
25
|
+
sortDirection: z.enum(["asc", "desc"]).optional(),
|
|
26
|
+
from: z.iso.datetime().optional(),
|
|
27
|
+
to: z.iso.datetime().optional(),
|
|
28
|
+
};
|
|
29
|
+
export const auditEventIdSchema = z
|
|
30
|
+
.string()
|
|
31
|
+
.regex(/^[1-9]\d{0,17}$/, "id must be a positive integer");
|
|
32
|
+
export const AUDIT_DATE_RANGE_CHECK = {
|
|
33
|
+
isValid: (v) => !v.from || !v.to || v.from <= v.to,
|
|
34
|
+
params: {
|
|
35
|
+
message: "`from` must be less than or equal to `to`",
|
|
36
|
+
path: ["from"],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
function buildDateRange(from, to) {
|
|
40
|
+
if (!from && !to)
|
|
41
|
+
return null;
|
|
42
|
+
const range = {};
|
|
43
|
+
if (from)
|
|
44
|
+
range.gte = Temporal.Instant.from(from);
|
|
45
|
+
if (to)
|
|
46
|
+
range.lte = Temporal.Instant.from(to);
|
|
47
|
+
return range;
|
|
48
|
+
}
|
|
49
|
+
function escapeLikePattern(value) {
|
|
50
|
+
return value.replace(/[\\%_]/g, (m) => `\\${m}`);
|
|
51
|
+
}
|
|
52
|
+
/** `tenantCondition` is a tenant id, or an operator object for reads across tenants. */
|
|
53
|
+
export function buildAuditWhere(tenantCondition, p, direction) {
|
|
54
|
+
const where = { tenantId: tenantCondition };
|
|
55
|
+
if (p.aggregateType)
|
|
56
|
+
where["aggregateType"] = p.aggregateType;
|
|
57
|
+
if (p.aggregateId)
|
|
58
|
+
where["aggregateId"] = p.aggregateId;
|
|
59
|
+
if (p.eventType)
|
|
60
|
+
where["type"] = p.eventType;
|
|
61
|
+
else if (p.search)
|
|
62
|
+
where["type"] = { like: `%${escapeLikePattern(p.search)}%` };
|
|
63
|
+
if (p.userId)
|
|
64
|
+
where["createdBy"] = p.userId;
|
|
65
|
+
const range = buildDateRange(p.from, p.to);
|
|
66
|
+
if (range)
|
|
67
|
+
where["createdAt"] = range;
|
|
68
|
+
const cursor = p.cursor ?? p.before;
|
|
69
|
+
// The cursor is an event id, so it only walks pages in id order: ascending
|
|
70
|
+
// pages continue past it, descending pages stop before it.
|
|
71
|
+
if (cursor)
|
|
72
|
+
where["id"] = direction === "asc" ? { gt: BigInt(cursor) } : { lt: BigInt(cursor) };
|
|
73
|
+
return where;
|
|
74
|
+
}
|
|
75
|
+
export function serializeAuditEvent(r) {
|
|
76
|
+
return {
|
|
77
|
+
id: String(r.id),
|
|
78
|
+
tenantId: r.tenantId,
|
|
79
|
+
aggregateId: r.aggregateId,
|
|
80
|
+
aggregateType: r.aggregateType,
|
|
81
|
+
version: r.version,
|
|
82
|
+
type: r.type,
|
|
83
|
+
payload: redactPiiCiphertext(r.payload),
|
|
84
|
+
metadata: redactPiiCiphertext(r.metadata),
|
|
85
|
+
createdAt: r.createdAt,
|
|
86
|
+
createdBy: r.createdBy,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export async function loadAuditEvent(db, where) {
|
|
90
|
+
const rows = await selectMany(db, eventsTable, where, { limit: 1 });
|
|
91
|
+
const row = rows[0];
|
|
92
|
+
return row === undefined ? null : serializeAuditEvent(row);
|
|
93
|
+
}
|
|
94
|
+
export async function listAuditEvents(db, where, p, direction) {
|
|
95
|
+
const rows = await selectMany(db, eventsTable, where, {
|
|
96
|
+
// The id cursor only resumes an id-ordered listing. created_at comes from the
|
|
97
|
+
// transaction start and can run against insert order, so ordering by it would let
|
|
98
|
+
// a page boundary skip rows; only the type sort leaves id order (and is one page).
|
|
99
|
+
orderBy: p.sort === "type"
|
|
100
|
+
? [
|
|
101
|
+
{ col: "type", direction },
|
|
102
|
+
{ col: "id", direction },
|
|
103
|
+
]
|
|
104
|
+
: [{ col: "id", direction }],
|
|
105
|
+
limit: p.limit,
|
|
106
|
+
});
|
|
107
|
+
const serialised = rows.map(serializeAuditEvent);
|
|
108
|
+
const last = serialised[serialised.length - 1];
|
|
109
|
+
// An id cursor cannot resume a type-ordered listing, so that sort is one page.
|
|
110
|
+
const nextId = serialised.length === p.limit && last && p.sort !== "type" ? last.id : null;
|
|
111
|
+
return { rows: serialised, nextCursor: nextId, nextBefore: nextId };
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requireAuditSystemDb<TSystemDb>(systemDb: TSystemDb | undefined, handlerQn: string): TSystemDb;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
+
export function requireAuditSystemDb(systemDb, handlerQn) {
|
|
3
|
+
if (!systemDb) {
|
|
4
|
+
throw new InternalError({
|
|
5
|
+
message: `${handlerQn} requires ctx.systemDb — is r.systemScope() still set on the audit feature?`,
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
return systemDb;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const detailsAllTenantsQuery: import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"details-all-tenants", z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
}, z.core.$strip>, {
|
|
5
|
+
id: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
aggregateId: string;
|
|
8
|
+
aggregateType: string;
|
|
9
|
+
version: number;
|
|
10
|
+
type: string;
|
|
11
|
+
payload: unknown;
|
|
12
|
+
metadata: unknown;
|
|
13
|
+
createdAt: unknown;
|
|
14
|
+
createdBy: string;
|
|
15
|
+
} | null, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// One audit event of any tenant by its event-store id, for the all-tenants log's detail screen.
|
|
2
|
+
import { access, defineQueryHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
import { auditEventIdSchema, loadAuditEvent } from "./audit-events.js";
|
|
5
|
+
import { requireAuditSystemDb } from "./audit-system-db.js";
|
|
6
|
+
import { allTenantsCondition, assertMayReadAllTenants } from "./resolve-audit-tenant.js";
|
|
7
|
+
export const detailsAllTenantsQuery = defineQueryHandler({
|
|
8
|
+
name: "details-all-tenants",
|
|
9
|
+
description: "Returns one audit-trail event of any tenant by its event-store id, with full payload, metadata and tenantId; SystemAdmin only, system-tenant events are not included.",
|
|
10
|
+
schema: z.object({ id: auditEventIdSchema }),
|
|
11
|
+
access: { roles: access.systemAdmin },
|
|
12
|
+
handler: async (query, ctx) => {
|
|
13
|
+
assertMayReadAllTenants(query.user);
|
|
14
|
+
const db = requireAuditSystemDb(ctx.systemDb, "audit:query:details-all-tenants").acknowledgeCrossTenant("SystemAdmin reads one audit event of any tenant");
|
|
15
|
+
return loadAuditEvent(db, {
|
|
16
|
+
tenantId: allTenantsCondition(undefined),
|
|
17
|
+
id: BigInt(query.payload.id),
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -7,12 +7,13 @@ export declare const detailsQuery: import("@cosmicdrift/kumiko-types/define-hand
|
|
|
7
7
|
}>>;
|
|
8
8
|
}, z.core.$strip>, {
|
|
9
9
|
id: string;
|
|
10
|
+
tenantId: string;
|
|
10
11
|
aggregateId: string;
|
|
11
12
|
aggregateType: string;
|
|
12
13
|
version: number;
|
|
13
14
|
type: string;
|
|
14
15
|
payload: unknown;
|
|
15
|
-
metadata:
|
|
16
|
+
metadata: unknown;
|
|
16
17
|
createdAt: unknown;
|
|
17
18
|
createdBy: string;
|
|
18
19
|
} | null, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|