@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,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { mailT } from "@cosmicdrift/kumiko-framework/i18n";
|
|
3
3
|
import { escapeHtml, escapeHtmlAttr } from "@cosmicdrift/kumiko-renderer/headless";
|
|
4
|
-
import { DELIVERY_RESUBSCRIBE_PATH, DELIVERY_UNSUBSCRIBE_PATH } from "./public-names.js";
|
|
4
|
+
import { DELIVERY_RESUBSCRIBE_PATH, DELIVERY_UNSUBSCRIBE_PATH } from "./web/public-names.js";
|
|
5
5
|
import "./unsubscribe-page-strings.js";
|
|
6
6
|
// Same values as the in-code mail layout of renderer-mail-html, so the page reads as the mail's sequel.
|
|
7
7
|
const DEFAULT_ACCENT_COLOR = "#1f5468";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DELIVERY_CHANNEL_CELL_COMPONENT, DELIVERY_ERROR_CELL_COMPONENT, DELIVERY_FEATURE, DELIVERY_STATUS_CELL_COMPONENT, DELIVERY_TIME_CELL_COMPONENT, DELIVERY_TYPE_CELL_COMPONENT, } from "../public-names.js";
|
|
2
1
|
import { DeliveryChannelCell } from "./delivery-channel-cell.js";
|
|
3
2
|
import { DeliveryErrorCell } from "./delivery-error-cell.js";
|
|
4
3
|
import { DeliveryStatusCell } from "./delivery-status-cell.js";
|
|
5
4
|
import { DeliveryTimeCell } from "./delivery-time-cell.js";
|
|
6
5
|
import { DeliveryTypeCell } from "./delivery-type-cell.js";
|
|
6
|
+
import { DELIVERY_CHANNEL_CELL_COMPONENT, DELIVERY_ERROR_CELL_COMPONENT, DELIVERY_FEATURE, DELIVERY_STATUS_CELL_COMPONENT, DELIVERY_TIME_CELL_COMPONENT, DELIVERY_TYPE_CELL_COMPONENT, } from "./public-names.js";
|
|
7
7
|
export function deliveryClient(options) {
|
|
8
8
|
return {
|
|
9
9
|
name: DELIVERY_FEATURE,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// Column-renderer for the delivery-log screen's status column, registered
|
|
4
3
|
// via `deliveryClient()`'s `columnRenderers` map (screen.columns[].renderer
|
|
5
4
|
// in feature.ts). The list frame itself is the generic declarative
|
|
@@ -7,7 +6,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
6
|
import { useTranslation } from "@cosmicdrift/kumiko-renderer";
|
|
8
7
|
import { StatusBadge } from "@cosmicdrift/kumiko-renderer/web";
|
|
9
8
|
import { translateOrRaw } from "../../shared/web/translate-or-raw.js";
|
|
10
|
-
import { DeliveryStatus } from "
|
|
9
|
+
import { DeliveryStatus } from "./public-names.js";
|
|
11
10
|
const STATUS_TONE = {
|
|
12
11
|
[DeliveryStatus.sent]: "ok",
|
|
13
12
|
[DeliveryStatus.failed]: "bad",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
export declare const DOCUMENT_INGEST_AGGREGATE_TYPE = "document-ingest";
|
|
3
|
+
export declare const DOCUMENT_EXTRACT_AGGREGATE_TYPE = "document-extract";
|
|
3
4
|
export declare const DOCUMENT_INGEST_REQUESTED_EVENT_SHORT: "documentIngest.requested";
|
|
4
5
|
export declare const DOCUMENT_INGEST_REQUESTED_EVENT_QN: "document-ingest-foundation:event:document-ingest-requested";
|
|
5
6
|
export declare const documentIngestRequestedPayloadSchema: z.ZodObject<{
|
|
@@ -6,6 +6,9 @@ import * as z from "zod";
|
|
|
6
6
|
// this is a pure saga-anchor event (kumiko-framework#1497) that the Phase-2
|
|
7
7
|
// worker job (kumiko-enterprise LiteParse provider) subscribes to.
|
|
8
8
|
export const DOCUMENT_INGEST_AGGREGATE_TYPE = "document-ingest";
|
|
9
|
+
// Stream name of stored extract events; differs from the camelCase r.entity name
|
|
10
|
+
// "documentExtract", so the projection replays this stream through an extension.
|
|
11
|
+
export const DOCUMENT_EXTRACT_AGGREGATE_TYPE = "document-extract";
|
|
9
12
|
export const DOCUMENT_INGEST_REQUESTED_EVENT_SHORT = "documentIngest.requested";
|
|
10
13
|
// Qualified name — what ctx.unsafeAppendEvent's `type` actually needs
|
|
11
14
|
// (r.defineEvent registers under qn(toKebab(feature), "event",
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
// the entity's own inline projection (tenant-destroy-hook, forget-extract-with-file-ref).
|
|
4
4
|
import { createEventStoreExecutor } from "@cosmicdrift/kumiko-framework/db";
|
|
5
5
|
import { documentExtractEntity, documentExtractsTable } from "./entity.js";
|
|
6
|
-
|
|
6
|
+
import { DOCUMENT_EXTRACT_AGGREGATE_TYPE } from "./events.js";
|
|
7
|
+
export const documentExtractExecutor = createEventStoreExecutor(documentExtractsTable, documentExtractEntity, { entityName: DOCUMENT_EXTRACT_AGGREGATE_TYPE });
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
// Provider-driven PDF/Scan/Image → normalized-text ingest primitive. No
|
|
4
4
|
// hardcoded mime allowlist or size cap — providers register via
|
|
5
5
|
// EXT_DOCUMENT_INGEST_PROVIDER (see providers.ts).
|
|
6
|
-
import { entityEventName } from "@cosmicdrift/kumiko-framework/db";
|
|
6
|
+
import { applyEntityEvent, entityEventName } from "@cosmicdrift/kumiko-framework/db";
|
|
7
7
|
import { access, createTenantConfig, defineFeature, EXT_TENANT_DATA, } from "@cosmicdrift/kumiko-framework/engine";
|
|
8
8
|
import { normalizeMimeType } from "@cosmicdrift/kumiko-framework/files";
|
|
9
9
|
import * as z from "zod";
|
|
10
10
|
import { documentIngestAggregateId } from "./aggregate-id.js";
|
|
11
11
|
import { validateDocumentIngestProviderWiring } from "./boot-checks.js";
|
|
12
|
-
import { documentExtractEntity } from "./entity.js";
|
|
13
|
-
import { DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.js";
|
|
12
|
+
import { documentExtractEntity, documentExtractsTable } from "./entity.js";
|
|
13
|
+
import { DOCUMENT_EXTRACT_AGGREGATE_TYPE, DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.js";
|
|
14
14
|
import { forgetExtractOnFileRefDeletedHook, forgetExtractOnFileRefForgottenHook, forgetOrphanedDocumentExtractHook, } from "./forget-extract-with-file-ref.js";
|
|
15
15
|
import { EXT_DOCUMENT_INGEST_PROVIDER, resolveDocumentIngestProviders, UNCLAIMED_PROVIDER_SENTINEL, } from "./providers.js";
|
|
16
16
|
import { documentExtractTenantDestroyHook } from "./tenant-destroy-hook.js";
|
|
@@ -19,9 +19,9 @@ const FILE_REF_CREATED = entityEventName("fileRef", "created");
|
|
|
19
19
|
const FILE_REF_RESTORED = entityEventName("fileRef", "restored");
|
|
20
20
|
const FILE_REF_DELETED = entityEventName("fileRef", "deleted");
|
|
21
21
|
const FILE_REF_FORGOTTEN = entityEventName("fileRef", "forgotten");
|
|
22
|
-
// Executors write under
|
|
22
|
+
// Executors write under DOCUMENT_EXTRACT_AGGREGATE_TYPE (executor.ts), not the
|
|
23
23
|
// camelCase r.entity() name — the event type follows the executor.
|
|
24
|
-
const DOCUMENT_EXTRACT_CREATED = entityEventName(
|
|
24
|
+
const DOCUMENT_EXTRACT_CREATED = entityEventName(DOCUMENT_EXTRACT_AGGREGATE_TYPE, "created");
|
|
25
25
|
// Missing/invalid fields → skip, never cast — a bad size would otherwise
|
|
26
26
|
// pass a provider's maxFileBytes comparison and dead-letter the consumer.
|
|
27
27
|
// Shared by fileRef.created (the entity fields directly) and fileRef.restored
|
|
@@ -96,6 +96,17 @@ export function createDocumentIngestFoundationFeature() {
|
|
|
96
96
|
r.useExtension(EXT_TENANT_DATA, "documentExtract", {
|
|
97
97
|
destroy: documentExtractTenantDestroyHook,
|
|
98
98
|
});
|
|
99
|
+
// The implicit projection listens for "documentExtract.*"; stored events are
|
|
100
|
+
// "document-extract.*", so a rebuild would otherwise drop every extract row.
|
|
101
|
+
r.extendEntityProjection("documentExtract", {
|
|
102
|
+
sources: [DOCUMENT_EXTRACT_AGGREGATE_TYPE],
|
|
103
|
+
apply: Object.fromEntries(["created", "updated", "deleted", "forgotten"].map((verb) => [
|
|
104
|
+
entityEventName(DOCUMENT_EXTRACT_AGGREGATE_TYPE, verb),
|
|
105
|
+
async (event, tx) => {
|
|
106
|
+
await applyEntityEvent(event, documentExtractsTable, documentExtractEntity, tx);
|
|
107
|
+
},
|
|
108
|
+
])),
|
|
109
|
+
});
|
|
99
110
|
// No onRegister: resolution happens at boot and per-apply, not on register.
|
|
100
111
|
r.extendsRegistrar(EXT_DOCUMENT_INGEST_PROVIDER, {});
|
|
101
112
|
r.bootCheck(({ features }) => validateDocumentIngestProviderWiring(features));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { documentIngestAggregateId } from "./aggregate-id.ts";
|
|
2
2
|
export { type DocumentExtractMeta, documentExtractEntity, documentExtractsTable, type IngestPage, } from "./entity.ts";
|
|
3
|
-
export { DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, type DocumentIngestRequestedPayload, type DocumentIngestSkippedPayload, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.ts";
|
|
3
|
+
export { DOCUMENT_EXTRACT_AGGREGATE_TYPE, DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, type DocumentIngestRequestedPayload, type DocumentIngestSkippedPayload, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.ts";
|
|
4
4
|
export { createDocumentIngestFoundationFeature } from "./feature.ts";
|
|
5
5
|
export { readIngestPages, writeIngestPages } from "./pages.ts";
|
|
6
6
|
export { type DocumentIngestProviderOptions, documentIngestProviderOptionsSchema, documentIngestProviderTrigger, EXT_DOCUMENT_INGEST_PROVIDER, listIngestibleMimeTypes, type ResolvedDocumentIngestProvider, resolveDocumentIngestProviders, } from "./providers.ts";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Public API of the document-ingest-foundation bundled-feature.
|
|
2
2
|
export { documentIngestAggregateId } from "./aggregate-id.js";
|
|
3
3
|
export { documentExtractEntity, documentExtractsTable, } from "./entity.js";
|
|
4
|
-
export { DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.js";
|
|
4
|
+
export { DOCUMENT_EXTRACT_AGGREGATE_TYPE, DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.js";
|
|
5
5
|
export { createDocumentIngestFoundationFeature } from "./feature.js";
|
|
6
6
|
export { readIngestPages, writeIngestPages } from "./pages.js";
|
|
7
7
|
export { documentIngestProviderOptionsSchema, documentIngestProviderTrigger, EXT_DOCUMENT_INGEST_PROVIDER, listIngestibleMimeTypes, resolveDocumentIngestProviders, } from "./providers.js";
|
|
@@ -4,7 +4,7 @@ export type FeatureTogglesOptions = {
|
|
|
4
4
|
readonly getRuntime?: () => GlobalFeatureToggleRuntime;
|
|
5
5
|
};
|
|
6
6
|
export declare function createFeatureTogglesFeature(options?: FeatureTogglesOptions): FeatureDefinition;
|
|
7
|
-
export { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors } from "./constants.ts";
|
|
8
7
|
export { globalFeatureStateTable, globalFeatureStateTableMeta, } from "./global-feature-state-table.ts";
|
|
9
8
|
export { createFeatureToggleRuntime, GlobalFeatureToggleRuntime, type ToggleSyncSignal, } from "./toggle-runtime.ts";
|
|
10
9
|
export { createRedisToggleSyncSignal, type RedisToggleSyncSignal } from "./toggle-sync-signal.ts";
|
|
10
|
+
export { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors } from "./web/constants.ts";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./constants.js";
|
|
3
2
|
import { featureToggleSetSchema } from "./events.js";
|
|
4
3
|
import { globalFeatureStateTableMeta } from "./global-feature-state-table.js";
|
|
5
4
|
import { listQuery } from "./handlers/list.query.js";
|
|
6
5
|
import { registeredQuery } from "./handlers/registered.query.js";
|
|
7
6
|
import { createSetWriteHandler } from "./handlers/set.write.js";
|
|
8
7
|
import { FEATURE_TOGGLES_I18N } from "./i18n.js";
|
|
8
|
+
import { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./web/constants.js";
|
|
9
9
|
export function createFeatureTogglesFeature(options = {}) {
|
|
10
10
|
return defineFeature("feature-toggles", (r) => {
|
|
11
11
|
r.describe('Persists per-feature enabled/disabled state in the `store_global_feature_state` table and exposes a `set` write-handler plus `list`/`registered` query-handlers so operators can flip features at runtime without redeploying. Each API instance keeps an in-memory `GlobalFeatureToggleRuntime` snapshot (initialize it via `createFeatureToggleRuntime`, pass a `() => runtime` accessor to `createFeatureTogglesFeature`) that the dispatcher gate reads on every request; a `toggle-cache-sync` multi-stream projection with `delivery: "shared"` syncs the snapshot across instances whenever a `toggle-set` event is appended.');
|
|
@@ -109,9 +109,9 @@ export function createFeatureTogglesFeature(options = {}) {
|
|
|
109
109
|
return { handlers, queries };
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
export { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors } from "./constants.js";
|
|
113
112
|
export { globalFeatureStateTable, globalFeatureStateTableMeta, } from "./global-feature-state-table.js";
|
|
114
113
|
// Re-export the runtime factory + class so app-boot code has a single
|
|
115
114
|
// import path: "@cosmicdrift/kumiko-bundled-features/feature-toggles".
|
|
116
115
|
export { createFeatureToggleRuntime, GlobalFeatureToggleRuntime, } from "./toggle-runtime.js";
|
|
117
116
|
export { createRedisToggleSyncSignal } from "./toggle-sync-signal.js";
|
|
117
|
+
export { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors } from "./web/constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineQueryHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { FEATURE_TOGGLE_CROSS_TENANT_REASON } from "../constants.js";
|
|
4
3
|
import { globalFeatureStateTable } from "../global-feature-state-table.js";
|
|
4
|
+
import { FEATURE_TOGGLE_CROSS_TENANT_REASON } from "../web/constants.js";
|
|
5
5
|
// List every row in the global_feature_state table — i.e. every feature
|
|
6
6
|
// that has ever been explicitly flipped. Features without a row aren't
|
|
7
7
|
// returned; callers must combine this with `registered` to see the full
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineQueryHandler, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { FEATURE_TOGGLE_CROSS_TENANT_REASON } from "../constants.js";
|
|
4
3
|
import { globalFeatureStateTable } from "../global-feature-state-table.js";
|
|
4
|
+
import { FEATURE_TOGGLE_CROSS_TENANT_REASON } from "../web/constants.js";
|
|
5
5
|
// Inventory of every registered feature, annotated with toggle metadata
|
|
6
6
|
// and the current effective state. This is the canonical "what's here,
|
|
7
7
|
// what's on, what depends on what" snapshot — the UI for the operator
|
|
@@ -3,8 +3,8 @@ import { defineWriteHandler, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framew
|
|
|
3
3
|
import { UnprocessableError, VersionConflictError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { FEATURE_TOGGLE_AGGREGATE_TYPE, FEATURE_TOGGLE_CROSS_TENANT_REASON, FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors, } from "../constants.js";
|
|
7
6
|
import { globalFeatureStateTable } from "../global-feature-state-table.js";
|
|
7
|
+
import { FEATURE_TOGGLE_AGGREGATE_TYPE, FEATURE_TOGGLE_CROSS_TENANT_REASON, FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors, } from "../web/constants.js";
|
|
8
8
|
// Factory: binds a runtime accessor to the handler at registration time.
|
|
9
9
|
// The runtime holds the in-memory snapshot that the dispatcher's gate
|
|
10
10
|
// reads; every successful set() call must update it, otherwise the flip
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { composeTierResolverWithGlobalToggles } from "./compose-tier-resolver.ts";
|
|
2
|
-
export { FEATURE_TOGGLES_FEATURE, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./constants.ts";
|
|
3
2
|
export { createFeatureToggleRuntime, createFeatureTogglesFeature, createRedisToggleSyncSignal, FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors, type FeatureTogglesOptions, GlobalFeatureToggleRuntime, globalFeatureStateTable, globalFeatureStateTableMeta, type RedisToggleSyncSignal, type ToggleSyncSignal, } from "./feature.ts";
|
|
3
|
+
export { FEATURE_TOGGLES_FEATURE, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./web/constants.ts";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { composeTierResolverWithGlobalToggles } from "./compose-tier-resolver.js";
|
|
2
|
-
export { FEATURE_TOGGLES_FEATURE, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./constants.js";
|
|
3
2
|
export { createFeatureToggleRuntime, createFeatureTogglesFeature, createRedisToggleSyncSignal, FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors, GlobalFeatureToggleRuntime, globalFeatureStateTable, globalFeatureStateTableMeta, } from "./feature.js";
|
|
3
|
+
export { FEATURE_TOGGLES_FEATURE, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./web/constants.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
import { mergeTranslations } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
-
import { FEATURE_TOGGLES_FEATURE } from "
|
|
2
|
+
import { FEATURE_TOGGLES_FEATURE } from "./constants.js";
|
|
4
3
|
import { defaultTranslations } from "./i18n.js";
|
|
5
4
|
export function featureTogglesClient(options) {
|
|
6
5
|
return {
|
package/dist/folders/feature.js
CHANGED
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
// no UI exposes it in v1 — folders-view guards cycles defensively).
|
|
17
17
|
import { defineEntityCreateHandler, defineEntityDetailHandler, defineEntityListHandler, defineEntityUpdateHandler, defineFeature, } from "@cosmicdrift/kumiko-framework/engine";
|
|
18
18
|
import { assertNoWhereRuleInOwnershipWrite } from "../shared/index.js";
|
|
19
|
-
import { DEFAULT_FOLDER_ACCESS, FOLDERS_FEATURE_NAME } from "./constants.js";
|
|
20
19
|
import { createFolderAssignmentEntity, folderEntity } from "./entity.js";
|
|
21
20
|
import { createClearFolderHandler } from "./handlers/clear-folder.write.js";
|
|
22
21
|
import { createDeleteFolderHandler } from "./handlers/delete-folder.write.js";
|
|
23
22
|
import { createSetFolderHandler } from "./handlers/set-folder.write.js";
|
|
23
|
+
import { DEFAULT_FOLDER_ACCESS, FOLDERS_FEATURE_NAME } from "./web/constants.js";
|
|
24
24
|
function registerFolders(r, access, toggleable, ownership, parents) {
|
|
25
25
|
r.describe("Generic, host-agnostic hierarchical folders for any entity. Owns two event-sourced entities — the per-tenant `folder` tree (`read_folders`, self-referential via parentId) and SINGLE-membership `folder-assignment` rows keyed by (entityType, entityId) (`read_folder_assignments`) — so filing an entity adds NO column to the host and needs no relational pivot or JOIN. The folder catalog uses the generic entity handlers (create, update [= rename, optimistic-locked], delete, list, detail); set-folder puts/moves an entity into a folder (one folder per entity) and clear-folder unfiles it (both idempotent). Read which folder an entity is in, or which entities a folder holds, by listing `folder-assignment` filtered on `entityId` or `folderId`. Every path uses one access rule — adopt the host's model with createFoldersFeature({ access: { openToAll: { reason } } }) or pin roles. Pass { toggleable: { default: false } } to make the whole feature tier-gatable via the tier-engine (no host hook).");
|
|
26
26
|
r.uiHints({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { denyUnlessJoinRowParentVisible } from "../../shared/index.js";
|
|
2
2
|
import { folderAssignmentAggregateId } from "../aggregate-id.js";
|
|
3
|
-
import { DEFAULT_FOLDER_ACCESS } from "../constants.js";
|
|
4
3
|
import { folderAssignmentExecutor } from "../executor.js";
|
|
5
4
|
import { clearFolderPayloadSchema } from "../schemas.js";
|
|
5
|
+
import { DEFAULT_FOLDER_ACCESS } from "../web/constants.js";
|
|
6
6
|
// clear-folder — removes a host entity from its folder (back to "unfiled").
|
|
7
7
|
// Idempotent: clearing an entity that isn't in any folder is already the
|
|
8
8
|
// requested end state, so we pre-check and return success without a delete.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UnprocessableError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { hostRowIsGone } from "../../shared/index.js";
|
|
4
|
-
import { DEFAULT_FOLDER_ACCESS } from "../constants.js";
|
|
5
4
|
import { folderAssignmentExecutor, folderExecutor } from "../executor.js";
|
|
5
|
+
import { DEFAULT_FOLDER_ACCESS } from "../web/constants.js";
|
|
6
6
|
const deleteFolderPayloadSchema = z.object({ id: z.uuid() });
|
|
7
7
|
// delete-folder — the UI's folder-manager only blocks deleting a folder that
|
|
8
8
|
// still has CHILD folders; it never checks folder-assignments. A leaf folder
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NotFoundError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
2
|
import { denyUnlessJoinRowParentVisible } from "../../shared/index.js";
|
|
3
3
|
import { folderAssignmentAggregateId } from "../aggregate-id.js";
|
|
4
|
-
import { DEFAULT_FOLDER_ACCESS } from "../constants.js";
|
|
5
4
|
import { folderAssignmentExecutor, folderExecutor } from "../executor.js";
|
|
6
5
|
import { setFolderPayloadSchema } from "../schemas.js";
|
|
6
|
+
import { DEFAULT_FOLDER_ACCESS } from "../web/constants.js";
|
|
7
7
|
// set-folder — puts a host entity into a folder. Single-membership: the
|
|
8
8
|
// assignment id is deterministic over (tenant, entity) WITHOUT folderId, so an
|
|
9
9
|
// entity has exactly one assignment and setting a different folder MOVES it.
|
package/dist/folders/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { folderAssignmentAggregateId } from "./aggregate-id.ts";
|
|
2
|
-
export { DEFAULT_FOLDER_ACCESS, DEFAULT_FOLDER_ROLES, FOLDER_SECTION_EXTENSION_NAME, FOLDERS_FEATURE_NAME, FoldersHandlers, FoldersQueries, } from "./constants.ts";
|
|
3
2
|
export { folderAssignmentEntity, folderEntity } from "./entity.ts";
|
|
4
3
|
export { createFoldersFeature, type FoldersFeatureOptions, } from "./feature.ts";
|
|
5
4
|
export { clearFolderHandler, createClearFolderHandler } from "./handlers/clear-folder.write.ts";
|
|
6
5
|
export { createSetFolderHandler, setFolderHandler } from "./handlers/set-folder.write.ts";
|
|
7
6
|
export { type ClearFolderPayload, clearFolderPayloadSchema, type SetFolderPayload, setFolderPayloadSchema, } from "./schemas.ts";
|
|
7
|
+
export { DEFAULT_FOLDER_ACCESS, DEFAULT_FOLDER_ROLES, FOLDER_SECTION_EXTENSION_NAME, FOLDERS_FEATURE_NAME, FoldersHandlers, FoldersQueries, } from "./web/constants.ts";
|
package/dist/folders/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { folderAssignmentAggregateId } from "./aggregate-id.js";
|
|
2
|
-
export { DEFAULT_FOLDER_ACCESS, DEFAULT_FOLDER_ROLES, FOLDER_SECTION_EXTENSION_NAME, FOLDERS_FEATURE_NAME, FoldersHandlers, FoldersQueries, } from "./constants.js";
|
|
3
2
|
export { folderAssignmentEntity, folderEntity } from "./entity.js";
|
|
4
3
|
export { createFoldersFeature, } from "./feature.js";
|
|
5
4
|
export { clearFolderHandler, createClearFolderHandler } from "./handlers/clear-folder.write.js";
|
|
6
5
|
export { createSetFolderHandler, setFolderHandler } from "./handlers/set-folder.write.js";
|
|
7
6
|
export { clearFolderPayloadSchema, setFolderPayloadSchema, } from "./schemas.js";
|
|
7
|
+
export { DEFAULT_FOLDER_ACCESS, DEFAULT_FOLDER_ROLES, FOLDER_SECTION_EXTENSION_NAME, FOLDERS_FEATURE_NAME, FoldersHandlers, FoldersQueries, } from "./web/constants.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { FOLDER_SECTION_EXTENSION_NAME, FOLDERS_FEATURE_NAME } from "../constants.js";
|
|
1
|
+
import { FOLDER_SECTION_EXTENSION_NAME, FOLDERS_FEATURE_NAME } from "./constants.js";
|
|
3
2
|
import { FolderSection } from "./folder-section.js";
|
|
4
3
|
import { defaultTranslations } from "./i18n.js";
|
|
5
4
|
export function foldersClient() {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// FolderManager — in-screen folder tree the user manages directly: create root
|
|
4
3
|
// folders + subfolders, rename, delete, collapse/expand. KPI-agnostic: a host
|
|
5
4
|
// passes `renderMeta` to hang its own per-folder badges (e.g. money-horse's
|
|
@@ -30,7 +29,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
30
29
|
import { useDispatcher, usePrimitives, useQuery, useTranslation, } from "@cosmicdrift/kumiko-renderer";
|
|
31
30
|
import { ChevronRight, File, Folder, Pencil, Plus, Trash2 } from "lucide-react";
|
|
32
31
|
import { useEffect, useState } from "react";
|
|
33
|
-
import { FoldersHandlers, FoldersQueries } from "
|
|
32
|
+
import { FoldersHandlers, FoldersQueries } from "./constants.js";
|
|
34
33
|
import { buildFolderTree } from "./tree.js";
|
|
35
34
|
const UNFILED = "__unfiled__";
|
|
36
35
|
const DRAG_MIME = "text/plain";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// FolderSection — drop-in single-folder picker for ANY entity. Unlike tags
|
|
4
3
|
// (many-to-many multi-combobox), an entity lives in exactly ONE folder, so this
|
|
5
4
|
// is a single-select combobox with a "no folder" option plus a compact row to
|
|
@@ -14,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
13
|
// (RenderEdit passes { entityName, entityId }).
|
|
15
14
|
import { useDispatcher, usePrimitives, useQuery, useTranslation, } from "@cosmicdrift/kumiko-renderer";
|
|
16
15
|
import { useState } from "react";
|
|
17
|
-
import { FoldersHandlers, FoldersQueries } from "
|
|
16
|
+
import { FoldersHandlers, FoldersQueries } from "./constants.js";
|
|
18
17
|
import { folderPath } from "./tree.js";
|
|
19
18
|
// Sentinel for the "no folder" combobox option — selecting it clears the
|
|
20
19
|
// assignment. Empty string can't collide with a folder id (uuid).
|
package/dist/folders/web/i18n.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FOLDER_SECTION_EXTENSION_NAME, FoldersHandlers, FoldersQueries } from "../constants.ts";
|
|
2
1
|
export { foldersClient } from "./client-plugin.tsx";
|
|
2
|
+
export { FOLDER_SECTION_EXTENSION_NAME, FoldersHandlers, FoldersQueries } from "./constants.ts";
|
|
3
3
|
export { type FolderFiling, type FolderLeaf, FolderManager } from "./folder-manager.tsx";
|
|
4
4
|
export { FolderSection } from "./folder-section.tsx";
|
|
5
5
|
export { buildFolderTree, type FolderNode, type FolderRow, folderPath } from "./tree.ts";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// @runtime client
|
|
2
|
-
export { FOLDER_SECTION_EXTENSION_NAME, FoldersHandlers, FoldersQueries } from "../constants.js";
|
|
3
1
|
export { foldersClient } from "./client-plugin.js";
|
|
2
|
+
export { FOLDER_SECTION_EXTENSION_NAME, FoldersHandlers, FoldersQueries } from "./constants.js";
|
|
4
3
|
export { FolderManager } from "./folder-manager.js";
|
|
5
4
|
export { FolderSection } from "./folder-section.js";
|
|
6
5
|
export { buildFolderTree, folderPath } from "./tree.js";
|
package/dist/folders/web/tree.js
CHANGED
|
@@ -7,9 +7,10 @@ export type StaleDraftRow = {
|
|
|
7
7
|
readonly tenantId: TenantId;
|
|
8
8
|
readonly ownerId: string;
|
|
9
9
|
readonly draftKey: string;
|
|
10
|
-
readonly draft: FormDraftBlob;
|
|
10
|
+
readonly draft: FormDraftBlob | null;
|
|
11
|
+
readonly draftUnreadable?: true;
|
|
11
12
|
readonly insertedAt: Temporal.Instant;
|
|
12
13
|
};
|
|
13
|
-
export declare function selectStaleDraftsBatch(db: DbConnection, olderThanDays: number, batchSize: number): Promise<readonly StaleDraftRow[]>;
|
|
14
|
+
export declare function selectStaleDraftsBatch(db: DbConnection, olderThanDays: number, batchSize: number, excludeIds?: readonly string[]): Promise<readonly StaleDraftRow[]>;
|
|
14
15
|
/** Re-check staleness after the select→release window so a freshly saved draft is not deleted. */
|
|
15
16
|
export declare function isDraftStillStale(db: DbConnection, tenantId: TenantId, id: string, olderThanDays: number): Promise<boolean>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { unsafeReadRetrying } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
3
|
+
import { readStoredDraft } from "../../decrypt-draft.js";
|
|
3
4
|
// COALESCE(modified_at, inserted_at) — a draft's "last touched" timestamp is
|
|
4
5
|
// modified_at once the upsert path (save.write.ts) has updated it at least
|
|
5
6
|
// once; a draft saved exactly once (create, never updated) has no
|
|
@@ -11,18 +12,26 @@ import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
|
11
12
|
// per-row via formDraftExecutor.delete (event-sourced, not raw SQL — a
|
|
12
13
|
// rebuild must not resurrect a "deleted" draft). Ordered oldest-first so a
|
|
13
14
|
// batch is a stable, deterministic slice across the two queries.
|
|
14
|
-
export async function selectStaleDraftsBatch(db, olderThanDays, batchSize) {
|
|
15
|
+
export async function selectStaleDraftsBatch(db, olderThanDays, batchSize, excludeIds = []) {
|
|
15
16
|
const rows = await unsafeReadRetrying(db, `SELECT "id", "tenant_id", "owner_id", "draft_key", "draft", "inserted_at" FROM "read_form_drafts"
|
|
16
17
|
WHERE COALESCE("modified_at", "inserted_at") < now() - ($1::int * interval '1 day')
|
|
18
|
+
AND NOT ("id"::text = ANY($3::text[]))
|
|
17
19
|
ORDER BY COALESCE("modified_at", "inserted_at") ASC
|
|
18
|
-
LIMIT $2`, [olderThanDays, batchSize]);
|
|
19
|
-
return rows.map((row) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
LIMIT $2`, [olderThanDays, batchSize, [...excludeIds]]);
|
|
21
|
+
return Promise.all(rows.map(async (row) => {
|
|
22
|
+
const base = {
|
|
23
|
+
id: row.id,
|
|
24
|
+
tenantId: row.tenant_id, // @cast-boundary db-row
|
|
25
|
+
ownerId: row.owner_id,
|
|
26
|
+
draftKey: row.draft_key,
|
|
27
|
+
insertedAt: Temporal.Instant.fromEpochMilliseconds(+row.inserted_at), // @cast-boundary db-row
|
|
28
|
+
};
|
|
29
|
+
try {
|
|
30
|
+
return { ...base, draft: await readStoredDraft(row.draft) };
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return { ...base, draft: null, draftUnreadable: true };
|
|
34
|
+
}
|
|
26
35
|
}));
|
|
27
36
|
}
|
|
28
37
|
/** Re-check staleness after the select→release window so a freshly saved draft is not deleted. */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { requestContext } from "@cosmicdrift/kumiko-framework/api";
|
|
2
|
+
import { configuredPiiSubjectKms, decryptPiiFieldValues, isPiiCiphertext, } from "@cosmicdrift/kumiko-framework/crypto";
|
|
3
|
+
import { formDraftBlobSchema } from "./schemas.js";
|
|
4
|
+
// Raw reads (fetchOne/selectMany/SQL) return the stored column, which is
|
|
5
|
+
// ciphertext once the owner's key exists. The field name is part of the AAD,
|
|
6
|
+
// so it must stay "draft". An erased owner yields the sentinel string, which
|
|
7
|
+
// fails the blob schema and reads as null (no usable draft).
|
|
8
|
+
export async function readStoredDraft(stored) {
|
|
9
|
+
let plain = stored;
|
|
10
|
+
const kms = configuredPiiSubjectKms();
|
|
11
|
+
if (isPiiCiphertext(stored) && kms) {
|
|
12
|
+
const out = await decryptPiiFieldValues({ draft: stored }, ["draft"], kms, {
|
|
13
|
+
requestId: requestContext.get()?.requestId ?? "form-draft:read",
|
|
14
|
+
});
|
|
15
|
+
plain = out["draft"];
|
|
16
|
+
}
|
|
17
|
+
const parsed = formDraftBlobSchema.safeParse(plain);
|
|
18
|
+
return parsed.success ? parsed.data : null;
|
|
19
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEntity, createJsonbField, createTextField, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { FORM_DRAFT_KEY_MAX_LENGTH, FORM_DRAFT_UNIQUE_KEY_CONSTRAINT } from "./constants.js";
|
|
2
|
+
import { FORM_DRAFT_KEY_MAX_LENGTH, FORM_DRAFT_UNIQUE_KEY_CONSTRAINT } from "./web/constants.js";
|
|
3
3
|
// form-draft — a per-user, pre-submission working copy of an in-progress
|
|
4
4
|
// form (e.g. a wizard-mode EditLayout). `draftKey` is caller-assigned
|
|
5
5
|
// (typically screenId + optional hostEntityId) and scoped to
|
|
@@ -32,14 +32,11 @@ export const formDraftEntity = createEntity({
|
|
|
32
32
|
// The blob shape is fixed by issue #1889, not left to the caller:
|
|
33
33
|
// { values: Record<string, unknown>, stepIndex: number, savedAt: string }.
|
|
34
34
|
// Free-form because `values` mirrors whatever fields the in-progress
|
|
35
|
-
// form has, so it can carry arbitrary user-entered PII.
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
// not crypto-shredding; `ownerId`'s `subjectRef` annotation alone
|
|
41
|
-
// already satisfies the GDPR-hook-coverage boot guard.
|
|
42
|
-
draft: createJsonbField(),
|
|
35
|
+
// form has, so it can carry arbitrary user-entered PII. Encrypted under
|
|
36
|
+
// the owner's key (jsonb ciphertext scalar in the row and in every event
|
|
37
|
+
// that carries it, `previous` of delete included), so forgetting the
|
|
38
|
+
// owner shreds all copies.
|
|
39
|
+
draft: createJsonbField({ personal: { of: "ownerId" } }),
|
|
43
40
|
},
|
|
44
41
|
// One draft per (tenant, owner, draftKey) — save() is an upsert keyed on
|
|
45
42
|
// this index (see handlers/save.write.ts); a resume query must find at
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
// savedAt } through save/discard/get. See entity.ts for the ownership +
|
|
6
6
|
// uniqueness model.
|
|
7
7
|
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
8
|
-
import { FORM_DRAFT_FEATURE_NAME } from "./constants.js";
|
|
9
8
|
import { formDraftEntity } from "./entity.js";
|
|
10
9
|
import { cleanupDraftsJob, formDraftRetentionDaysConfig } from "./handlers/cleanup.job.js";
|
|
11
10
|
import { discardDraftWrite } from "./handlers/discard.write.js";
|
|
12
11
|
import { getDraftQuery } from "./handlers/get.query.js";
|
|
13
12
|
import { listDraftsQuery } from "./handlers/list.query.js";
|
|
14
13
|
import { saveDraftWrite } from "./handlers/save.write.js";
|
|
14
|
+
import { FORM_DRAFT_FEATURE_NAME } from "./web/constants.js";
|
|
15
15
|
const CLEANUP_ESCAPE_HATCH_REASON = "purges stale drafts of every tenant";
|
|
16
16
|
function registerFormDraft(r) {
|
|
17
17
|
r.describe("Per-user, per-tenant working copy of an in-progress form, saved BEFORE the real domain entity exists. Owns one event-sourced entity, `form-draft` (`read_form_drafts`), keyed by a caller-assigned draftKey (typically screenId + optional hostEntityId), unique per (tenant, owner, draftKey). `save` upserts the draft blob ({ values, stepIndex, savedAt } — savedAt stamped server-side), `discard` deletes it (called once the real submit succeeds), `get` resumes it, `list` finds a user's open drafts for a given screenId (draftKey prefix match) — the fallback when a client-generated draftId is lost. Ownership is enforced by a per-row owner filter in every handler, not by roles — a foreign user's save/discard/get/list for someone else's draftKey never sees or touches that row. Never holds anything that already lives in a domain stream; the consuming app is responsible for discarding once the domain write succeeds. A daily cron job hard-deletes drafts past a configurable retention window (`form-draft:config:retention-days`, SystemAdmin-writable, default 30 days).");
|
|
@@ -8,5 +8,6 @@ export declare function groupStaleDraftIdsByTenant(batch: readonly StaleDraftRow
|
|
|
8
8
|
export declare function deleteStaleDraftsBatch(batch: readonly StaleDraftRow[], db: DbConnection, retentionDays: number, log: AppContext["log"]): Promise<{
|
|
9
9
|
readonly deletedRows: readonly StaleDraftRow[];
|
|
10
10
|
readonly skippedCount: number;
|
|
11
|
+
readonly deferredIds: readonly string[];
|
|
11
12
|
}>;
|
|
12
13
|
export declare function cleanupDraftsJob(_payload: Record<string, unknown>, ctx: JobContext, db: DbConnection): Promise<void>;
|