@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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
type OverrideStatus = "active" | "draft";
|
|
3
|
+
export declare const tenantOverridesQuery: import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"tenant-overrides", z.ZodObject<{
|
|
4
|
+
slug: z.ZodString;
|
|
5
|
+
kind: z.ZodEnum<{
|
|
6
|
+
"ai-prompt": "ai-prompt";
|
|
7
|
+
"document-pdf": "document-pdf";
|
|
8
|
+
"image-snapshot": "image-snapshot";
|
|
9
|
+
mail: "mail";
|
|
10
|
+
"mail-layout": "mail-layout";
|
|
11
|
+
"pdf-layout": "pdf-layout";
|
|
12
|
+
}>;
|
|
13
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
14
|
+
diffTenantId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>, {
|
|
16
|
+
activeOverrides: number;
|
|
17
|
+
draftOverrides: number;
|
|
18
|
+
totalTenants: number | null;
|
|
19
|
+
rows: {
|
|
20
|
+
tenantId: string;
|
|
21
|
+
tenantName: string;
|
|
22
|
+
templateId: string;
|
|
23
|
+
locale: string;
|
|
24
|
+
status: OverrideStatus;
|
|
25
|
+
version: number;
|
|
26
|
+
changedAt: string;
|
|
27
|
+
changedBy: string | null;
|
|
28
|
+
}[];
|
|
29
|
+
diff: {
|
|
30
|
+
tenant: {
|
|
31
|
+
templateId: string;
|
|
32
|
+
templateVersion: number;
|
|
33
|
+
contentFormat: string;
|
|
34
|
+
};
|
|
35
|
+
system: {
|
|
36
|
+
templateId: string;
|
|
37
|
+
templateVersion: number;
|
|
38
|
+
contentFormat: string;
|
|
39
|
+
};
|
|
40
|
+
identical: boolean;
|
|
41
|
+
blocks: import("../template-diff.js").TemplateDiffBlock[];
|
|
42
|
+
meta: {
|
|
43
|
+
key: string;
|
|
44
|
+
tenant: unknown;
|
|
45
|
+
system: unknown;
|
|
46
|
+
}[];
|
|
47
|
+
} | null;
|
|
48
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
2
|
+
import { defineQueryHandler, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
import { TenantQueries } from "../../tenant/index.js";
|
|
5
|
+
import { templateResourcesTable } from "../table.js";
|
|
6
|
+
import { servedVersionOf } from "../template-draft.js";
|
|
7
|
+
import { buildOverrideDiff } from "./override-diff.js";
|
|
8
|
+
import { kindSchema, localeSchema, templateSlugSchema } from "./shared.js";
|
|
9
|
+
const TENANT_OVERRIDES_REASON = "SystemAdmin template overview lists which tenants override one system template; it reads tenant-scope template rows of every tenant (and the system row for the optional per-tenant diff), which the tenant-scoped db cannot reach";
|
|
10
|
+
const tenantIdsSchema = z.array(z.string());
|
|
11
|
+
const directorySchema = z.object({
|
|
12
|
+
rows: z.array(z.object({ id: z.string(), label: z.string() })),
|
|
13
|
+
});
|
|
14
|
+
function labelsOf(raw) {
|
|
15
|
+
return new Map(directorySchema.parse(raw).rows.map((row) => [row.id, row.label]));
|
|
16
|
+
}
|
|
17
|
+
// One row per tenant: its active override wins over a draft, then the newest version.
|
|
18
|
+
function isBetterRow(candidate, current) {
|
|
19
|
+
if ((candidate.status === "active") !== (current.status === "active")) {
|
|
20
|
+
return candidate.status === "active";
|
|
21
|
+
}
|
|
22
|
+
return candidate.version > current.version;
|
|
23
|
+
}
|
|
24
|
+
function statusOf(row) {
|
|
25
|
+
return row.status === "active" ? "active" : "draft";
|
|
26
|
+
}
|
|
27
|
+
function isCountedTenantRow(row, enabledTenantIds) {
|
|
28
|
+
if (row.tenantId === SYSTEM_TENANT_ID || row.status === "archived")
|
|
29
|
+
return false;
|
|
30
|
+
return enabledTenantIds === null || enabledTenantIds.has(row.tenantId);
|
|
31
|
+
}
|
|
32
|
+
function pickBestRowPerTenant(found, enabledTenantIds) {
|
|
33
|
+
const bestByTenant = new Map();
|
|
34
|
+
for (const row of found) {
|
|
35
|
+
if (!isCountedTenantRow(row, enabledTenantIds))
|
|
36
|
+
continue;
|
|
37
|
+
const current = bestByTenant.get(row.tenantId);
|
|
38
|
+
if (current === undefined || isBetterRow(row, current))
|
|
39
|
+
bestByTenant.set(row.tenantId, row);
|
|
40
|
+
}
|
|
41
|
+
return bestByTenant;
|
|
42
|
+
}
|
|
43
|
+
function toOverrideRow(row, tenantLabels, userLabels) {
|
|
44
|
+
const changedById = row.modifiedById ?? row.insertedById;
|
|
45
|
+
return {
|
|
46
|
+
tenantId: row.tenantId,
|
|
47
|
+
tenantName: tenantLabels.get(row.tenantId) ?? row.tenantId,
|
|
48
|
+
templateId: String(row.id),
|
|
49
|
+
locale: row.locale,
|
|
50
|
+
status: statusOf(row),
|
|
51
|
+
version: servedVersionOf(row),
|
|
52
|
+
changedAt: (row.modifiedAt ?? row.insertedAt).toString(),
|
|
53
|
+
changedBy: changedById === null ? null : (userLabels.get(changedById) ?? null),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export const tenantOverridesQuery = defineQueryHandler({
|
|
57
|
+
name: "tenant-overrides",
|
|
58
|
+
schema: z.object({
|
|
59
|
+
slug: templateSlugSchema,
|
|
60
|
+
kind: kindSchema,
|
|
61
|
+
locale: localeSchema.optional(),
|
|
62
|
+
/** Adds the block diff of this tenant's override against the system template. */
|
|
63
|
+
diffTenantId: z.string().min(1).optional(),
|
|
64
|
+
}),
|
|
65
|
+
access: { roles: ["SystemAdmin"] },
|
|
66
|
+
description: "Lists the enabled tenants that override one template with an active or a draft version (tenant name, status, version, last change and who made it), next to the counts and the number of enabled tenants; use it before changing a system template to see who keeps their own copy. With diffTenantId it also returns the block diff of that tenant's override against the system template.",
|
|
67
|
+
escapeHatch: { grants: ["unsafeRaw"], reason: TENANT_OVERRIDES_REASON },
|
|
68
|
+
handler: async (query, ctx) => {
|
|
69
|
+
const { slug, kind, locale, diffTenantId } = query.payload;
|
|
70
|
+
const raw = ctx.db.unsafeRaw();
|
|
71
|
+
const found = await selectMany(raw, templateResourcesTable, {
|
|
72
|
+
slug,
|
|
73
|
+
kind,
|
|
74
|
+
scope: "tenant",
|
|
75
|
+
...(locale === undefined ? {} : { locale }),
|
|
76
|
+
});
|
|
77
|
+
const hasTenantFeature = ctx.registry.getQueryHandler(TenantQueries.activeTenantIds) !== undefined;
|
|
78
|
+
const enabledTenantIds = hasTenantFeature
|
|
79
|
+
? new Set(tenantIdsSchema.parse(await ctx.query(TenantQueries.activeTenantIds, {})))
|
|
80
|
+
: null;
|
|
81
|
+
const bestByTenant = pickBestRowPerTenant(found, enabledTenantIds);
|
|
82
|
+
const best = [...bestByTenant.values()];
|
|
83
|
+
const tenantLabels = hasTenantFeature
|
|
84
|
+
? labelsOf(await ctx.query(TenantQueries.tenantDirectory, {}))
|
|
85
|
+
: new Map();
|
|
86
|
+
const userLabels = hasTenantFeature
|
|
87
|
+
? labelsOf(await ctx.query(TenantQueries.memberDirectory, {}))
|
|
88
|
+
: new Map();
|
|
89
|
+
const rows = best
|
|
90
|
+
.map((row) => toOverrideRow(row, tenantLabels, userLabels))
|
|
91
|
+
.sort((a, b) => a.tenantName.localeCompare(b.tenantName));
|
|
92
|
+
let diff = null;
|
|
93
|
+
const diffRow = diffTenantId === undefined ? undefined : bestByTenant.get(diffTenantId);
|
|
94
|
+
if (diffRow !== undefined) {
|
|
95
|
+
const [systemRow] = await selectMany(raw, templateResourcesTable, {
|
|
96
|
+
tenantId: SYSTEM_TENANT_ID,
|
|
97
|
+
slug,
|
|
98
|
+
kind,
|
|
99
|
+
locale: diffRow.locale,
|
|
100
|
+
});
|
|
101
|
+
if (systemRow !== undefined)
|
|
102
|
+
diff = buildOverrideDiff(diffRow, systemRow);
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
activeOverrides: best.filter((row) => row.status === "active").length,
|
|
106
|
+
draftOverrides: best.filter((row) => row.status !== "active").length,
|
|
107
|
+
totalTenants: enabledTenantIds === null ? null : enabledTenantIds.size,
|
|
108
|
+
rows,
|
|
109
|
+
diff,
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
});
|
|
@@ -1,15 +1,40 @@
|
|
|
1
|
+
import { type HandlerContext } from "@cosmicdrift/kumiko-framework/engine";
|
|
1
2
|
import * as z from "zod";
|
|
3
|
+
import type { TemplateResourceRow } from "../table.js";
|
|
2
4
|
type TemplateStatus = "active" | "archived";
|
|
5
|
+
export type StatusTarget = "own" | "system";
|
|
6
|
+
export declare function writeAccessFor(target: StatusTarget): {
|
|
7
|
+
roles: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function loadTargetRow(ctx: HandlerContext, target: StatusTarget, user: {
|
|
10
|
+
readonly tenantId: string;
|
|
11
|
+
}, id: string): Promise<{
|
|
12
|
+
db: import("@cosmicdrift/kumiko-types/tenant-db-types").TenantDb;
|
|
13
|
+
scoped: import("@cosmicdrift/kumiko-types/handlers").TenantWriteTarget | null;
|
|
14
|
+
row: TemplateResourceRow | null;
|
|
15
|
+
}>;
|
|
3
16
|
export declare const archiveWrite: import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<string, z.ZodObject<{
|
|
4
17
|
id: z.ZodString;
|
|
5
18
|
}, z.core.$strip>, {
|
|
6
19
|
id: string;
|
|
7
20
|
status: TemplateStatus;
|
|
8
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
21
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
9
22
|
export declare const publishWrite: import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<string, z.ZodObject<{
|
|
10
23
|
id: z.ZodString;
|
|
11
24
|
}, z.core.$strip>, {
|
|
12
25
|
id: string;
|
|
13
26
|
status: TemplateStatus;
|
|
14
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
27
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
28
|
+
export declare const archiveSystemWrite: import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<string, z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, {
|
|
31
|
+
id: string;
|
|
32
|
+
status: TemplateStatus;
|
|
33
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
34
|
+
export declare const publishSystemWrite: import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<string, z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
}, z.core.$strip>, {
|
|
37
|
+
id: string;
|
|
38
|
+
status: TemplateStatus;
|
|
39
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
15
40
|
export {};
|
|
@@ -1,30 +1,62 @@
|
|
|
1
1
|
import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
2
|
-
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { NotFoundError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
+
import { defineWriteHandler, SYSTEM_TENANT_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
+
import { NotFoundError, ValidationError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import * as z from "zod";
|
|
5
|
+
import { requireForTenant } from "../../shared/index.js";
|
|
5
6
|
import { templateResourcesTable } from "../table.js";
|
|
7
|
+
import { activationChanges, parseTemplateDraft, toWorkingRow } from "../template-draft.js";
|
|
6
8
|
import { executor } from "./shared.js";
|
|
7
|
-
|
|
9
|
+
import { publishGateIssues } from "./template-gates.js";
|
|
10
|
+
function isRowOfTarget(row, target, callerTenantId) {
|
|
11
|
+
return target === "system"
|
|
12
|
+
? row.tenantId === SYSTEM_TENANT_ID && row.scope === "system"
|
|
13
|
+
: row.tenantId === callerTenantId && row.scope === "tenant";
|
|
14
|
+
}
|
|
15
|
+
export function writeAccessFor(target) {
|
|
16
|
+
return { roles: target === "system" ? ["SystemAdmin"] : ["TenantAdmin", "SystemAdmin"] };
|
|
17
|
+
}
|
|
18
|
+
// The tenant db also reads system rows; the row's own tenant must match the
|
|
19
|
+
// target or the executor would append to a foreign event stream.
|
|
20
|
+
export async function loadTargetRow(ctx, target, user, id) {
|
|
21
|
+
const scoped = target === "system" ? requireForTenant(ctx, SYSTEM_TENANT_ID) : null;
|
|
22
|
+
const db = scoped?.db ?? ctx.db;
|
|
23
|
+
const row = await fetchOne(db, templateResourcesTable, { id });
|
|
24
|
+
return { db, scoped, row: row && isRowOfTarget(row, target, user.tenantId) ? row : null };
|
|
25
|
+
}
|
|
26
|
+
// Publishing promotes an open draft (gated as the version that goes live); a row
|
|
27
|
+
// without one is activated as stored. Archiving leaves the draft standing.
|
|
28
|
+
function planStatusChange(ctx, row, status) {
|
|
29
|
+
if (status === "archived")
|
|
30
|
+
return { ok: true, changes: { status } };
|
|
31
|
+
const issues = publishGateIssues(ctx.registry, toWorkingRow(row, row.tenantId));
|
|
32
|
+
if (issues.length > 0) {
|
|
33
|
+
return { ok: false, failure: writeFailure(new ValidationError({ fields: [...issues] })) };
|
|
34
|
+
}
|
|
35
|
+
return { ok: true, changes: { ...parseTemplateDraft(row.draft), ...activationChanges(row) } };
|
|
36
|
+
}
|
|
37
|
+
function createStatusUpdateHandler(name, target, status, description) {
|
|
8
38
|
return defineWriteHandler({
|
|
9
39
|
name,
|
|
10
40
|
schema: z.object({ id: z.string().min(1) }),
|
|
11
|
-
access:
|
|
41
|
+
access: writeAccessFor(target),
|
|
42
|
+
// A system template change reaches every tenant without an override.
|
|
43
|
+
...(target === "system" ? { agent: { risk: "high" } } : {}),
|
|
12
44
|
description,
|
|
13
45
|
handler: async (event, ctx) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const existing = await fetchOne(ctx.db, templateResourcesTable, {
|
|
17
|
-
id: event.payload.id,
|
|
18
|
-
});
|
|
19
|
-
if (!existing) {
|
|
46
|
+
const { db, scoped, row } = await loadTargetRow(ctx, target, event.user, event.payload.id);
|
|
47
|
+
if (!row)
|
|
20
48
|
return writeFailure(new NotFoundError("template-resource", event.payload.id));
|
|
21
|
-
|
|
22
|
-
|
|
49
|
+
const plan = planStatusChange(ctx, row, status);
|
|
50
|
+
if (!plan.ok)
|
|
51
|
+
return plan.failure;
|
|
52
|
+
const result = await executor.update({ id: row.id, version: row.version, changes: plan.changes }, event.user, db, scoped ? { streamTenantId: scoped.streamTenantId } : undefined);
|
|
23
53
|
if (!result.isSuccess)
|
|
24
54
|
return result;
|
|
25
|
-
return { isSuccess: true, data: { id: String(
|
|
55
|
+
return { isSuccess: true, data: { id: String(row.id), status } };
|
|
26
56
|
},
|
|
27
57
|
});
|
|
28
58
|
}
|
|
29
|
-
export const archiveWrite = createStatusUpdateHandler("archive", "archived", "Sets one template resource of the caller's tenant to archived so the resolver stops serving it while the row and its content survive; use it to retire a template reversibly instead of deleting it.");
|
|
30
|
-
export const publishWrite = createStatusUpdateHandler("publish", "active", "Sets one template resource of the caller's tenant to active so the resolver starts serving it; use it to release a draft written by upsert-tenant, or to bring an archived template back.");
|
|
59
|
+
export const archiveWrite = createStatusUpdateHandler("archive", "own", "archived", "Sets one template resource of the caller's tenant to archived so the resolver stops serving it while the row and its content survive; use it to retire a template reversibly instead of deleting it. An open draft stays.");
|
|
60
|
+
export const publishWrite = createStatusUpdateHandler("publish", "own", "active", "Sets one template resource of the caller's tenant to active so the resolver starts serving it; use it to release a draft written by upsert-tenant (a draft saved beside an active version replaces it), or to bring an archived template back; a version with unknown placeholders or unused required variables is refused and the served version stays.");
|
|
61
|
+
export const archiveSystemWrite = createStatusUpdateHandler("archive-system", "system", "archived", "Sets one system-default template to archived so the resolver stops serving it to every tenant that has no override; SystemAdmin only, reversible with publish-system.");
|
|
62
|
+
export const publishSystemWrite = createStatusUpdateHandler("publish-system", "system", "active", "Sets one system-default template to active so the resolver serves it again to every tenant that has no override; an open draft beside the active version replaces it; SystemAdmin only, a version with unknown placeholders or unused required variables is refused.");
|
|
@@ -4,8 +4,9 @@ export declare const upsertSystemWrite: import("@cosmicdrift/kumiko-types/define
|
|
|
4
4
|
"ai-prompt": "ai-prompt";
|
|
5
5
|
"document-pdf": "document-pdf";
|
|
6
6
|
"image-snapshot": "image-snapshot";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
mail: "mail";
|
|
8
|
+
"mail-layout": "mail-layout";
|
|
9
|
+
"pdf-layout": "pdf-layout";
|
|
9
10
|
}>;
|
|
10
11
|
locale: import("zod").ZodString;
|
|
11
12
|
content: import("zod").ZodString;
|
|
@@ -16,12 +17,8 @@ export declare const upsertSystemWrite: import("@cosmicdrift/kumiko-types/define
|
|
|
16
17
|
plain: "plain";
|
|
17
18
|
}>;
|
|
18
19
|
variableSchema: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
19
|
-
|
|
20
|
+
meta: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
20
21
|
parentTemplateId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
22
|
title: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
22
23
|
folder: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
23
|
-
}, import("zod/v4/core").$strip>,
|
|
24
|
-
id: string;
|
|
25
|
-
slug: string;
|
|
26
|
-
isNew: boolean;
|
|
27
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
24
|
+
}, import("zod/v4/core").$strip>, import("./template-write.js").WrittenTemplateRow, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { executor, upsertPayloadSchema } from "./shared.js";
|
|
1
|
+
import { defineWriteHandler, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
+
import { resolveTemplateVariables } from "../template-validation.js";
|
|
3
|
+
import { upsertPayloadSchema } from "./shared.js";
|
|
4
|
+
import { writeTemplateRow } from "./template-write.js";
|
|
6
5
|
// System-Template anlegen/updaten. Liegt unter SYSTEM_TENANT_ID,
|
|
7
6
|
// scope='system'. Nur SystemAdmin (globale Rolle). TenantAdmin kann
|
|
8
7
|
// keine System-Defaults überschreiben — der nutzt upsertTenant für
|
|
@@ -11,58 +10,14 @@ export const upsertSystemWrite = defineWriteHandler({
|
|
|
11
10
|
name: "upsert-system",
|
|
12
11
|
schema: upsertPayloadSchema,
|
|
13
12
|
access: { roles: ["SystemAdmin"] },
|
|
14
|
-
description: "Creates or overwrites a system-default template under the system tenant with its full variable schema
|
|
15
|
-
handler:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
locale: event.payload.locale,
|
|
25
|
-
});
|
|
26
|
-
const fields = {
|
|
27
|
-
slug: event.payload.slug,
|
|
28
|
-
kind: event.payload.kind,
|
|
29
|
-
locale: event.payload.locale,
|
|
30
|
-
content: event.payload.content,
|
|
31
|
-
contentFormat: event.payload.contentFormat,
|
|
32
|
-
variableSchema: JSON.stringify(event.payload.variableSchema),
|
|
33
|
-
linkedResources: JSON.stringify(event.payload.linkedResources),
|
|
34
|
-
title: event.payload.title ?? null,
|
|
35
|
-
folder: event.payload.folder ?? null,
|
|
36
|
-
scope: "system",
|
|
37
|
-
parentTemplateId: event.payload.parentTemplateId ?? null,
|
|
38
|
-
// System-Defaults sind sofort active (kein draft-Stage für seeds).
|
|
39
|
-
status: "active",
|
|
40
|
-
};
|
|
41
|
-
if (existing) {
|
|
42
|
-
const result = await executor.update({ id: existing.id, version: existing.version, changes: fields }, event.user, db, { streamTenantId });
|
|
43
|
-
if (!result.isSuccess)
|
|
44
|
-
return result;
|
|
45
|
-
return {
|
|
46
|
-
isSuccess: true,
|
|
47
|
-
data: { id: String(existing.id), slug: event.payload.slug, isNew: false },
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
const result = await executor.create({ ...fields, tenantId }, event.user, db, {
|
|
51
|
-
streamTenantId,
|
|
52
|
-
});
|
|
53
|
-
if (!result.isSuccess)
|
|
54
|
-
return result;
|
|
55
|
-
// @cast-boundary db-row — executor.create returnt Record-row aus
|
|
56
|
-
// INSERT RETURNING; shape { id } ist garantiert weil PK in der
|
|
57
|
-
// Returning-Klausel ist.
|
|
58
|
-
const createdRow = result.data;
|
|
59
|
-
return {
|
|
60
|
-
isSuccess: true,
|
|
61
|
-
data: {
|
|
62
|
-
id: String(createdRow.id),
|
|
63
|
-
slug: event.payload.slug,
|
|
64
|
-
isNew: true,
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
},
|
|
13
|
+
description: "Creates or overwrites a system-default template under the system tenant with its full variable schema (resource files go through the resource upload), active straight away with no draft stage; SystemAdmin only, since tenants shadow these defaults through upsert-tenant instead.",
|
|
14
|
+
handler: (event, ctx) => writeTemplateRow({
|
|
15
|
+
ctx,
|
|
16
|
+
user: event.user,
|
|
17
|
+
tenantId: SYSTEM_TENANT_ID,
|
|
18
|
+
scope: "system",
|
|
19
|
+
status: "active",
|
|
20
|
+
variables: resolveTemplateVariables(ctx.registry, event.payload.slug, event.payload.variableSchema),
|
|
21
|
+
payload: event.payload,
|
|
22
|
+
}),
|
|
68
23
|
});
|
|
@@ -5,8 +5,9 @@ export declare const upsertTenantWrite: import("@cosmicdrift/kumiko-types/define
|
|
|
5
5
|
"ai-prompt": "ai-prompt";
|
|
6
6
|
"document-pdf": "document-pdf";
|
|
7
7
|
"image-snapshot": "image-snapshot";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
mail: "mail";
|
|
9
|
+
"mail-layout": "mail-layout";
|
|
10
|
+
"pdf-layout": "pdf-layout";
|
|
10
11
|
}>;
|
|
11
12
|
locale: z.ZodString;
|
|
12
13
|
content: z.ZodString;
|
|
@@ -17,7 +18,7 @@ export declare const upsertTenantWrite: import("@cosmicdrift/kumiko-types/define
|
|
|
17
18
|
plain: "plain";
|
|
18
19
|
}>;
|
|
19
20
|
variableSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
20
|
-
|
|
21
|
+
meta: z.ZodOptional<z.ZodUnknown>;
|
|
21
22
|
parentTemplateId: z.ZodOptional<z.ZodString>;
|
|
22
23
|
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
24
|
folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -26,8 +27,4 @@ export declare const upsertTenantWrite: import("@cosmicdrift/kumiko-types/define
|
|
|
26
27
|
active: "active";
|
|
27
28
|
draft: "draft";
|
|
28
29
|
}>>;
|
|
29
|
-
}, z.core.$strip>,
|
|
30
|
-
id: string;
|
|
31
|
-
slug: string;
|
|
32
|
-
isNew: boolean;
|
|
33
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
30
|
+
}, z.core.$strip>, import("./template-write.js").WrittenTemplateRow, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineWriteHandler, SYSTEM_TENANT_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { AccessDeniedError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
1
|
+
import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
4
2
|
import * as z from "zod";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { resolveTemplateVariables } from "../template-validation.js";
|
|
4
|
+
import { upsertPayloadSchema } from "./shared.js";
|
|
5
|
+
import { writeTemplateRow } from "./template-write.js";
|
|
8
6
|
// Tenant-Override anlegen/updaten. Liegt unter event.user.tenantId,
|
|
9
7
|
// scope='tenant'. Default-Status='draft' — User publisht explizit
|
|
10
8
|
// via publish-Handler. SystemAdmin kann via tenantIdOverride für
|
|
@@ -17,69 +15,20 @@ export const upsertTenantWrite = defineWriteHandler({
|
|
|
17
15
|
status: z.enum(["draft", "active"]).default("draft"),
|
|
18
16
|
}),
|
|
19
17
|
access: { roles: ["TenantAdmin", "SystemAdmin"] },
|
|
20
|
-
description: "Creates or overwrites a tenant-scoped template override with its variable schema, landing as a draft that only publish makes live; it refuses a system-tenant target, which is what upsert-system is for.",
|
|
18
|
+
description: "Creates or overwrites a tenant-scoped template override with its variable schema, landing as a draft that only publish makes live (over an active override the draft is stored beside it, the active version keeps being served until publish); it refuses a system-tenant target, which is what upsert-system is for.",
|
|
21
19
|
handler: async (event, ctx) => {
|
|
22
|
-
const override = event.payload.tenantIdOverride;
|
|
23
|
-
// upsertTenant erzeugt scope='tenant'. SYSTEM_TENANT_ID-Override würde
|
|
24
|
-
// scope='tenant' unter SYSTEM_TENANT_ID schreiben → inkonsistenter Zustand
|
|
25
|
-
// (Resolver-Logik trennt sauber zwischen system+tenant). SystemAdmin muss
|
|
26
|
-
// upsertSystem für System-Defaults nutzen.
|
|
27
|
-
if (override === SYSTEM_TENANT_ID) {
|
|
28
|
-
return writeFailure(new AccessDeniedError({
|
|
29
|
-
i18nKey: "templateResolver.errors.useUpsertSystemForSystemTenant",
|
|
30
|
-
details: { reason: "system_tenant_override_not_allowed_use_upsert_system" },
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
20
|
// @cast-boundary engine-payload — override aus Zod-parsed string,
|
|
34
21
|
// event.user.tenantId schon TenantId-branded; union als TenantId casten
|
|
35
22
|
// ist legit (override ist UUID-Format-validiert in schema).
|
|
36
|
-
const tenantId = (
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
const tenantId = (event.payload.tenantIdOverride ?? event.user.tenantId);
|
|
24
|
+
return writeTemplateRow({
|
|
25
|
+
ctx,
|
|
26
|
+
user: event.user,
|
|
39
27
|
tenantId,
|
|
40
|
-
slug: event.payload.slug,
|
|
41
|
-
kind: event.payload.kind,
|
|
42
|
-
locale: event.payload.locale,
|
|
43
|
-
});
|
|
44
|
-
const fields = {
|
|
45
|
-
slug: event.payload.slug,
|
|
46
|
-
kind: event.payload.kind,
|
|
47
|
-
locale: event.payload.locale,
|
|
48
|
-
content: event.payload.content,
|
|
49
|
-
contentFormat: event.payload.contentFormat,
|
|
50
|
-
variableSchema: JSON.stringify(event.payload.variableSchema),
|
|
51
|
-
linkedResources: JSON.stringify(event.payload.linkedResources),
|
|
52
|
-
title: event.payload.title ?? null,
|
|
53
|
-
folder: event.payload.folder ?? null,
|
|
54
28
|
scope: "tenant",
|
|
55
|
-
parentTemplateId: event.payload.parentTemplateId ?? null,
|
|
56
29
|
status: event.payload.status,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const result = await executor.update({ id: existing.id, version: existing.version, changes: fields }, event.user, db, { streamTenantId });
|
|
60
|
-
if (!result.isSuccess)
|
|
61
|
-
return result;
|
|
62
|
-
return {
|
|
63
|
-
isSuccess: true,
|
|
64
|
-
data: { id: String(existing.id), slug: event.payload.slug, isNew: false },
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
const result = await executor.create({ ...fields, tenantId }, event.user, db, {
|
|
68
|
-
streamTenantId,
|
|
30
|
+
variables: resolveTemplateVariables(ctx.registry, event.payload.slug, event.payload.variableSchema),
|
|
31
|
+
payload: event.payload,
|
|
69
32
|
});
|
|
70
|
-
if (!result.isSuccess)
|
|
71
|
-
return result;
|
|
72
|
-
// @cast-boundary db-row — executor.create returnt Record-row aus
|
|
73
|
-
// INSERT RETURNING; shape { id } ist garantiert weil PK in der
|
|
74
|
-
// Returning-Klausel ist.
|
|
75
|
-
const createdRow = result.data;
|
|
76
|
-
return {
|
|
77
|
-
isSuccess: true,
|
|
78
|
-
data: {
|
|
79
|
-
id: String(createdRow.id),
|
|
80
|
-
slug: event.payload.slug,
|
|
81
|
-
isNew: true,
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
33
|
},
|
|
85
34
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const usageQuery: import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"usage", z.ZodObject<{
|
|
3
|
+
slug: z.ZodString;
|
|
4
|
+
kind: z.ZodEnum<{
|
|
5
|
+
"ai-prompt": "ai-prompt";
|
|
6
|
+
"document-pdf": "document-pdf";
|
|
7
|
+
"image-snapshot": "image-snapshot";
|
|
8
|
+
mail: "mail";
|
|
9
|
+
"mail-layout": "mail-layout";
|
|
10
|
+
notification: "notification";
|
|
11
|
+
"pdf-layout": "pdf-layout";
|
|
12
|
+
snippet: "snippet";
|
|
13
|
+
"text-block": "text-block";
|
|
14
|
+
}>;
|
|
15
|
+
}, z.core.$strip>, {
|
|
16
|
+
usedBy: import("../template-usage.js").TemplateUsageEntry[];
|
|
17
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
2
|
+
import { defineQueryHandler } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
import { TEMPLATE_KINDS } from "../constants.js";
|
|
5
|
+
import { templateResourcesTable } from "../table.js";
|
|
6
|
+
import { templateSlugSchema } from "../template-meta.js";
|
|
7
|
+
import { collectTemplateUsage } from "../template-usage.js";
|
|
8
|
+
import { effectiveMailLayoutSlugs } from "./overview.query.js";
|
|
9
|
+
const MAIL_ROW_LIMIT = 5000;
|
|
10
|
+
export const usageQuery = defineQueryHandler({
|
|
11
|
+
name: "usage",
|
|
12
|
+
schema: z.object({ slug: templateSlugSchema, kind: z.enum(TEMPLATE_KINDS) }),
|
|
13
|
+
access: { roles: ["TenantAdmin", "SystemAdmin"] },
|
|
14
|
+
description: "Lists the code-registered notifications that use one template: a mail template is used by the notification whose qualified name is its slug and that has a code template, a mail layout by every mail notification whose effective template (own override, else system) names it, or whose code meta does when no stored template exists, or that falls back to the default layout; use it to show what a change to a template affects.",
|
|
15
|
+
handler: async (query, ctx) => {
|
|
16
|
+
const { slug, kind } = query.payload;
|
|
17
|
+
if (kind !== "mail-layout")
|
|
18
|
+
return { usedBy: collectTemplateUsage(ctx.registry, slug, kind) };
|
|
19
|
+
const mailRows = await selectMany(ctx.db, templateResourcesTable, { kind: "mail" }, { limit: MAIL_ROW_LIMIT });
|
|
20
|
+
return {
|
|
21
|
+
usedBy: collectTemplateUsage(ctx.registry, slug, kind, effectiveMailLayoutSlugs(mailRows)),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type HandlerContext, type SessionUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
import type { ContentFormat, UpsertKind } from "../constants.js";
|
|
4
|
+
import type { TemplateWriteScope } from "../layout-regions.js";
|
|
5
|
+
type TemplateDraftInput = {
|
|
6
|
+
readonly slug: string;
|
|
7
|
+
readonly kind: UpsertKind;
|
|
8
|
+
readonly contentFormat: ContentFormat;
|
|
9
|
+
readonly content: string;
|
|
10
|
+
readonly meta?: unknown;
|
|
11
|
+
readonly variableSchema: Readonly<Record<string, unknown>>;
|
|
12
|
+
readonly locale?: string | undefined;
|
|
13
|
+
readonly scope: TemplateWriteScope;
|
|
14
|
+
};
|
|
15
|
+
export declare function validateTemplateDraft(ctx: HandlerContext, user: SessionUser, payload: TemplateDraftInput): Promise<{
|
|
16
|
+
response: {
|
|
17
|
+
canSave: boolean;
|
|
18
|
+
canPublish: boolean;
|
|
19
|
+
issues: import("@cosmicdrift/kumiko-headless").FieldIssue[];
|
|
20
|
+
publishIssues: import("@cosmicdrift/kumiko-headless").FieldIssue[];
|
|
21
|
+
used: string[];
|
|
22
|
+
unknown: string[];
|
|
23
|
+
missingRequired: string[];
|
|
24
|
+
warnings: {
|
|
25
|
+
code: "resource_not_uploaded";
|
|
26
|
+
detail: string;
|
|
27
|
+
i18nKey: "templateResolver.warnings.resourceNotUploaded";
|
|
28
|
+
}[];
|
|
29
|
+
variables: Readonly<Record<string, import("@cosmicdrift/kumiko-types/config").TemplateVariableDef>>;
|
|
30
|
+
systemPlaceholders: string[];
|
|
31
|
+
};
|
|
32
|
+
evaluation: import("./template-gates.js").TemplateWriteResult;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const validateQuery: import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"validate", z.ZodObject<{
|
|
35
|
+
slug: z.ZodString;
|
|
36
|
+
kind: z.ZodEnum<{
|
|
37
|
+
"ai-prompt": "ai-prompt";
|
|
38
|
+
"document-pdf": "document-pdf";
|
|
39
|
+
"image-snapshot": "image-snapshot";
|
|
40
|
+
mail: "mail";
|
|
41
|
+
"mail-layout": "mail-layout";
|
|
42
|
+
"pdf-layout": "pdf-layout";
|
|
43
|
+
}>;
|
|
44
|
+
contentFormat: z.ZodEnum<{
|
|
45
|
+
html: "html";
|
|
46
|
+
markdown: "markdown";
|
|
47
|
+
mjml: "mjml";
|
|
48
|
+
plain: "plain";
|
|
49
|
+
}>;
|
|
50
|
+
content: z.ZodString;
|
|
51
|
+
meta: z.ZodOptional<z.ZodUnknown>;
|
|
52
|
+
variableSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
54
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
55
|
+
system: "system";
|
|
56
|
+
tenant: "tenant";
|
|
57
|
+
}>>;
|
|
58
|
+
}, z.core.$strip>, {
|
|
59
|
+
canSave: boolean;
|
|
60
|
+
canPublish: boolean;
|
|
61
|
+
issues: import("@cosmicdrift/kumiko-headless").FieldIssue[];
|
|
62
|
+
publishIssues: import("@cosmicdrift/kumiko-headless").FieldIssue[];
|
|
63
|
+
used: string[];
|
|
64
|
+
unknown: string[];
|
|
65
|
+
missingRequired: string[];
|
|
66
|
+
warnings: {
|
|
67
|
+
code: "resource_not_uploaded";
|
|
68
|
+
detail: string;
|
|
69
|
+
i18nKey: "templateResolver.warnings.resourceNotUploaded";
|
|
70
|
+
}[];
|
|
71
|
+
variables: Readonly<Record<string, import("@cosmicdrift/kumiko-types/config").TemplateVariableDef>>;
|
|
72
|
+
systemPlaceholders: string[];
|
|
73
|
+
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
74
|
+
export {};
|