@cosmicdrift/kumiko-bundled-features 0.362.0 → 0.364.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/admin-shell/feature.d.ts +3 -0
- package/dist/admin-shell/feature.js +6 -1
- package/dist/agent-tools/agent-manifest.js +2 -1
- package/dist/agent-tools/filter-ops.d.ts +1 -1
- package/dist/agent-tools/filter-ops.js +1 -3
- package/dist/agent-tools/tool-dispatch.js +2 -1
- package/dist/audit/handlers/list.query.js +9 -5
- package/dist/auth-email-password/bootstrap.d.ts +8 -5
- package/dist/auth-email-password/bootstrap.js +12 -4
- package/dist/auth-email-password/email-rate-limits.d.ts +4 -0
- package/dist/auth-email-password/email-rate-limits.js +13 -0
- package/dist/auth-email-password/email-templates.d.ts +4 -26
- package/dist/auth-email-password/email-templates.js +9 -101
- package/dist/auth-email-password/feature.js +24 -6
- package/dist/auth-email-password/handlers/change-password.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/change-password.write.js +6 -2
- package/dist/auth-email-password/handlers/confirm-account-unlock.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-accept.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.d.ts +2 -2
- package/dist/auth-email-password/handlers/invite-create.write.js +4 -4
- package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/logout.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/logout.write.js +6 -2
- package/dist/auth-email-password/handlers/request-account-unlock.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-account-unlock.write.js +2 -4
- package/dist/auth-email-password/handlers/request-email-verification.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-email-verification.write.js +2 -4
- package/dist/auth-email-password/handlers/request-password-reset.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-password-reset.write.js +2 -4
- package/dist/auth-email-password/handlers/reset-password.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-confirm.write.js +3 -4
- package/dist/auth-email-password/handlers/signup-request.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-request.write.js +2 -1
- package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/token-request-handler.d.ts +2 -3
- package/dist/auth-email-password/handlers/token-request-handler.js +2 -2
- package/dist/auth-email-password/handlers/verify-email.write.d.ts +1 -1
- package/dist/auth-email-password/index.d.ts +2 -2
- package/dist/auth-email-password/index.js +1 -1
- package/dist/auth-email-password/magic-link-mail.d.ts +3 -2
- package/dist/auth-email-password/magic-link-mail.js +19 -14
- package/dist/auth-email-password/mail-notifications.d.ts +32 -0
- package/dist/auth-email-password/mail-notifications.js +116 -0
- package/dist/auth-email-password/signup-activation.d.ts +1 -1
- package/dist/auth-email-password/signup-activation.js +2 -3
- package/dist/auth-email-password/web/auth-gate.js +16 -4
- package/dist/auth-foundation/types.js +2 -8
- package/dist/auth-mfa/feature.js +4 -4
- package/dist/auth-mfa/handlers/disable.write.d.ts +1 -1
- package/dist/auth-mfa/handlers/enable-confirm-preauth.write.d.ts +1 -1
- package/dist/auth-mfa/handlers/enable-confirm.write.d.ts +1 -1
- package/dist/auth-mfa/handlers/enable-start-preauth.write.d.ts +1 -1
- package/dist/auth-mfa/handlers/enable-start.write.d.ts +1 -1
- package/dist/auth-mfa/handlers/regenerate-recovery.write.d.ts +1 -1
- package/dist/auth-mfa/handlers/verify.write.d.ts +1 -1
- package/dist/auth-mfa/hmac-token-codec.js +4 -4
- package/dist/auth-mfa/mfa-challenge-token.js +3 -3
- package/dist/auth-mfa/mfa-preauth-setup-token.js +3 -3
- package/dist/auth-mfa/mfa-setup-token.js +8 -8
- package/dist/billing-foundation/constants.d.ts +3 -3
- package/dist/billing-foundation/constants.js +5 -4
- package/dist/billing-foundation/consumer-protection/confirmation-mail.d.ts +32 -14
- package/dist/billing-foundation/consumer-protection/confirmation-mail.js +74 -32
- package/dist/billing-foundation/consumer-protection/consent-gate.d.ts +3 -0
- package/dist/billing-foundation/consumer-protection/consent-gate.js +21 -2
- package/dist/billing-foundation/consumer-protection/issue-confirmation.js +3 -3
- package/dist/billing-foundation/consumer-protection/mail-notifications.d.ts +8 -0
- package/dist/billing-foundation/consumer-protection/mail-notifications.js +95 -0
- package/dist/billing-foundation/consumer-protection/register-consent.js +2 -0
- package/dist/billing-foundation/consumer-protection/register-termination.js +11 -1
- package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +25 -13
- package/dist/billing-foundation/consumer-protection/termination-mail.js +11 -23
- package/dist/billing-foundation/consumer-protection/termination-notify.js +2 -2
- package/dist/billing-foundation/consumer-protection/termination-pages.js +1 -3
- package/dist/billing-foundation/consumer-protection/termination-receipt-limit.d.ts +6 -0
- package/dist/billing-foundation/consumer-protection/termination-receipt-limit.js +34 -0
- package/dist/billing-foundation/consumer-protection/termination-record.d.ts +2 -0
- package/dist/billing-foundation/consumer-protection/termination-record.js +7 -1
- package/dist/billing-foundation/consumer-protection/termination-request.js +31 -21
- package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/termination-texts.js +6 -0
- package/dist/billing-foundation/consumer-protection/withdrawal-period.d.ts +10 -0
- package/dist/billing-foundation/consumer-protection/withdrawal-period.js +26 -0
- package/dist/billing-foundation/handlers/create-checkout-session.write.js +11 -5
- package/dist/billing-foundation/handlers/process-event.write.js +12 -8
- package/dist/billing-foundation/handlers/process-payment-event.write.js +1 -1
- package/dist/billing-foundation/i18n.js +3 -0
- package/dist/billing-foundation/subscription-tier-sync.d.ts +7 -1
- package/dist/billing-foundation/subscription-tier-sync.js +16 -9
- package/dist/billing-foundation/types.d.ts +7 -2
- package/dist/cap-counter/calendar-cap-usage-reservation.js +2 -0
- package/dist/cap-counter/enforce-cap.d.ts +18 -1
- package/dist/cap-counter/enforce-cap.js +49 -6
- package/dist/cap-counter/index.d.ts +1 -1
- package/dist/cap-counter/index.js +1 -1
- package/dist/cap-counter/with-cap-enforcement.d.ts +2 -0
- package/dist/cap-overview/handlers/tenant-caps-list.query.js +2 -1
- package/dist/cap-overview/web/cap-usage-cell.js +5 -4
- package/dist/channel-email/email-channel.d.ts +2 -2
- package/dist/channel-email/email-channel.js +101 -26
- package/dist/channel-email/feature.js +3 -3
- package/dist/channel-email/index.d.ts +1 -1
- package/dist/channel-email/index.js +1 -1
- package/dist/channel-email/pii-guard.js +10 -0
- package/dist/channel-email/smtp-transport.js +13 -0
- package/dist/channel-email/types.d.ts +8 -0
- package/dist/channel-in-app/handlers/mark-all-read.write.d.ts +1 -1
- package/dist/channel-in-app/handlers/mark-read.write.d.ts +1 -1
- package/dist/compliance-profiles/handlers/set-profile.write.d.ts +1 -1
- package/dist/config/handlers/reset.write.d.ts +1 -1
- package/dist/config/handlers/set.write.d.ts +1 -1
- package/dist/config/handlers/set.write.js +3 -4
- package/dist/config/resolver.d.ts +1 -0
- package/dist/config/resolver.js +11 -14
- package/dist/config/write-helpers.d.ts +2 -0
- package/dist/config/write-helpers.js +19 -0
- package/dist/crypto-shredding/handlers/forget-subject.write.d.ts +1 -1
- package/dist/crypto-shredding/handlers/forget-subject.write.js +29 -19
- package/dist/custom-fields/handlers/update-tenant-field.write.js +0 -1
- package/dist/custom-fields/lib/value-schema.js +10 -11
- package/dist/custom-fields/wire-user-data-rights.js +7 -6
- package/dist/data-retention/index.d.ts +1 -0
- package/dist/data-retention/index.js +1 -0
- package/dist/data-retention/run-retention-cleanup.js +6 -6
- package/dist/delivery/attachment-ref.d.ts +41 -0
- package/dist/delivery/attachment-ref.js +78 -0
- package/dist/delivery/channel-context.d.ts +8 -4
- package/dist/delivery/channel-context.js +94 -2
- package/dist/delivery/constants.d.ts +1 -0
- package/dist/delivery/constants.js +1 -0
- package/dist/delivery/delivery-service.d.ts +4 -1
- package/dist/delivery/delivery-service.js +38 -32
- package/dist/delivery/feature.js +1 -1
- package/dist/delivery/handlers/resubscribe-address.write.d.ts +1 -1
- package/dist/delivery/handlers/resubscribe-user.write.d.ts +1 -1
- package/dist/delivery/handlers/set-preference.write.d.ts +1 -1
- package/dist/delivery/handlers/unsubscribe-address.write.d.ts +1 -1
- package/dist/delivery/handlers/unsubscribe-user.write.d.ts +1 -1
- package/dist/delivery/index.d.ts +5 -2
- package/dist/delivery/index.js +4 -1
- package/dist/delivery/jobs.js +66 -14
- package/dist/delivery/notify-factory.js +4 -1
- package/dist/delivery/testing.d.ts +4 -1
- package/dist/delivery/types.d.ts +26 -14
- package/dist/delivery/unsubscribe.js +4 -1
- package/dist/derivatives-sharp/render.js +1 -18
- package/dist/document-ingest-foundation/pages.js +4 -4
- package/dist/feature-toggles/handlers/set.write.d.ts +1 -1
- package/dist/feature-toggles/toggle-sync-signal.js +4 -4
- package/dist/file-derivatives/handlers/public-variant.query.js +1 -1
- package/dist/file-foundation/index.d.ts +1 -0
- package/dist/file-foundation/index.js +1 -0
- package/dist/file-foundation/read-file-ref-content.d.ts +27 -0
- package/dist/file-foundation/read-file-ref-content.js +51 -0
- package/dist/files-tenant-data/hooks.js +4 -0
- package/dist/folders/web/folder-manager.js +3 -2
- package/dist/form-draft/db/queries/cleanup.js +4 -4
- package/dist/form-draft/db/queries/draft-count.js +2 -2
- package/dist/form-draft/db/queries/owned-file-refs.js +2 -2
- package/dist/form-draft/handlers/discard.write.d.ts +1 -1
- package/dist/form-draft/handlers/save.write.d.ts +1 -1
- package/dist/form-draft/release-file-refs.js +3 -2
- package/dist/inbound-mail-foundation/handlers/connect-account.write.js +1 -1
- package/dist/inbound-mail-foundation/handlers/ingest-message.write.js +6 -6
- package/dist/inbound-mail-foundation/handlers/scope-visibility.d.ts +1 -1
- package/dist/inbound-mail-foundation/oauth-access-token.js +8 -3
- package/dist/inbound-mail-foundation/oauth-state.js +7 -7
- package/dist/inbound-mail-foundation/types.js +4 -4
- package/dist/inbound-mail-foundation/watch-supervisor.js +24 -13
- package/dist/inbound-provider-imap/imap-client.js +4 -3
- package/dist/jobs/db/queries/stale-run-sweep.d.ts +1 -1
- package/dist/jobs/db/queries/stale-run-sweep.js +12 -5
- package/dist/jobs/feature.js +5 -3
- package/dist/jobs/handlers/list.query.js +3 -1
- package/dist/jobs/handlers/retry.write.d.ts +1 -1
- package/dist/jobs/handlers/stale-run-sweep.job.d.ts +1 -1
- package/dist/jobs/handlers/stale-run-sweep.job.js +2 -2
- package/dist/jobs/handlers/trigger.write.d.ts +1 -1
- package/dist/jobs/job-run-logger.js +32 -10
- package/dist/jobs/tenant-job-run-table.js +3 -2
- package/dist/ledger/entity.js +3 -1
- package/dist/ledger/recurring.js +1 -3
- package/dist/managed-pages/branding.d.ts +2 -0
- package/dist/managed-pages/branding.js +24 -2
- package/dist/managed-pages/feature.js +1 -0
- package/dist/managed-pages/handlers/set.write.d.ts +1 -1
- package/dist/managed-pages/i18n.js +1 -0
- package/dist/managed-pages/screens/branding-screen.js +8 -1
- package/dist/page-render/branding.d.ts +1 -0
- package/dist/page-render/branding.js +1 -0
- package/dist/page-render/markdown.js +1 -1
- package/dist/personal-access-tokens/feature.js +1 -1
- package/dist/personal-access-tokens/handlers/create.write.d.ts +1 -1
- package/dist/personal-access-tokens/handlers/list.query.js +2 -1
- package/dist/personal-access-tokens/handlers/revoke.write.d.ts +1 -1
- package/dist/personal-access-tokens/revoke-for-user.js +2 -1
- package/dist/renderer-foundation/api.d.ts +13 -13
- package/dist/renderer-foundation/api.js +1 -1
- package/dist/renderer-foundation/constants.js +2 -4
- package/dist/renderer-foundation/feature.js +7 -7
- package/dist/renderer-foundation/index.d.ts +2 -1
- package/dist/renderer-foundation/index.js +1 -0
- package/dist/renderer-foundation/types.d.ts +94 -32
- package/dist/renderer-pdf/feature.js +7 -1
- package/dist/renderer-pdf/render-table-pdf.d.ts +27 -33
- package/dist/renderer-pdf/render-table-pdf.js +95 -34
- package/dist/secrets/feature.js +4 -3
- package/dist/secrets/handlers/delete.write.d.ts +1 -1
- package/dist/secrets/handlers/set.write.d.ts +1 -1
- package/dist/secrets/secrets-context.js +15 -3
- package/dist/sessions/db/queries/cleanup.js +2 -2
- package/dist/sessions/feature.js +1 -1
- package/dist/sessions/handlers/list.query.js +2 -1
- package/dist/sessions/handlers/revoke-all-for-user.write.d.ts +1 -1
- package/dist/sessions/handlers/revoke-all-others.write.d.ts +1 -1
- package/dist/sessions/handlers/revoke.write.d.ts +1 -1
- package/dist/shared/attachment-file-name.d.ts +3 -0
- package/dist/shared/attachment-file-name.js +35 -0
- package/dist/shared/chunked-entity-migration.d.ts +1 -0
- package/dist/shared/chunked-entity-migration.js +1 -1
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/is-tenant-db.js +1 -1
- package/dist/shared/mail-template-body.d.ts +7 -0
- package/dist/shared/mail-template-body.js +27 -0
- package/dist/shared/sharp-input-limits.d.ts +6 -0
- package/dist/shared/sharp-input-limits.js +22 -0
- package/dist/shared/signup-handover.js +2 -2
- package/dist/subscription-stripe/plugin-methods.js +18 -8
- package/dist/subscription-stripe/verify-webhook.d.ts +1 -1
- package/dist/tags/handlers/assign-tag.write.js +3 -1
- package/dist/tags/web/tag-chip.js +2 -0
- package/dist/template-resolver/api.d.ts +30 -2
- package/dist/template-resolver/api.js +42 -6
- package/dist/template-resolver/compile-document-body.d.ts +12 -0
- package/dist/template-resolver/compile-document-body.js +205 -0
- package/dist/template-resolver/constants.d.ts +13 -4
- package/dist/template-resolver/constants.js +32 -10
- package/dist/template-resolver/document-sanitizer.d.ts +32 -0
- package/dist/template-resolver/document-sanitizer.js +201 -0
- package/dist/template-resolver/document-schema.d.ts +21 -0
- package/dist/template-resolver/document-schema.js +316 -0
- package/dist/template-resolver/feature.d.ts +20 -0
- package/dist/template-resolver/feature.js +53 -6
- package/dist/template-resolver/handlers/bundle-import.d.ts +20 -0
- package/dist/template-resolver/handlers/bundle-import.js +147 -0
- package/dist/template-resolver/handlers/collection-set.write.d.ts +1 -1
- package/dist/template-resolver/handlers/collection-set.write.js +25 -2
- package/dist/template-resolver/handlers/copy-locale.write.d.ts +19 -0
- package/dist/template-resolver/handlers/copy-locale.write.js +134 -0
- package/dist/template-resolver/handlers/diff-to-system.query.d.ts +22 -0
- package/dist/template-resolver/handlers/diff-to-system.query.js +30 -0
- package/dist/template-resolver/handlers/discard-draft.write.d.ts +13 -0
- package/dist/template-resolver/handlers/discard-draft.write.js +37 -0
- package/dist/template-resolver/handlers/export-bundle.query.d.ts +35 -0
- package/dist/template-resolver/handlers/export-bundle.query.js +118 -0
- package/dist/template-resolver/handlers/find-by-id.query.d.ts +2 -0
- package/dist/template-resolver/handlers/find-by-id.query.js +9 -6
- package/dist/template-resolver/handlers/import-bundle-system.write.d.ts +39 -0
- package/dist/template-resolver/handlers/import-bundle-system.write.js +36 -0
- package/dist/template-resolver/handlers/import-bundle.write.d.ts +40 -0
- package/dist/template-resolver/handlers/import-bundle.write.js +19 -0
- package/dist/template-resolver/handlers/layout-source.query.d.ts +31 -0
- package/dist/template-resolver/handlers/layout-source.query.js +87 -0
- package/dist/template-resolver/handlers/list.query.d.ts +4 -1
- package/dist/template-resolver/handlers/list.query.js +9 -8
- package/dist/template-resolver/handlers/override-diff.d.ts +20 -0
- package/dist/template-resolver/handlers/override-diff.js +41 -0
- package/dist/template-resolver/handlers/overview.query.d.ts +65 -0
- package/dist/template-resolver/handlers/overview.query.js +205 -0
- package/dist/template-resolver/handlers/preview.query.d.ts +12 -0
- package/dist/template-resolver/handlers/preview.query.js +24 -0
- package/dist/template-resolver/handlers/reset-to-system.write.d.ts +8 -0
- package/dist/template-resolver/handlers/reset-to-system.write.js +50 -0
- package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +8 -0
- package/dist/template-resolver/handlers/resource-link-pdf.write.js +32 -0
- package/dist/template-resolver/handlers/resource-remove.write.d.ts +9 -0
- package/dist/template-resolver/handlers/resource-remove.write.js +44 -0
- package/dist/template-resolver/handlers/resource-shared.d.ts +9 -0
- package/dist/template-resolver/handlers/resource-shared.js +14 -0
- package/dist/template-resolver/handlers/resource-upload.write.d.ts +13 -0
- package/dist/template-resolver/handlers/resource-upload.write.js +98 -0
- package/dist/template-resolver/handlers/send-test.write.d.ts +13 -0
- package/dist/template-resolver/handlers/send-test.write.js +108 -0
- package/dist/template-resolver/handlers/set.write.d.ts +5 -2
- package/dist/template-resolver/handlers/set.write.js +25 -3
- package/dist/template-resolver/handlers/shared.d.ts +9 -5
- package/dist/template-resolver/handlers/shared.js +6 -2
- package/dist/template-resolver/handlers/template-gates.d.ts +36 -0
- package/dist/template-resolver/handlers/template-gates.js +142 -0
- package/dist/template-resolver/handlers/template-write.d.ts +45 -0
- package/dist/template-resolver/handlers/template-write.js +141 -0
- package/dist/template-resolver/handlers/tenant-overrides.query.d.ts +49 -0
- package/dist/template-resolver/handlers/tenant-overrides.query.js +112 -0
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +27 -2
- package/dist/template-resolver/handlers/toggle-status.write.js +47 -15
- package/dist/template-resolver/handlers/upsert-system.write.d.ts +5 -8
- package/dist/template-resolver/handlers/upsert-system.write.js +14 -59
- package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +5 -8
- package/dist/template-resolver/handlers/upsert-tenant.write.js +11 -62
- package/dist/template-resolver/handlers/usage.query.d.ts +17 -0
- package/dist/template-resolver/handlers/usage.query.js +24 -0
- package/dist/template-resolver/handlers/validate.query.d.ts +74 -0
- package/dist/template-resolver/handlers/validate.query.js +80 -0
- package/dist/template-resolver/index.d.ts +19 -1
- package/dist/template-resolver/index.js +17 -1
- package/dist/template-resolver/layout-appearance.d.ts +10 -0
- package/dist/template-resolver/layout-appearance.js +26 -0
- package/dist/template-resolver/layout-regions.d.ts +23 -0
- package/dist/template-resolver/layout-regions.js +125 -0
- package/dist/template-resolver/linked-resources.d.ts +17 -0
- package/dist/template-resolver/linked-resources.js +75 -0
- package/dist/template-resolver/pdf-constants.d.ts +7 -0
- package/dist/template-resolver/pdf-constants.js +8 -0
- package/dist/template-resolver/preview-display-html.d.ts +7 -0
- package/dist/template-resolver/preview-display-html.js +27 -0
- package/dist/template-resolver/print-document.d.ts +1 -0
- package/dist/template-resolver/print-document.js +55 -0
- package/dist/template-resolver/qualified-names.d.ts +34 -0
- package/dist/template-resolver/qualified-names.js +34 -0
- package/dist/template-resolver/record-mapping.d.ts +2 -0
- package/dist/template-resolver/record-mapping.js +21 -0
- package/dist/template-resolver/resource-image.d.ts +15 -0
- package/dist/template-resolver/resource-image.js +34 -0
- package/dist/template-resolver/seeding.d.ts +14 -1
- package/dist/template-resolver/seeding.js +125 -18
- package/dist/template-resolver/store-template-resource.d.ts +64 -0
- package/dist/template-resolver/store-template-resource.js +264 -0
- package/dist/template-resolver/table.d.ts +150 -8
- package/dist/template-resolver/table.js +20 -2
- package/dist/template-resolver/template-bundle.d.ts +36 -0
- package/dist/template-resolver/template-bundle.js +60 -0
- package/dist/template-resolver/template-diff.d.ts +7 -0
- package/dist/template-resolver/template-diff.js +68 -0
- package/dist/template-resolver/template-draft.d.ts +51 -0
- package/dist/template-resolver/template-draft.js +72 -0
- package/dist/template-resolver/template-meta.d.ts +85 -0
- package/dist/template-resolver/template-meta.js +145 -0
- package/dist/template-resolver/template-preview.d.ts +103 -0
- package/dist/template-resolver/template-preview.js +418 -0
- package/dist/template-resolver/template-resources.d.ts +19 -0
- package/dist/template-resolver/template-resources.js +73 -0
- package/dist/template-resolver/template-usage.d.ts +16 -0
- package/dist/template-resolver/template-usage.js +35 -0
- package/dist/template-resolver/template-validation.d.ts +22 -0
- package/dist/template-resolver/template-validation.js +173 -0
- package/dist/template-resolver/testing.js +5 -5
- package/dist/template-resolver/user-content-table.d.ts +14 -8
- package/dist/template-resolver/web/client-plugin.d.ts +1 -0
- package/dist/template-resolver/web/client-plugin.js +12 -7
- package/dist/template-resolver/web/document-editor-extensions.d.ts +18 -0
- package/dist/template-resolver/web/document-editor-extensions.js +145 -0
- package/dist/template-resolver/web/document-editor.d.ts +4 -0
- package/dist/template-resolver/web/document-editor.js +17 -0
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +3 -0
- package/dist/template-resolver/web/document-tiptap-editor.js +492 -0
- package/dist/template-resolver/web/document-toolbar-blocks.d.ts +41 -0
- package/dist/template-resolver/web/document-toolbar-blocks.js +19 -0
- package/dist/template-resolver/web/editor-handle.d.ts +3 -0
- package/dist/template-resolver/web/editor-handle.js +24 -0
- package/dist/template-resolver/web/i18n.js +91 -0
- package/dist/template-resolver/web/index.d.ts +5 -0
- package/dist/template-resolver/web/index.js +5 -0
- package/dist/template-resolver/web/placeholder-line-editor-lazy.d.ts +4 -0
- package/dist/template-resolver/web/placeholder-line-editor-lazy.js +16 -0
- package/dist/template-resolver/web/placeholder-line-editor.d.ts +17 -0
- package/dist/template-resolver/web/placeholder-line-editor.js +94 -0
- package/dist/template-resolver/web/placeholder-text.d.ts +4 -0
- package/dist/template-resolver/web/placeholder-text.js +34 -0
- package/dist/template-resolver/web/use-stable-by-key.d.ts +1 -0
- package/dist/template-resolver/web/use-stable-by-key.js +13 -0
- package/dist/tenant/handlers/add-member.write.d.ts +1 -1
- package/dist/tenant/handlers/cancel-invitation.write.d.ts +1 -1
- package/dist/tenant/handlers/create.write.d.ts +1 -1
- package/dist/tenant/handlers/remove-member.write.d.ts +1 -1
- package/dist/tenant/handlers/team-list.query.js +3 -2
- package/dist/tenant/handlers/toggle-enabled.write.d.ts +2 -2
- package/dist/tenant/handlers/update-member-roles.write.d.ts +1 -1
- package/dist/tenant/handlers/update.write.d.ts +1 -1
- package/dist/tenant/seeding.js +31 -6
- package/dist/tenant-handover/handlers/claim.write.d.ts +1 -1
- package/dist/tenant-lifecycle/handlers/cancel-destruction.write.d.ts +2 -2
- package/dist/tenant-lifecycle/handlers/cancel-destruction.write.js +2 -1
- package/dist/tenant-lifecycle/handlers/request-destruction.write.d.ts +1 -1
- package/dist/tier-engine/feature.js +9 -3
- package/dist/tier-engine/handlers/set-tenant-tier.write.d.ts +1 -1
- package/dist/user/db/queries/stream-tenant-backfill.js +4 -4
- package/dist/user/handlers/create.write.d.ts +1 -1
- package/dist/user/handlers/detail.query.js +2 -1
- package/dist/user/handlers/update.write.d.ts +1 -1
- package/dist/user/resolve-display-names.js +5 -9
- package/dist/user/seeding.js +20 -1
- package/dist/user-data-rights/db/queries/forget-cleanup.d.ts +2 -2
- package/dist/user-data-rights/email-templates.d.ts +1 -29
- package/dist/user-data-rights/email-templates.js +5 -106
- package/dist/user-data-rights/feature.js +53 -35
- package/dist/user-data-rights/handlers/cancel-deletion.write.d.ts +2 -2
- package/dist/user-data-rights/handlers/cancel-deletion.write.js +2 -1
- package/dist/user-data-rights/handlers/confirm-deletion-by-token.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/lift-restriction.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/request-deletion-by-email.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/request-deletion.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/request-deletion.write.js +5 -7
- package/dist/user-data-rights/handlers/request-export.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/restrict-account.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/run-forget-cleanup.write.d.ts +1 -1
- package/dist/user-data-rights/lib/default-mailers.d.ts +15 -7
- package/dist/user-data-rights/lib/default-mailers.js +100 -48
- package/dist/user-data-rights/lib/update-user-lifecycle.js +1 -1
- package/dist/user-data-rights/mail-notifications.d.ts +13 -0
- package/dist/user-data-rights/mail-notifications.js +118 -0
- package/dist/user-data-rights/web/privacy-center-screen.js +2 -1
- package/dist/user-profile/handlers/change-email.write.d.ts +1 -1
- package/dist/user-profile/web/profile-screen.js +2 -1
- package/dist/waitlist/feature.js +10 -0
- package/dist/waitlist/handlers/invite.write.d.ts +1 -1
- package/dist/waitlist/handlers/reject.write.d.ts +1 -1
- package/dist/waitlist/handlers/submit.write.d.ts +1 -1
- package/dist/waitlist/handlers/submit.write.js +3 -4
- package/dist/waitlist/mail.d.ts +19 -6
- package/dist/waitlist/mail.js +50 -14
- package/dist/waitlist/options.js +1 -1
- package/dist/workflow-runner/event-trigger.js +2 -2
- package/dist/workflow-runner/handlers/resume-run.write.js +7 -2
- package/package.json +37 -17
- package/src/admin-shell/changes.json +6 -0
- package/src/audit/changes.json +6 -0
- package/src/auth-email-password/changes.json +51 -0
- package/src/billing-foundation/changes.json +43 -0
- package/src/cap-counter/changes.json +6 -0
- package/src/channel-email/changes.json +19 -0
- package/src/config/changes.json +6 -0
- package/src/crypto-shredding/changes.json +6 -0
- package/src/custom-fields/changes.json +6 -0
- package/src/data-retention/changes.json +6 -0
- package/src/delivery/changes.json +66 -0
- package/src/file-foundation/changes.json +6 -0
- package/src/files-tenant-data/changes.json +6 -0
- package/src/inbound-mail-foundation/changes.json +6 -0
- package/src/jobs/changes.json +19 -0
- package/src/ledger/changes.json +7 -0
- package/src/managed-pages/changes.json +6 -0
- package/src/renderer-foundation/changes.json +39 -0
- package/src/renderer-pdf/changes.json +12 -0
- package/src/secrets/changes.json +6 -0
- package/src/shared/changes.json +6 -0
- package/src/subscription-stripe/changes.json +6 -0
- package/src/template-resolver/changes.json +186 -0
- package/src/tier-engine/changes.json +6 -0
- package/src/user/changes.json +6 -0
- package/src/user-data-rights/changes.json +13 -0
- package/src/user-profile/changes.json +1 -1
- package/src/waitlist/changes.json +7 -0
- package/src/workflow-runner/changes.json +6 -0
- package/dist/renderer-simple/feature.d.ts +0 -10
- package/dist/renderer-simple/feature.js +0 -42
- package/dist/renderer-simple/index.d.ts +0 -3
- package/dist/renderer-simple/index.js +0 -2
- package/dist/renderer-simple/mail-blocks.d.ts +0 -21
- package/dist/renderer-simple/mail-blocks.js +0 -107
- package/dist/renderer-simple/resolve-variables.d.ts +0 -7
- package/dist/renderer-simple/resolve-variables.js +0 -47
- package/dist/renderer-simple/simple-renderer.d.ts +0 -24
- package/dist/renderer-simple/simple-renderer.js +0 -200
- package/src/renderer-simple/changes.json +0 -27
|
@@ -5,4 +5,4 @@ export declare const triggerWrite: import("@cosmicdrift/kumiko-types/define-hand
|
|
|
5
5
|
}, z.core.$strip>, {
|
|
6
6
|
jobName: string;
|
|
7
7
|
bullJobId: string;
|
|
8
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
8
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
@@ -103,6 +103,7 @@ async function encryptStartedPayload(payload, triggeredById) {
|
|
|
103
103
|
const TENANT_JOB_FAILURE_LOCK_NAMESPACE = 0x746a666c;
|
|
104
104
|
// 'tjrl': serialises the finished-row write + prune per tenant run key.
|
|
105
105
|
const TENANT_JOB_RUN_LOCK_NAMESPACE = 0x746a726c;
|
|
106
|
+
const TENANT_RUN_CONFLICT_KEYS = ["tenantId", "jobName", "bullJobId"];
|
|
106
107
|
// fw#3079 — which row the tenant-visible failure record lives in: one per
|
|
107
108
|
// (tenant, job, subject), so the next outcome of the same work replaces or
|
|
108
109
|
// clears it. `subject` is null for a job that declares no subjectFields.
|
|
@@ -156,9 +157,22 @@ async function recordTenantRunQueued(db, jobName, bullJobId, meta) {
|
|
|
156
157
|
if (!key)
|
|
157
158
|
return;
|
|
158
159
|
const now = Temporal.Now.instant();
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
await transaction(db, async (tx) => {
|
|
161
|
+
// A finished row under the same id is left over from before a Redis reset
|
|
162
|
+
// (ids restart at 1), not this job. Only rows that went through this hook
|
|
163
|
+
// (queuedAt set) qualify: a fast worker can finish before the hook runs,
|
|
164
|
+
// and that row is this job's own and must stay.
|
|
165
|
+
await deleteMany(tx, tenantJobRunsTable, {
|
|
166
|
+
tenantId: key.tenantId,
|
|
167
|
+
jobName,
|
|
168
|
+
bullJobId,
|
|
169
|
+
status: { in: ["completed", "failed"] },
|
|
170
|
+
queuedAt: { gt: Temporal.Instant.fromEpochMilliseconds(0) },
|
|
171
|
+
});
|
|
172
|
+
// DO NOTHING: a fast worker can report the start before this enqueue hook
|
|
173
|
+
// returns, and a repeated jobId (debounce, fan-out dedup) is the same job.
|
|
174
|
+
await insertOnConflictDoNothing(tx, tenantJobRunsTable, { ...key, bullJobId, status: "queued", queuedAt: now, updatedAt: now }, { conflictKeys: [...TENANT_RUN_CONFLICT_KEYS] });
|
|
175
|
+
});
|
|
162
176
|
}
|
|
163
177
|
async function recordTenantRunStarted(db, jobName, bullJobId, meta) {
|
|
164
178
|
// skip: job did not opt in to tenantVisibleRun
|
|
@@ -170,7 +184,7 @@ async function recordTenantRunStarted(db, jobName, bullJobId, meta) {
|
|
|
170
184
|
return;
|
|
171
185
|
const now = Temporal.Now.instant();
|
|
172
186
|
await upsertOnConflict(db, tenantJobRunsTable, { ...key, bullJobId, status: "running", startedAt: now, updatedAt: now }, {
|
|
173
|
-
conflictKeys: [
|
|
187
|
+
conflictKeys: [...TENANT_RUN_CONFLICT_KEYS],
|
|
174
188
|
update: { status: "running", startedAt: now, finishedAt: null, updatedAt: now },
|
|
175
189
|
});
|
|
176
190
|
}
|
|
@@ -186,7 +200,7 @@ async function recordTenantRunOutcome(db, jobName, bullJobId, outcome, result) {
|
|
|
186
200
|
// A failed attempt BullMQ will retry goes back to waiting: the tenant keeps
|
|
187
201
|
// seeing pending work, not a failure the next attempt may still resolve.
|
|
188
202
|
if (result === "failed" && !outcome.finalAttempt) {
|
|
189
|
-
await updateMany(db, tenantJobRunsTable, { status: "queued", startedAt: null, finishedAt: null, updatedAt: now }, { bullJobId });
|
|
203
|
+
await updateMany(db, tenantJobRunsTable, { status: "queued", startedAt: null, finishedAt: null, updatedAt: now }, { tenantId: key.tenantId, jobName, bullJobId });
|
|
190
204
|
// skip: retry pending, the row stays active until the final attempt
|
|
191
205
|
return;
|
|
192
206
|
}
|
|
@@ -196,7 +210,10 @@ async function recordTenantRunOutcome(db, jobName, bullJobId, outcome, result) {
|
|
|
196
210
|
// both behind.
|
|
197
211
|
await transaction(db, async (tx) => {
|
|
198
212
|
await acquireNamespacedAdvisoryLock(tx, TENANT_JOB_RUN_LOCK_NAMESPACE, JSON.stringify([key.tenantId, key.jobName, key.subject]));
|
|
199
|
-
await upsertOnConflict(tx, tenantJobRunsTable, { ...key, bullJobId, status: result, finishedAt: now, updatedAt: now }, {
|
|
213
|
+
await upsertOnConflict(tx, tenantJobRunsTable, { ...key, bullJobId, status: result, finishedAt: now, updatedAt: now }, {
|
|
214
|
+
conflictKeys: [...TENANT_RUN_CONFLICT_KEYS],
|
|
215
|
+
update: { status: result, finishedAt: now, updatedAt: now },
|
|
216
|
+
});
|
|
200
217
|
await deleteMany(tx, tenantJobRunsTable, {
|
|
201
218
|
...key,
|
|
202
219
|
status: { in: ["completed", "failed"] },
|
|
@@ -204,8 +221,13 @@ async function recordTenantRunOutcome(db, jobName, bullJobId, outcome, result) {
|
|
|
204
221
|
});
|
|
205
222
|
});
|
|
206
223
|
}
|
|
207
|
-
async function dropTenantRunQueued(db, bullJobId) {
|
|
208
|
-
await deleteMany(db, tenantJobRunsTable, {
|
|
224
|
+
async function dropTenantRunQueued(db, jobName, bullJobId, meta) {
|
|
225
|
+
await deleteMany(db, tenantJobRunsTable, {
|
|
226
|
+
tenantId: meta.tenantId,
|
|
227
|
+
jobName,
|
|
228
|
+
bullJobId,
|
|
229
|
+
status: "queued",
|
|
230
|
+
});
|
|
209
231
|
}
|
|
210
232
|
const log = createFallbackLogger("job-run-logger");
|
|
211
233
|
// The tenant run state is an optional side write: a throw here must not
|
|
@@ -287,8 +309,8 @@ export function createJobRunLogger(opts) {
|
|
|
287
309
|
onJobQueued: async (jobName, bullJobId, meta) => {
|
|
288
310
|
await isolateTenantRunWrite(() => recordTenantRunQueued(db, jobName, bullJobId, meta), jobName, bullJobId);
|
|
289
311
|
},
|
|
290
|
-
onJobDropped: async (jobName, bullJobId) => {
|
|
291
|
-
await isolateTenantRunWrite(() => dropTenantRunQueued(db, bullJobId), jobName, bullJobId);
|
|
312
|
+
onJobDropped: async (jobName, bullJobId, meta) => {
|
|
313
|
+
await isolateTenantRunWrite(() => dropTenantRunQueued(db, jobName, bullJobId, meta), jobName, bullJobId);
|
|
292
314
|
},
|
|
293
315
|
onJobStart: async (jobName, bullJobId, meta) => {
|
|
294
316
|
await isolateTenantRunWrite(() => recordTenantRunStarted(db, jobName, bullJobId, meta), jobName, bullJobId);
|
|
@@ -8,7 +8,7 @@ import { index, instant, table as pgTable, serial, sql, text, uniqueIndex, uuid,
|
|
|
8
8
|
// job is invisible there. This table holds no payload, error text or logs by
|
|
9
9
|
// design — the tenant learns only that work is waiting, running or finished.
|
|
10
10
|
//
|
|
11
|
-
// One row per BullMQ job. Active rows (queued/running) are kept as they are;
|
|
11
|
+
// One row per BullMQ job and (tenant, job name). Active rows (queued/running) are kept as they are;
|
|
12
12
|
// a finished row replaces earlier finished rows of the same (tenant, job,
|
|
13
13
|
// subject), so only the latest outcome stays. `subject` is the canonical JSON
|
|
14
14
|
// of the job's declared subjectFields, or NULL for none — stored in clear, so
|
|
@@ -25,7 +25,8 @@ export const tenantJobRunsTable = pgTable("store_tenant_job_runs", {
|
|
|
25
25
|
finishedAt: instant("finished_at"),
|
|
26
26
|
updatedAt: instant("updated_at").default(sql `now()`).notNull(),
|
|
27
27
|
}, (t) => [
|
|
28
|
-
|
|
28
|
+
// BullMQ ids are unique per queue only; the id alone would let two tenants collide.
|
|
29
|
+
uniqueIndex("store_tenant_job_runs_tenant_job_bull_job_id_unique").on(t.tenantId, t.jobName, t.bullJobId),
|
|
29
30
|
// Finishing a run prunes older outcomes by this key; the tenant query reads by it.
|
|
30
31
|
index("store_tenant_job_runs_tenant_job_subject_idx").on(t.tenantId, t.jobName, t.subject),
|
|
31
32
|
// Stale sweep and retention filter on age alone.
|
package/dist/ledger/entity.js
CHANGED
|
@@ -160,7 +160,9 @@ export const scheduleEntity = createEntity({
|
|
|
160
160
|
},
|
|
161
161
|
// Find-then-create by sourceRef races across tabs/devices; only the DB closes
|
|
162
162
|
// that gap. Partial because sourceRef is optional. A new name (not the old
|
|
163
|
-
// non-unique default) keeps the migration an in-place CREATE UNIQUE INDEX
|
|
163
|
+
// non-unique default) keeps the migration an in-place CREATE UNIQUE INDEX;
|
|
164
|
+
// that statement, like a projection rebuild, fails on existing duplicate
|
|
165
|
+
// (tenant_id, source_ref) pairs, so duplicates must be cleaned up beforehand.
|
|
164
166
|
indexes: [
|
|
165
167
|
{ columns: ["tenantId", "subjectType", "subjectId"] },
|
|
166
168
|
{
|
package/dist/ledger/recurring.js
CHANGED
|
@@ -23,9 +23,7 @@ export function scheduleReference(scheduleId, period) {
|
|
|
23
23
|
// can't land in one call-site and drift from the other.
|
|
24
24
|
export function findReversedIds(rows) {
|
|
25
25
|
const ids = new Set(rows.map((r) => r.id));
|
|
26
|
-
return new Set(rows
|
|
27
|
-
.filter((r) => r.reference !== null && ids.has(r.reference))
|
|
28
|
-
.map((r) => r.reference));
|
|
26
|
+
return new Set(rows.flatMap((r) => (r.reference !== null && ids.has(r.reference) ? [r.reference] : [])));
|
|
29
27
|
}
|
|
30
28
|
// "YYYY-MM" ⇄ a month index (year*12 + monthOfYear), so window math is pure
|
|
31
29
|
// integer arithmetic — no Date object (no-date-api guard) and no DST/timezone
|
|
@@ -8,6 +8,7 @@ export declare const BRANDING_KEYS: {
|
|
|
8
8
|
brandingSiteUrl: ConfigKeyDefinition<"text">;
|
|
9
9
|
brandingAccentColor: ConfigKeyDefinition<"text">;
|
|
10
10
|
brandingLogoUrl: ConfigKeyDefinition<"text">;
|
|
11
|
+
brandingLogoFile: ConfigKeyDefinition<"text">;
|
|
11
12
|
brandingLayoutPreset: ConfigKeyDefinition<"select">;
|
|
12
13
|
};
|
|
13
14
|
export declare const CUSTOM_CSS_KEY: {
|
|
@@ -19,6 +20,7 @@ export declare const BRANDING_QN: {
|
|
|
19
20
|
readonly siteUrl: "managed-pages:config:branding-site-url";
|
|
20
21
|
readonly accentColor: "managed-pages:config:branding-accent-color";
|
|
21
22
|
readonly logoUrl: "managed-pages:config:branding-logo-url";
|
|
23
|
+
readonly logoFile: "managed-pages:config:branding-logo-file";
|
|
22
24
|
readonly layoutPreset: "managed-pages:config:branding-layout-preset";
|
|
23
25
|
readonly customCss: "managed-pages:config:branding-custom-css";
|
|
24
26
|
};
|
|
@@ -42,6 +42,10 @@ const DESCRIPTION_PATTERN = { regex: "^[\\s\\S]{0,500}$" };
|
|
|
42
42
|
// render (page-render/css-sanitize.ts). Keep this cap in sync with MAX_CSS_LENGTH
|
|
43
43
|
// there.
|
|
44
44
|
const CUSTOM_CSS_PATTERN = { regex: "^[\\s\\S]{0,8000}$" };
|
|
45
|
+
// Empty or a FileRef id (UUID); the upload UI that fills it ships separately.
|
|
46
|
+
const FILE_REF_ID_PATTERN = {
|
|
47
|
+
regex: "^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
48
|
+
};
|
|
45
49
|
export const LAYOUT_PRESETS = ["minimal", "centered", "wide"];
|
|
46
50
|
// Companion toggle feature name. managed-pages reads ctx.hasFeature() against it
|
|
47
51
|
// in the branding query to per-tenant-gate custom-CSS emission. Declared as a
|
|
@@ -80,6 +84,12 @@ export const BRANDING_KEYS = {
|
|
|
80
84
|
pattern: HTTPS_PATTERN,
|
|
81
85
|
write: BRANDING_WRITE,
|
|
82
86
|
}),
|
|
87
|
+
// Ownership is checked where it is read (renderer-mail-html: FileRef must belong to the rendering tenant).
|
|
88
|
+
brandingLogoFile: createTenantConfig("text", {
|
|
89
|
+
default: "",
|
|
90
|
+
pattern: FILE_REF_ID_PATTERN,
|
|
91
|
+
write: BRANDING_WRITE,
|
|
92
|
+
}),
|
|
83
93
|
brandingLayoutPreset: createTenantConfig("select", {
|
|
84
94
|
default: "centered",
|
|
85
95
|
options: LAYOUT_PRESETS,
|
|
@@ -99,6 +109,7 @@ export const BRANDING_QN = {
|
|
|
99
109
|
siteUrl: "managed-pages:config:branding-site-url",
|
|
100
110
|
accentColor: "managed-pages:config:branding-accent-color",
|
|
101
111
|
logoUrl: "managed-pages:config:branding-logo-url",
|
|
112
|
+
logoFile: "managed-pages:config:branding-logo-file",
|
|
102
113
|
layoutPreset: "managed-pages:config:branding-layout-preset",
|
|
103
114
|
customCss: "managed-pages:config:branding-custom-css",
|
|
104
115
|
};
|
|
@@ -114,17 +125,27 @@ async function readText(config, qualifiedKey) {
|
|
|
114
125
|
export async function readBranding(config) {
|
|
115
126
|
if (!config)
|
|
116
127
|
return EMPTY_BRANDING;
|
|
117
|
-
const [title, description, siteUrl, accentColor, logoUrl, layoutPreset] = await Promise.all([
|
|
128
|
+
const [title, description, siteUrl, accentColor, logoUrl, logoFile, layoutPreset] = await Promise.all([
|
|
118
129
|
readText(config, BRANDING_QN.title),
|
|
119
130
|
readText(config, BRANDING_QN.description),
|
|
120
131
|
readText(config, BRANDING_QN.siteUrl),
|
|
121
132
|
readText(config, BRANDING_QN.accentColor),
|
|
122
133
|
readText(config, BRANDING_QN.logoUrl),
|
|
134
|
+
readText(config, BRANDING_QN.logoFile),
|
|
123
135
|
readText(config, BRANDING_QN.layoutPreset),
|
|
124
136
|
]);
|
|
125
137
|
// customCss stays "" here — it is gated (allowCustomCss + per-tenant toggle)
|
|
126
138
|
// and read separately by the branding query via readCustomCss.
|
|
127
|
-
return {
|
|
139
|
+
return {
|
|
140
|
+
title,
|
|
141
|
+
description,
|
|
142
|
+
siteUrl,
|
|
143
|
+
accentColor,
|
|
144
|
+
logoUrl,
|
|
145
|
+
logoFile,
|
|
146
|
+
layoutPreset,
|
|
147
|
+
customCss: "",
|
|
148
|
+
};
|
|
128
149
|
}
|
|
129
150
|
// Read the raw, untrusted custom CSS for the request's tenant. The caller (the
|
|
130
151
|
// branding query) only invokes this once the gate has passed; the value is
|
|
@@ -150,6 +171,7 @@ export function coerceBranding(value) {
|
|
|
150
171
|
siteUrl: stringField(source, "siteUrl"),
|
|
151
172
|
accentColor: stringField(source, "accentColor"),
|
|
152
173
|
logoUrl: stringField(source, "logoUrl"),
|
|
174
|
+
logoFile: stringField(source, "logoFile"),
|
|
153
175
|
layoutPreset: stringField(source, "layoutPreset"),
|
|
154
176
|
customCss: stringField(source, "customCss"),
|
|
155
177
|
};
|
|
@@ -12,4 +12,4 @@ export declare const setWrite: import("@cosmicdrift/kumiko-types/define-handler"
|
|
|
12
12
|
slug: string;
|
|
13
13
|
lang: string;
|
|
14
14
|
isNew: boolean;
|
|
15
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
15
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
@@ -37,6 +37,7 @@ export const MANAGED_PAGES_I18N = {
|
|
|
37
37
|
en: "Accent color",
|
|
38
38
|
},
|
|
39
39
|
"managed-pages:entity:__config-edit__:field:logoUrl": { en: "Logo URL" },
|
|
40
|
+
"managed-pages:entity:__config-edit__:field:logoFile": { en: "Logo file" },
|
|
40
41
|
"managed-pages:entity:__config-edit__:field:layoutPreset": { en: "Layout" },
|
|
41
42
|
// Section-Header
|
|
42
43
|
"managed-pages:section.meta": { en: "Metadata" },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSelectField, createTextField, } from "@cosmicdrift/kumiko-framework/engine";
|
|
1
|
+
import { createImageField, createSelectField, createTextField, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { BRANDING_QN, LAYOUT_PRESETS } from "../branding.js";
|
|
3
3
|
// Tenant self-service branding editor. A `configEdit` screen (no entity
|
|
4
4
|
// table) — the renderer loads config:query:values, maps the form fields via
|
|
@@ -27,6 +27,7 @@ export function createBrandingSettingsScreen(opts) {
|
|
|
27
27
|
siteUrl: BRANDING_QN.siteUrl,
|
|
28
28
|
accentColor: BRANDING_QN.accentColor,
|
|
29
29
|
logoUrl: BRANDING_QN.logoUrl,
|
|
30
|
+
logoFile: BRANDING_QN.logoFile,
|
|
30
31
|
layoutPreset: BRANDING_QN.layoutPreset,
|
|
31
32
|
},
|
|
32
33
|
fields: {
|
|
@@ -54,6 +55,11 @@ export function createBrandingSettingsScreen(opts) {
|
|
|
54
55
|
personal: false,
|
|
55
56
|
reason: "is_business_data",
|
|
56
57
|
}),
|
|
58
|
+
logoFile: createImageField({
|
|
59
|
+
accept: ["image/png", "image/jpeg", "image/webp"],
|
|
60
|
+
personal: false,
|
|
61
|
+
reason: "is_business_data",
|
|
62
|
+
}),
|
|
57
63
|
layoutPreset: createSelectField({ options: LAYOUT_PRESETS }),
|
|
58
64
|
},
|
|
59
65
|
layout: {
|
|
@@ -67,6 +73,7 @@ export function createBrandingSettingsScreen(opts) {
|
|
|
67
73
|
{ field: "description", span: 2 },
|
|
68
74
|
{ field: "siteUrl", span: 1 },
|
|
69
75
|
{ field: "logoUrl", span: 1 },
|
|
76
|
+
{ field: "logoFile", span: 1 },
|
|
70
77
|
{ field: "accentColor", span: 1 },
|
|
71
78
|
],
|
|
72
79
|
},
|
|
@@ -23,7 +23,7 @@ safeRenderer.use({
|
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
25
|
export function renderSafeMarkdown(markdown) {
|
|
26
|
-
// @cast-boundary marked.parse return-type ist `string | Promise<string>`;
|
|
26
|
+
// @cast-boundary third-party-type-gap marked.parse return-type ist `string | Promise<string>`;
|
|
27
27
|
// `{ async: false }` garantiert sync (string) — Cast nur API-Vertragsfix.
|
|
28
28
|
return safeRenderer.parse(markdown, { async: false });
|
|
29
29
|
}
|
|
@@ -27,7 +27,7 @@ export function bindPatAutoRevokeOnPasswordChangeFromFeature(feature) {
|
|
|
27
27
|
if (exports && typeof exports === "object" && "bindAutoRevokeOnPasswordChange" in exports) {
|
|
28
28
|
const { bindAutoRevokeOnPasswordChange } = exports;
|
|
29
29
|
if (typeof bindAutoRevokeOnPasswordChange === "function") {
|
|
30
|
-
// @cast-boundary exports
|
|
30
|
+
// @cast-boundary feature-exports — feature.exports is untyped by design
|
|
31
31
|
return bindAutoRevokeOnPasswordChange;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -17,4 +17,4 @@ export declare function createPatCreateHandler(opts?: CreatePatOptions): import(
|
|
|
17
17
|
id: string;
|
|
18
18
|
token: string;
|
|
19
19
|
prefix: string;
|
|
20
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
20
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
2
2
|
import { definePagedQueryHandler, MAX_LIST_LIMIT } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
+
import { isOneOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
3
4
|
import * as z from "zod";
|
|
4
5
|
import { decryptStoredPii } from "../../shared/index.js";
|
|
5
6
|
import { isExpiredAt } from "../expiry.js";
|
|
@@ -10,7 +11,7 @@ import { apiTokenTable } from "../schema/api-token.js";
|
|
|
10
11
|
// client sorting by tokenHash or any other non-exposed column.
|
|
11
12
|
const SORTABLE_COLUMNS = ["id", "name", "createdAt", "expiresAt", "revokedAt"];
|
|
12
13
|
function isSortableColumn(value) {
|
|
13
|
-
return SORTABLE_COLUMNS
|
|
14
|
+
return isOneOf(SORTABLE_COLUMNS, value);
|
|
14
15
|
}
|
|
15
16
|
function tokenStatus(row) {
|
|
16
17
|
if (row.revokedAt !== null)
|
|
@@ -3,4 +3,4 @@ export declare const revokePatWrite: import("@cosmicdrift/kumiko-types/define-ha
|
|
|
3
3
|
id: z.ZodUUID;
|
|
4
4
|
}, z.core.$strip>, {
|
|
5
5
|
id: string;
|
|
6
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
6
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
@@ -3,11 +3,12 @@ import { SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
|
3
3
|
import { append } from "@cosmicdrift/kumiko-framework/event-store";
|
|
4
4
|
import { generateId } from "@cosmicdrift/kumiko-framework/utils";
|
|
5
5
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
6
|
+
import { propertyOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
6
7
|
import { PAT_REVOKED_AGGREGATE_TYPE, PAT_REVOKED_EVENT_QN, patRevokedSchema, } from "./pat-revoked-event.js";
|
|
7
8
|
import { apiTokenTable } from "./schema/api-token.js";
|
|
8
9
|
// A pool has begin(); a tx/savepoint handle does not and is already atomic.
|
|
9
10
|
function canBeginTransaction(db) {
|
|
10
|
-
return typeof db
|
|
11
|
+
return typeof propertyOf(db, "begin") === "function";
|
|
11
12
|
}
|
|
12
13
|
// Cross-tenant revoke: password-change and MFA-enable/disable are account-
|
|
13
14
|
// level security events, not scoped to one tenant. Mirrors sessions'
|
|
@@ -3,21 +3,21 @@ import { type RenderKind } from "./constants.js";
|
|
|
3
3
|
import { type RendererPlugin } from "./types.js";
|
|
4
4
|
export type RendererFoundationApi = {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Selects + returns a RendererPlugin for (tenantId × kind). Callers
|
|
7
|
+
* then invoke `plugin.render(req, ctx)`.
|
|
8
8
|
*
|
|
9
|
-
* **
|
|
10
|
-
* 1. Tenant-
|
|
11
|
-
* 2. DEFAULT_PLUGIN_BY_KIND
|
|
12
|
-
* 3.
|
|
13
|
-
* 4. `RendererError("no_plugin_for_kind")`
|
|
9
|
+
* **Selection order:**
|
|
10
|
+
* 1. Tenant-specific config (config bundle: `rendererPluginByKind`)
|
|
11
|
+
* 2. DEFAULT_PLUGIN_BY_KIND from constants
|
|
12
|
+
* 3. First plugin in the pool that serves the kind
|
|
13
|
+
* 4. `RendererError("no_plugin_for_kind")` if nothing matches
|
|
14
14
|
*
|
|
15
|
-
* **Caller
|
|
16
|
-
* `ctx.user.tenantId`). Plugins
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* Plugins
|
|
15
|
+
* **Caller pattern:** `tenantId` MUST come from the server (typically
|
|
16
|
+
* `ctx.user.tenantId`). Plugins that need service access (e.g.
|
|
17
|
+
* `@cosmicdrift/kumiko-renderer-mail-html` for layout resolution via `template-resolver`)
|
|
18
|
+
* receive `RendererContext` as the second argument to `render()` —
|
|
19
|
+
* matches the pattern of `DeliveryChannel.send(addr, msg, ctx)`.
|
|
20
|
+
* Plugins without service deps ignore ctx.
|
|
21
21
|
*/
|
|
22
22
|
readonly createRendererForTenant: (args: {
|
|
23
23
|
readonly tenantId: TenantId;
|
|
@@ -34,7 +34,7 @@ export function createRendererFoundationApi(plugins, tenantConfigLookup = () =>
|
|
|
34
34
|
if (first)
|
|
35
35
|
return first;
|
|
36
36
|
// 4. Kein Plugin → Error
|
|
37
|
-
throw new RendererError(`[renderer-foundation] no plugin registered for kind="${kind}". Mount at least one plugin (renderer-
|
|
37
|
+
throw new RendererError(`[renderer-foundation] no plugin registered for kind="${kind}". Mount at least one plugin (renderer-mail-html, renderer-puppeteer-client) for this kind.`, "no_plugin_for_kind");
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
// Extension-point name for renderer plugins (renderer-
|
|
2
|
-
// renderer-mail-html, renderer-puppeteer-client, ...).
|
|
1
|
+
// Extension-point name for renderer plugins (@cosmicdrift/kumiko-renderer-mail-html, @cosmicdrift/kumiko-renderer-puppeteer-client, ...).
|
|
3
2
|
export const RENDERER_EXTENSION = "renderer";
|
|
4
3
|
export { CONTENT_FORMATS, RENDER_KINDS, } from "../template-resolver/index.js";
|
|
5
4
|
// Standard-Default-Plugin pro Kind, wenn Tenant keine explizite Config
|
|
6
5
|
// gesetzt hat. App-Bootstrap kann das via TenantConfigKey überschreiben.
|
|
7
6
|
export const DEFAULT_PLUGIN_BY_KIND = {
|
|
8
|
-
|
|
9
|
-
"mail-html": "mail-html",
|
|
7
|
+
mail: "mail-html",
|
|
10
8
|
"document-pdf": "puppeteer",
|
|
11
9
|
"image-snapshot": "puppeteer",
|
|
12
10
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import { RENDERER_EXTENSION } from "./constants.js";
|
|
3
3
|
import { isRendererRegistrationPlugin } from "./types.js";
|
|
4
|
-
// renderer-foundation —
|
|
5
|
-
//
|
|
4
|
+
// renderer-foundation — plugin foundation for renderers (HTML mail, PDF,
|
|
5
|
+
// image). Plan doc:
|
|
6
6
|
// kumiko-platform/docs/plans/features/renderer-foundation.md
|
|
7
7
|
//
|
|
8
|
-
// Pattern
|
|
9
|
-
//
|
|
10
|
-
// renderer-puppeteer-client)
|
|
11
|
-
//
|
|
8
|
+
// Pattern symmetric to ai-foundation: the foundation defines the
|
|
9
|
+
// extension point `renderer`, plugins (@cosmicdrift/kumiko-renderer-mail-html,
|
|
10
|
+
// @cosmicdrift/kumiko-renderer-puppeteer-client) register via `r.useExtension`.
|
|
11
|
+
// Consumers get a plugin at runtime via createRendererForTenant.
|
|
12
12
|
export function createRendererFoundationFeature() {
|
|
13
13
|
return defineFeature("renderer-foundation", (r) => {
|
|
14
|
-
r.describe('Plugin registry for content rendering (
|
|
14
|
+
r.describe('Plugin registry for content rendering (mail HTML, PDF, images): call `foundation.createRendererForTenant({ tenantId, kind })` at render time to get the right renderer plugin selected by kind, with tenant-level overrides via the `rendererPluginByKind` config key. Requires `template-resolver` (declared via `r.requires`). Low-level building block \u2014 add `renderer-mail-html` (or write a custom plugin via `r.useExtension("renderer", name, { kinds, render })`) rather than using this feature alone.');
|
|
15
15
|
r.uiHints({
|
|
16
16
|
displayLabel: "Renderer Foundation",
|
|
17
17
|
category: "notifications",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
export { attachmentFileNameSchema } from "../shared/index.js";
|
|
1
2
|
export { createRendererFoundationApi, type RendererFoundationApi, requireRendererFoundation, } from "./api.js";
|
|
2
3
|
export { CONTENT_FORMATS, type ContentFormat, DEFAULT_PLUGIN_BY_KIND, RENDER_KINDS, RENDERER_EXTENSION, type RenderKind, } from "./constants.js";
|
|
3
4
|
export { collectRendererPlugins, createRendererFoundationFeature } from "./feature.js";
|
|
4
|
-
export { type DocumentPayload, type ImageOptions, isRendererRegistrationPlugin, type
|
|
5
|
+
export { type DocumentPayload, type DocumentPdfDraft, type DocumentPdfPayload, type DocumentPreview, type DocumentPreviewRequest, type FileAttachmentRef, type ImageOptions, type InlineAttachmentRef, isRendererRegistrationPlugin, type MailAttachmentRef, type MailDraft, type MailPayload, type PdfOptions, type RenderedPdfAttachmentRef, type RenderedTemplateRef, type RendererContext, RendererError, type RendererPlugin, type RendererRegistrationPlugin, type RenderProvenance, type RenderRequest, type RenderResponse, } from "./types.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { attachmentFileNameSchema } from "../shared/index.js";
|
|
1
2
|
export { createRendererFoundationApi, requireRendererFoundation, } from "./api.js";
|
|
2
3
|
export { CONTENT_FORMATS, DEFAULT_PLUGIN_BY_KIND, RENDER_KINDS, RENDERER_EXTENSION, } from "./constants.js";
|
|
3
4
|
export { collectRendererPlugins, createRendererFoundationFeature } from "./feature.js";
|