@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,6 +1,6 @@
|
|
|
1
1
|
import type { TokenVerifier } from "@cosmicdrift/kumiko-framework/api";
|
|
2
2
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
3
|
-
import { type PatScopeConfig } from "./scopes.ts";
|
|
3
|
+
import { type PatScopeConfig } from "./web/scopes.ts";
|
|
4
4
|
export declare function createPatResolver(opts: {
|
|
5
5
|
readonly db: DbConnection;
|
|
6
6
|
readonly scopes: PatScopeConfig;
|
|
@@ -3,7 +3,7 @@ import { isExpiredAt } from "./expiry.js";
|
|
|
3
3
|
import { hashPatToken } from "./hash.js";
|
|
4
4
|
import { resolvePatRoles } from "./roles.js";
|
|
5
5
|
import { apiTokenTable } from "./schema/api-token.js";
|
|
6
|
-
import { expandScopes } from "./scopes.js";
|
|
6
|
+
import { expandScopes } from "./web/scopes.js";
|
|
7
7
|
// Hot-path resolver — raw-DB like session-callbacks (a dispatcher roundtrip on
|
|
8
8
|
// every request buys nothing here). Hash the bearer token, point-read the row,
|
|
9
9
|
// reject revoked/expired, resolve LIVE roles, expand granted scopes into
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { deriveEntityTableMeta } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { access, createEntity, createTextField, createTimestampField, } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { API_TOKEN_ENTITY_NAME } from "../constants.js";
|
|
3
|
+
import { API_TOKEN_ENTITY_NAME } from "../web/constants.js";
|
|
4
4
|
// One row per Personal Access Token. Like store_user_sessions this is a
|
|
5
5
|
// direct-write store (r.unmanagedTable): the create/revoke handlers write it and
|
|
6
6
|
// the resolver point-reads it on the hot auth path. `tokenHash` is the SHA-256
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ProjectionListScreenDefinition, type SecretMintScreenDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import type { PatScopeConfig } from "./scopes.ts";
|
|
2
|
+
import type { PatScopeConfig } from "./web/scopes.ts";
|
|
3
3
|
export declare const patListScreen: ProjectionListScreenDefinition;
|
|
4
4
|
export declare function patGrantOptions(scopes: PatScopeConfig): string[];
|
|
5
5
|
export declare function createPatMintScreen(scopes: PatScopeConfig): SecretMintScreenDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i18nKey, MAX_LIST_LIMIT, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { ACTION_FORM_ENTITY } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
3
3
|
import { fieldOptionLabelKeyPrefix } from "@cosmicdrift/kumiko-renderer/headless";
|
|
4
|
-
import { PAT_FEATURE, PAT_MINT_SCREEN_ID, PAT_SCREEN_ID, PatHandlers, PatQueries, } from "./constants.js";
|
|
4
|
+
import { PAT_FEATURE, PAT_MINT_SCREEN_ID, PAT_SCREEN_ID, PatHandlers, PatQueries, } from "./web/constants.js";
|
|
5
5
|
const PAT_STATUS_OPTION_KEY_PREFIX = "pat.list.status.";
|
|
6
6
|
// Same keys the mint form's `scopes` multiSelect options resolve through
|
|
7
7
|
// (see patScopeOptionTranslations), so list and form show identical labels.
|
package/dist/presets/index.d.ts
CHANGED
package/dist/presets/index.js
CHANGED
|
@@ -2,6 +2,6 @@ import type { FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
|
2
2
|
export type SecurityBaselineOptions = {
|
|
3
3
|
readonly includeSessions?: boolean;
|
|
4
4
|
};
|
|
5
|
-
/** @deprecated Removed in
|
|
5
|
+
/** @deprecated Removed in 0.390.0. Use `composeSecurityStack({ includeSessions })`
|
|
6
6
|
* from `@cosmicdrift/kumiko-dev-server/compose-stacks`. */
|
|
7
7
|
export declare function securityBaselineFeatures(opts?: SecurityBaselineOptions): FeatureDefinition[];
|
|
@@ -3,7 +3,7 @@ import { createCryptoShreddingFeature } from "../crypto-shredding/index.js";
|
|
|
3
3
|
import { createRateLimitingFeature } from "../rate-limiting/index.js";
|
|
4
4
|
import { createSessionsFeature } from "../sessions/index.js";
|
|
5
5
|
// Host app must mount user, tenant, auth-foundation (sessions/audit requires).
|
|
6
|
-
/** @deprecated Removed in
|
|
6
|
+
/** @deprecated Removed in 0.390.0. Use `composeSecurityStack({ includeSessions })`
|
|
7
7
|
* from `@cosmicdrift/kumiko-dev-server/compose-stacks`. */
|
|
8
8
|
export function securityBaselineFeatures(opts = {}) {
|
|
9
9
|
return [
|
package/dist/secrets/feature.js
CHANGED
|
@@ -3,7 +3,6 @@ import { featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
|
|
|
3
3
|
import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import { SETTINGS_HUB_I18N } from "@cosmicdrift/kumiko-framework/i18n";
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { DEFAULT_SECRETS_ACCESS } from "./constants.js";
|
|
7
6
|
import { createDeleteHandler } from "./handlers/delete.write.js";
|
|
8
7
|
import { createListHandler } from "./handlers/list.query.js";
|
|
9
8
|
import { rotateJob } from "./handlers/rotate.job.js";
|
|
@@ -11,6 +10,7 @@ import { createSetHandler } from "./handlers/set.write.js";
|
|
|
11
10
|
import { SECRETS_I18N } from "./i18n.js";
|
|
12
11
|
import { secretReadSchema } from "./secrets-context.js";
|
|
13
12
|
import { tenantSecretEntity, tenantSecretsTable } from "./table.js";
|
|
13
|
+
import { DEFAULT_SECRETS_ACCESS } from "./web/constants.js";
|
|
14
14
|
const ROTATE_ESCAPE_HATCH_REASON = "re-encrypts every tenant's secrets with the new master key";
|
|
15
15
|
/**
|
|
16
16
|
* Env-vars contract for the `secrets` feature. Apps merge this via
|
|
@@ -2,8 +2,8 @@ import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
|
2
2
|
import { failNotFound } from "@cosmicdrift/kumiko-framework/errors";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { announceSecretChange } from "../announce-secret-change.js";
|
|
5
|
-
import { DEFAULT_SECRETS_ACCESS, SecretsHandlers } from "../constants.js";
|
|
6
5
|
import { JOIN_REQUEST_TRANSACTION_REASON, requireSecretsContext } from "../feature.js";
|
|
6
|
+
import { DEFAULT_SECRETS_ACCESS, SecretsHandlers } from "../web/constants.js";
|
|
7
7
|
import { checkSecretKeyWrite } from "../write-gate.js";
|
|
8
8
|
export function createDeleteHandler(access = DEFAULT_SECRETS_ACCESS) {
|
|
9
9
|
return defineWriteHandler({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineQueryHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { DEFAULT_SECRETS_ACCESS } from "../constants.js";
|
|
4
3
|
import { tenantSecretsTable } from "../table.js";
|
|
4
|
+
import { DEFAULT_SECRETS_ACCESS } from "../web/constants.js";
|
|
5
5
|
// Lists all secrets for the current tenant. Returns redactedPreview, never
|
|
6
6
|
// the plaintext. Decryption would be pointless here anyway — this is the
|
|
7
7
|
// TenantAdmin UI, not feature code that needs the value.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { announceSecretChange } from "../announce-secret-change.js";
|
|
4
|
-
import { DEFAULT_SECRETS_ACCESS, SecretsHandlers } from "../constants.js";
|
|
5
4
|
import { JOIN_REQUEST_TRANSACTION_REASON, requireSecretsContext } from "../feature.js";
|
|
5
|
+
import { DEFAULT_SECRETS_ACCESS, SecretsHandlers } from "../web/constants.js";
|
|
6
6
|
import { checkSecretKeyWrite, checkSecretValue } from "../write-gate.js";
|
|
7
7
|
export function createSetHandler(access = DEFAULT_SECRETS_ACCESS) {
|
|
8
8
|
return defineWriteHandler({
|
package/dist/secrets/i18n.js
CHANGED
package/dist/secrets/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, SecretsHandlers, SecretsQueries, } from "./constants.ts";
|
|
2
1
|
export { createSecretsContext, createSecretsFeature, requireSecretsContext, SECRETS_FEATURE_NAME, SECRETS_MASTER_KEK_ENV_KEYS, type SecretsContext, type SecretsContextOptions, type SecretsFeatureOptions, type StoredEnvelope, type StoredMetadata, secretsEnvSchema, TENANT_SECRET_READ_EVENT, tenantSecretsTable, } from "./feature.ts";
|
|
3
2
|
export { createDeleteHandler } from "./handlers/delete.write.ts";
|
|
4
3
|
export { createListHandler } from "./handlers/list.query.ts";
|
|
5
4
|
export { type RotateJobPayload, type RotateJobResult, rotateJob, } from "./handlers/rotate.job.ts";
|
|
6
5
|
export { createSetHandler } from "./handlers/set.write.ts";
|
|
6
|
+
export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, SecretsHandlers, SecretsQueries, } from "./web/constants.ts";
|
|
7
7
|
export { isInvalidSecretValueError } from "./write-gate.ts";
|
package/dist/secrets/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, SecretsHandlers, SecretsQueries, } from "./constants.js";
|
|
2
1
|
export { createSecretsContext, createSecretsFeature, requireSecretsContext, SECRETS_FEATURE_NAME, SECRETS_MASTER_KEK_ENV_KEYS, secretsEnvSchema, TENANT_SECRET_READ_EVENT, tenantSecretsTable, } from "./feature.js";
|
|
3
2
|
export { createDeleteHandler } from "./handlers/delete.write.js";
|
|
4
3
|
export { createListHandler } from "./handlers/list.query.js";
|
|
5
4
|
export { rotateJob, } from "./handlers/rotate.job.js";
|
|
6
5
|
export { createSetHandler } from "./handlers/set.write.js";
|
|
6
|
+
export { DEFAULT_SECRETS_ACCESS, DEFAULT_SECRETS_ROLES, INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS, SecretsHandlers, SecretsQueries, } from "./web/constants.js";
|
|
7
7
|
export { isInvalidSecretValueError } from "./write-gate.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccessDeniedError, isKumikoError, NotFoundError, ValidationError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
-
import { INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS } from "./constants.js";
|
|
2
|
+
import { INVALID_SECRET_VALUE_CODE, SECRETS_ERROR_KEYS } from "./web/constants.js";
|
|
3
3
|
function unknownKeyFailure(key) {
|
|
4
4
|
return {
|
|
5
5
|
ok: false,
|
package/dist/sessions/feature.js
CHANGED
|
@@ -9,11 +9,11 @@ import { mineQuery } from "./handlers/mine.query.js";
|
|
|
9
9
|
import { revokeWrite } from "./handlers/revoke.write.js";
|
|
10
10
|
import { revokeAllForUserWrite } from "./handlers/revoke-all-for-user.write.js";
|
|
11
11
|
import { revokeAllOthersWrite } from "./handlers/revoke-all-others.write.js";
|
|
12
|
-
import { SESSIONS_I18N } from "./i18n.js";
|
|
13
12
|
import { userSessionEntity } from "./schema/user-session.js";
|
|
14
13
|
import { createSessionDetailScreen, createSessionListScreen, sessionMineScreen, } from "./screens.js";
|
|
15
14
|
import { createSessionCallbacks, } from "./session-callbacks.js";
|
|
16
15
|
import { SESSION_REVOKED_EVENT_SHORT, sessionRevokedSchema } from "./session-revoked-event.js";
|
|
16
|
+
import { SESSIONS_I18N } from "./web/i18n.js";
|
|
17
17
|
const CLEANUP_ESCAPE_HATCH_REASON = "deletes expired session rows of every tenant";
|
|
18
18
|
// Reads the late-bind setter off a mounted sessions feature's exports.
|
|
19
19
|
// run{Prod,Dev}App call it once the DB connection is concrete — the feature
|
|
@@ -143,11 +143,15 @@ export function createSessionsFeature(options) {
|
|
|
143
143
|
// sessionChecker blocks a status-locked principal on its next request
|
|
144
144
|
// regardless.
|
|
145
145
|
const REVOKE_TRIGGERING_FIELDS = ["passwordHash"];
|
|
146
|
-
|
|
146
|
+
// Explicit option wins; the runtime binding is replaceable so a second boot of the same
|
|
147
|
+
// feature instance (a new app or test stack in one process) binds its own database.
|
|
148
|
+
const explicitAutoRevoke = options?.autoRevokeOnPasswordChange;
|
|
149
|
+
let boundAutoRevoke;
|
|
147
150
|
r.hook({
|
|
148
151
|
type: "postSave",
|
|
149
152
|
target: { allOf: "user" },
|
|
150
153
|
handler: async (ctx) => {
|
|
154
|
+
const autoRevoke = explicitAutoRevoke ?? boundAutoRevoke;
|
|
151
155
|
// skip: nothing bound — stateless-JWT deployments without a runtime
|
|
152
156
|
// that calls bindAutoRevokeOnPasswordChange keep the old behavior.
|
|
153
157
|
if (!autoRevoke)
|
|
@@ -165,8 +169,7 @@ export function createSessionsFeature(options) {
|
|
|
165
169
|
},
|
|
166
170
|
});
|
|
167
171
|
const bindAutoRevokeOnPasswordChange = (revoker) => {
|
|
168
|
-
|
|
169
|
-
autoRevoke ??= revoker;
|
|
172
|
+
boundAutoRevoke = revoker;
|
|
170
173
|
};
|
|
171
174
|
r.translations({ keys: SESSIONS_I18N });
|
|
172
175
|
r.screen(createSessionListScreen(adminRoles));
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { isWithinGracePeriod } from "./grace-period.ts";
|
|
|
10
10
|
export { isIdentityV3Hash, verifyIdentityV3Hash } from "./identity-v3-hash.ts";
|
|
11
11
|
export { isTenantDb } from "./is-tenant-db.ts";
|
|
12
12
|
export { createLockoutCounter, type LockoutCounterState } from "./lockout-counter.ts";
|
|
13
|
-
export { mailHeading, mailParagraph, mailRepeatedRows } from "./mail-template-body.ts";
|
|
13
|
+
export { mailHeading, mailParagraph, mailParagraphWithLink, mailRepeatedRows, } from "./mail-template-body.ts";
|
|
14
14
|
export { mapWithConcurrency } from "./map-with-concurrency.ts";
|
|
15
15
|
export { denyUnlessJoinRowParentVisible, hostRowIsGone, joinRowParentIsVisible, parentRowIsVisible, } from "./parent-visibility.ts";
|
|
16
16
|
export { hashPassword, verifyDummyPassword, verifyPassword } from "./password-hashing.ts";
|
package/dist/shared/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export { isWithinGracePeriod } from "./grace-period.js";
|
|
|
10
10
|
export { isIdentityV3Hash, verifyIdentityV3Hash } from "./identity-v3-hash.js";
|
|
11
11
|
export { isTenantDb } from "./is-tenant-db.js";
|
|
12
12
|
export { createLockoutCounter } from "./lockout-counter.js";
|
|
13
|
-
export { mailHeading, mailParagraph, mailRepeatedRows } from "./mail-template-body.js";
|
|
13
|
+
export { mailHeading, mailParagraph, mailParagraphWithLink, mailRepeatedRows, } from "./mail-template-body.js";
|
|
14
14
|
export { mapWithConcurrency } from "./map-with-concurrency.js";
|
|
15
15
|
export { denyUnlessJoinRowParentVisible, hostRowIsGone, joinRowParentIsVisible, parentRowIsVisible, } from "./parent-visibility.js";
|
|
16
16
|
export { hashPassword, verifyDummyPassword, verifyPassword } from "./password-hashing.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveSubjectForField, SubjectResolutionError, subjectIdToKey, } from "@cosmicdrift/kumiko-framework/crypto";
|
|
2
2
|
import { createEventStoreExecutor, createTenantDb, selectMany, } from "@cosmicdrift/kumiko-framework/db";
|
|
3
3
|
import { createSystemUser, parseTenantId, SYSTEM_USER_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
4
|
-
import { FILE_REF_ENTITY_NAME, fileRefEntity, fileRefsTable, } from "@cosmicdrift/kumiko-framework/files";
|
|
4
|
+
import { FILE_REF_ENTITY_NAME, fileRefEntity, fileRefsTable, listActionFormFileFields, } from "@cosmicdrift/kumiko-framework/files";
|
|
5
5
|
import { collectSingleFileHolders, planFileFields, purgeRowFileRefs, } from "./purge-row-file-refs.js";
|
|
6
6
|
// Callers' error labels read err.code, so audit events name the failure class.
|
|
7
7
|
export class FileSweepError extends Error {
|
|
@@ -147,7 +147,7 @@ export async function purgeFilesReachingSubject(args) {
|
|
|
147
147
|
db,
|
|
148
148
|
registry,
|
|
149
149
|
subject,
|
|
150
|
-
fileFieldKeys: pendingFieldKeys(fileEntities),
|
|
150
|
+
fileFieldKeys: pendingFieldKeys(fileEntities, registry),
|
|
151
151
|
fileHolders,
|
|
152
152
|
storageByTenant,
|
|
153
153
|
resolveDeleteBytes,
|
|
@@ -158,8 +158,12 @@ export async function purgeFilesReachingSubject(args) {
|
|
|
158
158
|
throw firstFailure;
|
|
159
159
|
}
|
|
160
160
|
const pendingFieldKey = (entityType, fieldName) => `${entityType}\u0000${fieldName}`;
|
|
161
|
-
|
|
161
|
+
// A pending upload of an actionForm files field is keyed by the screen QN, like an entity's by its name.
|
|
162
|
+
function pendingFieldKeys(fileEntities, registry) {
|
|
162
163
|
const keys = new Set();
|
|
164
|
+
for (const { screenQn, fieldName } of listActionFormFileFields(registry)) {
|
|
165
|
+
keys.add(pendingFieldKey(screenQn, fieldName));
|
|
166
|
+
}
|
|
163
167
|
for (const { entityName, fileFields } of fileEntities) {
|
|
164
168
|
for (const fieldName of fileFields)
|
|
165
169
|
keys.add(pendingFieldKey(entityName, fieldName));
|
|
@@ -34,7 +34,7 @@ import { access, createSystemConfig, defineFeature, } from "@cosmicdrift/kumiko-
|
|
|
34
34
|
import { featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
|
|
35
35
|
import * as z from "zod";
|
|
36
36
|
import { STRIPE_API_KEY_CONFIG, STRIPE_BILLING_LIVE_CONFIG, STRIPE_PROVIDER_NAME, STRIPE_WEBHOOK_SECRET_CONFIG, SUBSCRIPTION_STRIPE_FEATURE, } from "./constants.js";
|
|
37
|
-
import { createStripeCancelSubscription, createStripeCheckoutSession, createStripePlanSwitchSession, createStripePortalSession, createStripePriceCache, createStripeRetrievePrices, createStripeRetrieveSubscription, } from "./plugin-methods.js";
|
|
37
|
+
import { createStripeCancelSubscription, createStripeCheckoutSession, createStripePlanSwitchSession, createStripePortalSession, createStripePriceCache, createStripeResumeSubscription, createStripeRetrievePrices, createStripeRetrieveSubscription, } from "./plugin-methods.js";
|
|
38
38
|
import { createStripeRuntimes } from "./runtime.js";
|
|
39
39
|
import { verifyAndParseStripeWebhook } from "./verify-webhook.js";
|
|
40
40
|
/**
|
|
@@ -181,6 +181,7 @@ export function createSubscriptionStripeFeature(options = {}) {
|
|
|
181
181
|
}),
|
|
182
182
|
createPortalSession: createStripePortalSession(runtimes.ctx),
|
|
183
183
|
cancelSubscription: createStripeCancelSubscription(runtimes.ctx),
|
|
184
|
+
resumeSubscription: createStripeResumeSubscription(runtimes.ctx),
|
|
184
185
|
priceToTier: options.priceToTier ?? {},
|
|
185
186
|
oneOffPriceIds: options.oneOffPriceIds ?? [],
|
|
186
187
|
isBillingEnabled: runtimes.ctx.isBillingEnabled,
|
|
@@ -16,6 +16,9 @@ export type StripePortalOptions = Parameters<NonNullable<SubscriptionProviderPlu
|
|
|
16
16
|
export declare function createStripePortalSession(runtime: StripeCtxRuntime): (ctx: HandlerContext, options: StripePortalOptions) => Promise<{
|
|
17
17
|
url: string;
|
|
18
18
|
}>;
|
|
19
|
+
export declare function createStripeResumeSubscription(runtime: StripeCtxRuntime): (ctx: HandlerContext, options: {
|
|
20
|
+
readonly providerSubscriptionId: string;
|
|
21
|
+
}) => Promise<void>;
|
|
19
22
|
export type StripeCancelOptions = Parameters<NonNullable<SubscriptionProviderPlugin["cancelSubscription"]>>[1];
|
|
20
23
|
export declare function createStripeCancelSubscription(runtime: StripeCtxRuntime): (ctx: HandlerContext, options: StripeCancelOptions) => Promise<void>;
|
|
21
24
|
export type StripeRetrieveSubscriptionOptions = {
|
|
@@ -164,6 +164,20 @@ export function createStripePortalSession(runtime) {
|
|
|
164
164
|
}
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
+
// =============================================================================
|
|
168
|
+
// resumeSubscription
|
|
169
|
+
// =============================================================================
|
|
170
|
+
//
|
|
171
|
+
// Takes back a period-end cancel; the following `customer.subscription.updated`
|
|
172
|
+
// carries cancel_at null, which the projection stores as "renews".
|
|
173
|
+
export function createStripeResumeSubscription(runtime) {
|
|
174
|
+
return async (ctx, options) => {
|
|
175
|
+
const stripe = await runtime.clientForCtx(ctx);
|
|
176
|
+
await stripe.subscriptions.update(options.providerSubscriptionId, {
|
|
177
|
+
cancel_at_period_end: false,
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
}
|
|
167
181
|
export function createStripeCancelSubscription(runtime) {
|
|
168
182
|
return async (ctx, options) => {
|
|
169
183
|
const stripe = await runtime.clientForCtx(ctx);
|
|
@@ -125,6 +125,7 @@ export function verifyAndParseStripeWebhook(runtime, options) {
|
|
|
125
125
|
...(consentId !== undefined && { consentId }),
|
|
126
126
|
providerCustomerId: typeof sub.customer === "string" ? sub.customer : sub.customer.id,
|
|
127
127
|
providerSubscriptionId: sub.id,
|
|
128
|
+
providerEventAt: Temporal.Instant.fromEpochMilliseconds(event.created * 1000).toString(),
|
|
128
129
|
...state,
|
|
129
130
|
};
|
|
130
131
|
};
|
package/dist/tags/feature.js
CHANGED
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
// Deferred: optional host-projection decoration (`wireTagsFor`), search indexing.
|
|
20
20
|
import { defineEntityDetailHandler, defineEntityListHandler, defineEntityUpdateHandler, defineFeature, } from "@cosmicdrift/kumiko-framework/engine";
|
|
21
21
|
import { assertNoWhereRuleInOwnershipWrite } from "../shared/index.js";
|
|
22
|
-
import { DEFAULT_TAG_ACCESS, TAGS_FEATURE_NAME } from "./constants.js";
|
|
23
22
|
import { createTagAssignmentEntity, tagEntity } from "./entity.js";
|
|
24
23
|
import { createTagAssignmentExecutor } from "./executor.js";
|
|
25
24
|
import { createAssignTagHandler } from "./handlers/assign-tag.write.js";
|
|
@@ -29,6 +28,7 @@ import { createRemoveTagHandler } from "./handlers/remove-tag.write.js";
|
|
|
29
28
|
import { createUpdateTagHandler } from "./handlers/update-tag.write.js";
|
|
30
29
|
import { TAGS_FEATURE_I18N } from "./i18n.js";
|
|
31
30
|
import { createTagEditScreen, createTagListScreen } from "./screens.js";
|
|
31
|
+
import { DEFAULT_TAG_ACCESS, TAGS_FEATURE_NAME } from "./web/constants.js";
|
|
32
32
|
function registerTags(r, access, toggleable, ownership, parents) {
|
|
33
33
|
r.describe("Generic, host-agnostic tagging for any entity. Owns two event-sourced entities — the per-tenant `tag` catalog (`read_tags`, with optional `color` and `scope`) and `tag-assignment` join rows keyed by (entityType, entityId) (`read_tag_assignments`) — so tagging adds NO column to the host entity and needs no relational pivot or JOIN. Catalog screens are declarative (`entityList` + `entityEdit`) and use convention QNs `tag:{create,update,delete}`; TagManager/TagPicker keep `create-tag`/`update-tag`/`delete-tag`. Also: `assign-tag` (idempotent), `remove-tag` (idempotent) and list queries for the catalog and the assignments. Read which tags an entity has, or which entities carry a tag, by listing `tag-assignment` filtered on `entityId` or `tagId` and composing in the read-layer. A tag with empty `scope` is global; a `scope` of an entityType restricts it to that type in the picker. Every path uses one access rule — adopt the host's model with createTagsFeature({ access: { openToAll: { reason } } }) or pin roles with createTagsFeature({ roles }). Pass { toggleable: { default: false } } to make the whole feature tier-gatable via the tier-engine (no host hook).");
|
|
34
34
|
r.uiHints({
|
|
@@ -2,9 +2,9 @@ import { NotFoundError, writeFailure } from "@cosmicdrift/kumiko-framework/error
|
|
|
2
2
|
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
3
3
|
import { denyUnlessJoinRowParentVisible } from "../../shared/index.js";
|
|
4
4
|
import { tagAssignmentAggregateId } from "../aggregate-id.js";
|
|
5
|
-
import { DEFAULT_TAG_ACCESS } from "../constants.js";
|
|
6
5
|
import { tagAssignmentExecutor, tagExecutor } from "../executor.js";
|
|
7
6
|
import { assignTagPayloadSchema } from "../schemas.js";
|
|
7
|
+
import { DEFAULT_TAG_ACCESS, TAG_LOCK_NAMESPACE } from "../web/constants.js";
|
|
8
8
|
// assign-tag — links a tag to a host entity by (entityType, entityId). The
|
|
9
9
|
// assignment id is deterministic, so the row is unique per (tag, entity).
|
|
10
10
|
//
|
|
@@ -18,9 +18,9 @@ import { assignTagPayloadSchema } from "../schemas.js";
|
|
|
18
18
|
// create(), the loser's create() version_conflicts, and the handler treats
|
|
19
19
|
// that as success since the winner already wrote the desired end state.
|
|
20
20
|
//
|
|
21
|
-
// Referential integrity: there is no FK (event-sourced, no JOIN), so
|
|
22
|
-
//
|
|
23
|
-
//
|
|
21
|
+
// Referential integrity: there is no FK (event-sourced, no JOIN), so we verify
|
|
22
|
+
// the tag exists in the catalog before any restore/create — otherwise a call
|
|
23
|
+
// racing delete-tag would resurrect or project an assignment for a gone tag.
|
|
24
24
|
//
|
|
25
25
|
// Host reference: entityType/entityId are never trusted client input either —
|
|
26
26
|
// the aggregate-id is tenant-scoped, so this is not a cross-tenant hole, but
|
|
@@ -37,6 +37,13 @@ export function createAssignTagHandler(access = DEFAULT_TAG_ACCESS, assignmentEx
|
|
|
37
37
|
const denied = await denyUnlessJoinRowParentVisible(ctx.registry, "tag-assignment", payload, event.user, ctx.db);
|
|
38
38
|
if (denied)
|
|
39
39
|
return denied;
|
|
40
|
+
// Same lock as delete-tag: the existence check below and the assignment
|
|
41
|
+
// write must not interleave with a delete-tag cascade, or the cascade
|
|
42
|
+
// misses the new assignment and leaves an orphan.
|
|
43
|
+
await ctx.db.advisoryXactLock(TAG_LOCK_NAMESPACE, payload.tagId);
|
|
44
|
+
const tag = await tagExecutor.detail({ id: payload.tagId }, event.user, ctx.db);
|
|
45
|
+
if (!tag)
|
|
46
|
+
return writeFailure(new NotFoundError("tag", payload.tagId));
|
|
40
47
|
const id = tagAssignmentAggregateId(event.user.tenantId, payload.tagId, payload.entityType, payload.entityId);
|
|
41
48
|
const existing = await assignmentExecutor.detail({ id }, event.user, ctx.db);
|
|
42
49
|
if (existing) {
|
|
@@ -56,9 +63,6 @@ export function createAssignTagHandler(access = DEFAULT_TAG_ACCESS, assignmentEx
|
|
|
56
63
|
}
|
|
57
64
|
if (restored.error.code !== "not_found")
|
|
58
65
|
return restored;
|
|
59
|
-
const tag = await tagExecutor.detail({ id: payload.tagId }, event.user, ctx.db);
|
|
60
|
-
if (!tag)
|
|
61
|
-
return writeFailure(new NotFoundError("tag", payload.tagId));
|
|
62
66
|
const created = await assignmentExecutor.create({
|
|
63
67
|
id,
|
|
64
68
|
tagId: payload.tagId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_TAG_ACCESS } from "../constants.js";
|
|
2
1
|
import { tagExecutor } from "../executor.js";
|
|
3
2
|
import { createTagPayloadSchema } from "../schemas.js";
|
|
3
|
+
import { DEFAULT_TAG_ACCESS } from "../web/constants.js";
|
|
4
4
|
// create-tag — adds a tag to the tenant's catalog. The framework mints a fresh
|
|
5
5
|
// UUIDv7 id (no explicit id passed). Tag names are not unique by design: the
|
|
6
6
|
// catalog is a free list and dedup is a UI concern (autocomplete from existing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_TAG_ACCESS } from "../constants.js";
|
|
2
1
|
import { tagAssignmentExecutor, tagExecutor } from "../executor.js";
|
|
3
2
|
import { deleteTagPayloadSchema } from "../schemas.js";
|
|
3
|
+
import { DEFAULT_TAG_ACCESS, TAG_LOCK_NAMESPACE } from "../web/constants.js";
|
|
4
4
|
const CASCADE_PAGE = 200;
|
|
5
5
|
// delete-tag — removes a tag from the catalog and detaches it everywhere. No FK
|
|
6
6
|
// (event-sourced, no JOIN), so the handler cascades: soft-delete every
|
|
@@ -22,6 +22,9 @@ export function createDeleteTagHandler(access = DEFAULT_TAG_ACCESS, name = "dele
|
|
|
22
22
|
agent: { risk: "high" },
|
|
23
23
|
handler: async (event, ctx) => {
|
|
24
24
|
const payload = event.payload; // @cast-boundary engine-payload
|
|
25
|
+
// Serialises with assign-tag (see there): the cascade must see every
|
|
26
|
+
// assignment that a concurrent assign-tag committed before the tag goes.
|
|
27
|
+
await ctx.db.advisoryXactLock(TAG_LOCK_NAMESPACE, payload.id);
|
|
25
28
|
const existing = await tagExecutor.detail({ id: payload.id }, event.user, ctx.db);
|
|
26
29
|
if (!existing) {
|
|
27
30
|
return { isSuccess: true, data: { id: payload.id } };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { denyUnlessJoinRowParentVisible } from "../../shared/index.js";
|
|
2
2
|
import { tagAssignmentAggregateId } from "../aggregate-id.js";
|
|
3
|
-
import { DEFAULT_TAG_ACCESS } from "../constants.js";
|
|
4
3
|
import { tagAssignmentExecutor } from "../executor.js";
|
|
5
4
|
import { removeTagPayloadSchema } from "../schemas.js";
|
|
5
|
+
import { DEFAULT_TAG_ACCESS } from "../web/constants.js";
|
|
6
6
|
// remove-tag — unlinks a tag from a host entity. Idempotent: removing an
|
|
7
7
|
// assignment that doesn't exist is already the requested end state (not
|
|
8
8
|
// assigned), so we pre-check and return success without a delete.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_TAG_ACCESS } from "../constants.js";
|
|
2
1
|
import { tagExecutor } from "../executor.js";
|
|
3
2
|
import { updateTagPayloadSchema } from "../schemas.js";
|
|
3
|
+
import { DEFAULT_TAG_ACCESS } from "../web/constants.js";
|
|
4
4
|
// update-tag — edits a catalog tag (rename / recolor / re-scope). Optimistic-
|
|
5
5
|
// locked: the client sends the `version` it read (mirrors tenant:update). Only
|
|
6
6
|
// the fields present in the payload go into `changes`, and the executor merges
|
package/dist/tags/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { tagAssignmentAggregateId } from "./aggregate-id.ts";
|
|
2
|
-
export { DEFAULT_TAG_ACCESS, DEFAULT_TAG_ROLES, TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FEATURE_NAME, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "./constants.ts";
|
|
3
2
|
export { tagAssignmentEntity, tagEntity } from "./entity.ts";
|
|
4
3
|
export { createTagsFeature, type TagsFeatureOptions } from "./feature.ts";
|
|
5
4
|
export { assignTagHandler, createAssignTagHandler, } from "./handlers/assign-tag.write.ts";
|
|
@@ -9,3 +8,4 @@ export { createRemoveTagHandler, removeTagHandler, } from "./handlers/remove-tag
|
|
|
9
8
|
export { createUpdateTagHandler, updateTagHandler, } from "./handlers/update-tag.write.ts";
|
|
10
9
|
export { type AssignTagPayload, assignTagPayloadSchema, type CreateTagPayload, createTagPayloadSchema, type DeleteTagPayload, deleteTagPayloadSchema, type RemoveTagPayload, removeTagPayloadSchema, type UpdateTagPayload, updateTagPayloadSchema, } from "./schemas.ts";
|
|
11
10
|
export { createTagEditScreen, createTagListScreen } from "./screens.ts";
|
|
11
|
+
export { DEFAULT_TAG_ACCESS, DEFAULT_TAG_ROLES, TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FEATURE_NAME, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "./web/constants.ts";
|
package/dist/tags/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { tagAssignmentAggregateId } from "./aggregate-id.js";
|
|
2
|
-
export { DEFAULT_TAG_ACCESS, DEFAULT_TAG_ROLES, TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FEATURE_NAME, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "./constants.js";
|
|
3
2
|
export { tagAssignmentEntity, tagEntity } from "./entity.js";
|
|
4
3
|
export { createTagsFeature } from "./feature.js";
|
|
5
4
|
export { assignTagHandler, createAssignTagHandler, } from "./handlers/assign-tag.write.js";
|
|
@@ -9,3 +8,4 @@ export { createRemoveTagHandler, removeTagHandler, } from "./handlers/remove-tag
|
|
|
9
8
|
export { createUpdateTagHandler, updateTagHandler, } from "./handlers/update-tag.write.js";
|
|
10
9
|
export { assignTagPayloadSchema, createTagPayloadSchema, deleteTagPayloadSchema, removeTagPayloadSchema, updateTagPayloadSchema, } from "./schemas.js";
|
|
11
10
|
export { createTagEditScreen, createTagListScreen } from "./screens.js";
|
|
11
|
+
export { DEFAULT_TAG_ACCESS, DEFAULT_TAG_ROLES, TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FEATURE_NAME, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "./web/constants.js";
|
package/dist/tags/screens.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i18nKey, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { DEFAULT_TAG_ACCESS, TAGS_EDIT_SCREEN_ID, TAGS_SCREEN_ID } from "./constants.js";
|
|
2
|
+
import { DEFAULT_TAG_ACCESS, TAGS_EDIT_SCREEN_ID, TAGS_SCREEN_ID } from "./web/constants.js";
|
|
3
3
|
// Declarative catalog screens (Phase-3 / #2312). Access matches create/update/
|
|
4
4
|
// delete so createTagsFeature({ access|roles }) stays consistent. TagManager
|
|
5
5
|
// remains for TagPicker/TagSection — only the standalone admin screen moved.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { TAGS_COLUMN_RENDERER_NAME, TAGS_FEATURE_NAME, TAGS_FILTER_EXTENSION_NAME, TAGS_SECTION_EXTENSION_NAME, } from "../constants.js";
|
|
1
|
+
import { TAGS_COLUMN_RENDERER_NAME, TAGS_FEATURE_NAME, TAGS_FILTER_EXTENSION_NAME, TAGS_SECTION_EXTENSION_NAME, } from "./constants.js";
|
|
3
2
|
import { defaultTranslations } from "./i18n.js";
|
|
4
3
|
import { TagFilter } from "./tag-filter.js";
|
|
5
4
|
import { TagSection } from "./tag-section.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// tags bundle constants — feature-name + qualified handler/query names.
|
|
3
2
|
//
|
|
4
3
|
// Spec: kumiko-platform/docs/plans/features/tags.md
|
|
@@ -48,3 +47,6 @@ export const DEFAULT_TAG_ROLES = ["TenantAdmin", "TenantMember"];
|
|
|
48
47
|
// makes tagging reachable for any authenticated tenant user — matching apps
|
|
49
48
|
// whose other handlers are openToAll rather than role-gated.
|
|
50
49
|
export const DEFAULT_TAG_ACCESS = { roles: DEFAULT_TAG_ROLES };
|
|
50
|
+
// Advisory-lock namespace serialising assign-tag against delete-tag per tag id
|
|
51
|
+
// (no FK in the event-sourced catalog, so the DB cannot guard the orphan race).
|
|
52
|
+
export const TAG_LOCK_NAMESPACE = 0x74_61_67_73; // 'tags'
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// EntityTags — read-only colored tag row for ANY entity. Drop it on a card or
|
|
4
3
|
// detail view: <EntityTags entityName="note" entityId={id} />. Loads the
|
|
5
4
|
// catalog (for name+color) and the entity's assignments, renders a TagChip per
|
|
6
5
|
// assigned tag. Renders nothing when the entity has no tags.
|
|
7
6
|
import { useQuery } from "@cosmicdrift/kumiko-renderer";
|
|
8
|
-
import { TagsQueries } from "
|
|
7
|
+
import { TagsQueries } from "./constants.js";
|
|
9
8
|
import { TagChip } from "./tag-chip.js";
|
|
10
9
|
export function EntityTags({ entityName, entityId, }) {
|
|
11
10
|
const enabled = entityId !== null;
|
package/dist/tags/web/i18n.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// Default translation bundle for the tags UI. tagsClient() hangs it into the
|
|
3
2
|
// LocaleProvider as a fallback bundle — apps override individual keys via
|
|
4
3
|
// tagsClient({ translations }). Keys follow `tags.<area>.<slug>`.
|
|
@@ -22,7 +21,8 @@ export const defaultTranslations = {
|
|
|
22
21
|
"tags.manage.toggle": "Toggle label",
|
|
23
22
|
"tags.manage.usage": "{count}×",
|
|
24
23
|
"tags.manage.deleteConfirmTitle": "Delete label “{name}”?",
|
|
25
|
-
"tags.manage.deleteConfirmDesc": "Removes it from
|
|
24
|
+
"tags.manage.deleteConfirmDesc.one": "Removes it from 1 object. This can't be undone.",
|
|
25
|
+
"tags.manage.deleteConfirmDesc.other": "Removes it from {count} objects. This can't be undone.",
|
|
26
26
|
"tags.picker.title": "Tags",
|
|
27
27
|
"tags.picker.done": "Done",
|
|
28
28
|
"tags.filter.label": "Filter by tag",
|
package/dist/tags/web/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "../constants.ts";
|
|
2
1
|
export { tagsClient } from "./client-plugin.tsx";
|
|
2
|
+
export { TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "./constants.ts";
|
|
3
3
|
export { EntityTags } from "./entity-tags.tsx";
|
|
4
4
|
export { contrastText, TagChip } from "./tag-chip.tsx";
|
|
5
5
|
export { TagFilter } from "./tag-filter.tsx";
|
package/dist/tags/web/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// @runtime client
|
|
2
|
-
export { TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "../constants.js";
|
|
3
1
|
export { tagsClient } from "./client-plugin.js";
|
|
2
|
+
export { TAGS_COLUMN_RENDERER_NAME, TAGS_EDIT_SCREEN_ID, TAGS_FILTER_EXTENSION_NAME, TAGS_SCREEN_ID, TAGS_SECTION_EXTENSION_NAME, TagsHandlers, TagsQueries, } from "./constants.js";
|
|
4
3
|
export { EntityTags } from "./entity-tags.js";
|
|
5
4
|
export { contrastText, TagChip } from "./tag-chip.js";
|
|
6
5
|
export { TagFilter } from "./tag-filter.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
// TagFilter — a drop-in tag filter for ANY entityList toolbar. Register it as
|
|
4
3
|
// the list's header slot (`screen.slots.header`); the renderer passes it the
|
|
5
4
|
// list's screenId, and picking tags resolves the matching row ids and narrows
|
|
@@ -15,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
14
|
// server-side `entitiesByTag` query + a server-side join filter instead.
|
|
16
15
|
import { useListUrlState, usePrimitives, useQuery, useTranslation, } from "@cosmicdrift/kumiko-renderer";
|
|
17
16
|
import { useState } from "react";
|
|
18
|
-
import { TagsQueries } from "
|
|
17
|
+
import { TagsQueries } from "./constants.js";
|
|
19
18
|
import { TagChip } from "./tag-chip.js";
|
|
20
19
|
import { TagPicker } from "./tag-picker.js";
|
|
21
20
|
// Tags chosen but zero matching entities → filter to a value that matches no row
|