@cosmicdrift/kumiko-bundled-features 0.362.0 → 0.363.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/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/invite-create.write.js +4 -4
- package/dist/auth-email-password/handlers/request-account-unlock.write.js +2 -4
- package/dist/auth-email-password/handlers/request-email-verification.write.js +2 -4
- package/dist/auth-email-password/handlers/request-password-reset.write.js +2 -4
- package/dist/auth-email-password/handlers/signup-confirm.write.js +3 -4
- package/dist/auth-email-password/handlers/token-request-handler.d.ts +1 -2
- package/dist/auth-email-password/handlers/token-request-handler.js +0 -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-foundation/types.js +2 -8
- package/dist/auth-mfa/feature.js +4 -4
- 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 +27 -32
- 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/termination-mail.d.ts +20 -10
- package/dist/billing-foundation/consumer-protection/termination-mail.js +10 -21
- 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-request.js +2 -2
- package/dist/billing-foundation/handlers/process-event.write.js +2 -2
- package/dist/billing-foundation/handlers/process-payment-event.write.js +1 -1
- package/dist/billing-foundation/subscription-tier-sync.js +3 -4
- 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 +89 -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/config/handlers/set.write.js +1 -2
- 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 +39 -0
- package/dist/delivery/attachment-ref.js +64 -0
- package/dist/delivery/channel-context.d.ts +8 -4
- package/dist/delivery/channel-context.js +76 -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/index.d.ts +5 -2
- package/dist/delivery/index.js +4 -1
- package/dist/delivery/jobs.js +25 -5
- package/dist/delivery/notify-factory.js +4 -1
- package/dist/delivery/testing.d.ts +4 -1
- package/dist/delivery/types.d.ts +20 -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/toggle-sync-signal.js +4 -4
- 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 +49 -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/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-state.js +7 -7
- package/dist/inbound-mail-foundation/types.js +4 -4
- package/dist/inbound-mail-foundation/watch-supervisor.js +22 -13
- package/dist/inbound-provider-imap/imap-client.js +4 -3
- 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/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/list.query.js +2 -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 +92 -32
- package/dist/renderer-pdf/feature.js +7 -1
- 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/shared/attachment-file-name.d.ts +3 -0
- package/dist/shared/attachment-file-name.js +35 -0
- 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 +4 -0
- package/dist/shared/mail-template-body.js +17 -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/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 +40 -5
- package/dist/template-resolver/compile-document-body.d.ts +8 -0
- package/dist/template-resolver/compile-document-body.js +163 -0
- package/dist/template-resolver/constants.d.ts +13 -4
- package/dist/template-resolver/constants.js +30 -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 +296 -0
- package/dist/template-resolver/feature.d.ts +18 -0
- package/dist/template-resolver/feature.js +50 -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.js +25 -2
- package/dist/template-resolver/handlers/copy-locale.write.d.ts +19 -0
- package/dist/template-resolver/handlers/copy-locale.write.js +116 -0
- package/dist/template-resolver/handlers/diff-to-system.query.d.ts +22 -0
- package/dist/template-resolver/handlers/diff-to-system.query.js +64 -0
- package/dist/template-resolver/handlers/export-bundle.query.d.ts +35 -0
- package/dist/template-resolver/handlers/export-bundle.query.js +68 -0
- package/dist/template-resolver/handlers/find-by-id.query.d.ts +1 -0
- package/dist/template-resolver/handlers/find-by-id.query.js +3 -3
- 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 +26 -0
- package/dist/template-resolver/handlers/layout-source.query.js +64 -0
- package/dist/template-resolver/handlers/list.query.d.ts +4 -1
- package/dist/template-resolver/handlers/list.query.js +5 -7
- package/dist/template-resolver/handlers/overview.query.d.ts +59 -0
- package/dist/template-resolver/handlers/overview.query.js +165 -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 +11 -0
- package/dist/template-resolver/handlers/send-test.write.js +81 -0
- package/dist/template-resolver/handlers/set.write.d.ts +4 -1
- 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 +131 -0
- package/dist/template-resolver/handlers/template-write.d.ts +45 -0
- package/dist/template-resolver/handlers/template-write.js +109 -0
- package/dist/template-resolver/handlers/tenant-overrides.query.d.ts +17 -0
- package/dist/template-resolver/handlers/tenant-overrides.query.js +48 -0
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +12 -0
- package/dist/template-resolver/handlers/toggle-status.write.js +27 -11
- 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 +10 -61
- package/dist/template-resolver/handlers/usage.query.d.ts +17 -0
- package/dist/template-resolver/handlers/usage.query.js +15 -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 +18 -1
- package/dist/template-resolver/index.js +16 -1
- 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/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 +30 -0
- package/dist/template-resolver/qualified-names.js +30 -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 +105 -15
- 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 +47 -8
- package/dist/template-resolver/table.js +11 -0
- 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-meta.d.ts +60 -0
- package/dist/template-resolver/template-meta.js +101 -0
- package/dist/template-resolver/template-preview.d.ts +86 -0
- package/dist/template-resolver/template-preview.js +374 -0
- package/dist/template-resolver/template-resources.d.ts +14 -0
- package/dist/template-resolver/template-resources.js +42 -0
- package/dist/template-resolver/template-usage.d.ts +12 -0
- package/dist/template-resolver/template-usage.js +30 -0
- package/dist/template-resolver/template-validation.d.ts +22 -0
- package/dist/template-resolver/template-validation.js +172 -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 +9 -6
- package/dist/template-resolver/web/document-editor-extensions.d.ts +15 -0
- package/dist/template-resolver/web/document-editor-extensions.js +107 -0
- package/dist/template-resolver/web/document-editor.d.ts +3 -0
- package/dist/template-resolver/web/document-editor.js +11 -0
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +3 -0
- package/dist/template-resolver/web/document-tiptap-editor.js +376 -0
- package/dist/template-resolver/web/document-toolbar-blocks.d.ts +33 -0
- package/dist/template-resolver/web/document-toolbar-blocks.js +15 -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 +76 -0
- package/dist/template-resolver/web/index.d.ts +4 -0
- package/dist/template-resolver/web/index.js +4 -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 +15 -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/team-list.query.js +3 -2
- package/dist/tenant/seeding.js +31 -6
- package/dist/tenant-lifecycle/handlers/cancel-destruction.write.d.ts +1 -1
- package/dist/tenant-lifecycle/handlers/cancel-destruction.write.js +2 -1
- package/dist/user/db/queries/stream-tenant-backfill.js +4 -4
- package/dist/user/handlers/detail.query.js +2 -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 +1 -1
- package/dist/user-data-rights/handlers/cancel-deletion.write.js +2 -1
- package/dist/user-data-rights/handlers/request-deletion.write.js +5 -7
- 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/web/profile-screen.js +2 -1
- package/dist/waitlist/feature.js +10 -0
- 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/package.json +28 -17
- package/src/admin-shell/changes.json +6 -0
- package/src/auth-email-password/changes.json +14 -0
- package/src/billing-foundation/changes.json +7 -0
- package/src/channel-email/changes.json +19 -0
- package/src/data-retention/changes.json +6 -0
- package/src/delivery/changes.json +48 -0
- package/src/managed-pages/changes.json +6 -0
- package/src/renderer-foundation/changes.json +39 -0
- package/src/template-resolver/changes.json +118 -0
- package/src/user-data-rights/changes.json +7 -0
- package/src/waitlist/changes.json +7 -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
package/dist/waitlist/feature.js
CHANGED
|
@@ -7,6 +7,7 @@ import { rejectHandler } from "./handlers/reject.write.js";
|
|
|
7
7
|
import { createSubmitHandler } from "./handlers/submit.write.js";
|
|
8
8
|
import { WAITLIST_I18N } from "./i18n.js";
|
|
9
9
|
import { adminAccess } from "./lib.js";
|
|
10
|
+
import { WAITLIST_ADMIN_NOTICE_RECORD, WAITLIST_ADMIN_NOTICE_VARIABLES, WAITLIST_CONFIRMATION_VARIABLES, waitlistAdminNoticeTemplate, waitlistConfirmationTemplate, } from "./mail.js";
|
|
10
11
|
import { waitlistListScreen } from "./screens.js";
|
|
11
12
|
import { waitlistEntryDeleteHook, waitlistEntryExportHook } from "./user-data-hooks.js";
|
|
12
13
|
export function createWaitlistFeature(opts = {}) {
|
|
@@ -16,6 +17,15 @@ export function createWaitlistFeature(opts = {}) {
|
|
|
16
17
|
r.systemScope();
|
|
17
18
|
r.requires("tenant", "auth-email-password", "user-data-rights");
|
|
18
19
|
r.translations({ keys: WAITLIST_I18N });
|
|
20
|
+
r.notification("confirmation", {
|
|
21
|
+
variables: WAITLIST_CONFIRMATION_VARIABLES,
|
|
22
|
+
localizedTemplate: waitlistConfirmationTemplate,
|
|
23
|
+
});
|
|
24
|
+
r.notification("admin-notice", {
|
|
25
|
+
variables: WAITLIST_ADMIN_NOTICE_VARIABLES,
|
|
26
|
+
record: WAITLIST_ADMIN_NOTICE_RECORD,
|
|
27
|
+
localizedTemplate: waitlistAdminNoticeTemplate,
|
|
28
|
+
});
|
|
19
29
|
r.entity("waitlistEntry", waitlistEntryEntity);
|
|
20
30
|
r.writeHandler(createSubmitHandler(opts));
|
|
21
31
|
r.writeHandler(createInviteHandler(opts.invite));
|
|
@@ -4,7 +4,7 @@ import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
|
|
|
4
4
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
5
5
|
import { WAITLIST_NOTIFICATION_TYPES, WAITLIST_STATUS } from "../constants.js";
|
|
6
6
|
import { normalizeEmail, platformActor, waitlistDb, waitlistExecutor } from "../lib.js";
|
|
7
|
-
import {
|
|
7
|
+
import { resolveWaitlistAdminMailLocale, resolveWaitlistMailLocale, waitlistAdminNoticeVariables, waitlistConfirmationVariables, } from "../mail.js";
|
|
8
8
|
import { DEFAULT_SUBMIT_EMAIL_RATE_LIMITS, DEFAULT_SUBMIT_RATE_LIMIT, } from "../options.js";
|
|
9
9
|
import { WaitlistSubmitSchema } from "../payloads.js";
|
|
10
10
|
// pg_advisory_xact_lock namespace (int4): 'wlst' as ASCII, disjoint from the
|
|
@@ -81,7 +81,7 @@ export function createSubmitHandler(opts) {
|
|
|
81
81
|
return created;
|
|
82
82
|
await sendBestEffort(ctx, "confirmation", (notify) => notify(WAITLIST_NOTIFICATION_TYPES.confirmation, {
|
|
83
83
|
route: { email },
|
|
84
|
-
data:
|
|
84
|
+
data: waitlistConfirmationVariables({
|
|
85
85
|
locale: payload.locale,
|
|
86
86
|
appName: opts.appName,
|
|
87
87
|
}),
|
|
@@ -95,12 +95,11 @@ export function createSubmitHandler(opts) {
|
|
|
95
95
|
return;
|
|
96
96
|
await notify(WAITLIST_NOTIFICATION_TYPES.adminNotice, {
|
|
97
97
|
route: { email: adminRecipient },
|
|
98
|
-
data:
|
|
98
|
+
data: waitlistAdminNoticeVariables({
|
|
99
99
|
name: payload.name,
|
|
100
100
|
email,
|
|
101
101
|
company: payload.company,
|
|
102
102
|
message: payload.message,
|
|
103
|
-
adminLocale: ctx.locale,
|
|
104
103
|
}),
|
|
105
104
|
priority: "normal",
|
|
106
105
|
locale: resolveWaitlistAdminMailLocale(ctx.locale),
|
package/dist/waitlist/mail.d.ts
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type NotificationLocalizedTemplate, type NotificationRecordMapping, type TemplateVariables } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
export type WaitlistMailLocale = "en" | "de" | "es";
|
|
3
3
|
export declare function resolveWaitlistMailLocale(locale: string | undefined): WaitlistMailLocale;
|
|
4
|
-
export declare
|
|
4
|
+
export declare const WAITLIST_CONFIRMATION_VARIABLES: TemplateVariables;
|
|
5
|
+
export declare const WAITLIST_ADMIN_NOTICE_RECORD: NotificationRecordMapping;
|
|
6
|
+
export declare const WAITLIST_ADMIN_NOTICE_VARIABLES: TemplateVariables;
|
|
7
|
+
export declare function waitlistConfirmationVariables(args: {
|
|
5
8
|
readonly locale: string | undefined;
|
|
6
9
|
readonly appName?: string | undefined;
|
|
7
|
-
}):
|
|
10
|
+
}): {
|
|
11
|
+
readonly subject: string;
|
|
12
|
+
readonly intro: string;
|
|
13
|
+
readonly footer: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function waitlistConfirmationTemplate(): NotificationLocalizedTemplate;
|
|
8
16
|
export declare function resolveWaitlistAdminMailLocale(adminLocale: string | undefined): "en" | "de";
|
|
9
|
-
export declare function
|
|
17
|
+
export declare function waitlistAdminNoticeVariables(args: {
|
|
10
18
|
readonly name: string;
|
|
11
19
|
readonly email: string;
|
|
12
20
|
readonly company: string | undefined;
|
|
13
21
|
readonly message: string | undefined;
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
}): {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly details: readonly {
|
|
25
|
+
readonly text: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
export declare function waitlistAdminNoticeTemplate(): NotificationLocalizedTemplate;
|
package/dist/waitlist/mail.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { templateVariable, } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
+
import { mailHeading, mailParagraph, mailRepeatedRows } from "../shared/index.js";
|
|
1
3
|
const CONFIRMATION_STRINGS = {
|
|
2
4
|
en: {
|
|
3
5
|
subject: (app) => (app ? `You're on the ${app} waitlist` : "You're on the waitlist"),
|
|
@@ -42,32 +44,66 @@ export function resolveWaitlistMailLocale(locale) {
|
|
|
42
44
|
const language = languageOf(locale);
|
|
43
45
|
return isConfirmationLocale(language) ? language : "en";
|
|
44
46
|
}
|
|
47
|
+
export const WAITLIST_CONFIRMATION_VARIABLES = {
|
|
48
|
+
subject: templateVariable.text({ required: true }),
|
|
49
|
+
intro: templateVariable.text({ required: true }),
|
|
50
|
+
footer: templateVariable.text({ required: true }),
|
|
51
|
+
};
|
|
52
|
+
// Only `name` is a plain entry field; the details rows are composed from several fields.
|
|
53
|
+
export const WAITLIST_ADMIN_NOTICE_RECORD = {
|
|
54
|
+
entity: "waitlistEntry",
|
|
55
|
+
map: { name: "name" },
|
|
56
|
+
};
|
|
57
|
+
export const WAITLIST_ADMIN_NOTICE_VARIABLES = {
|
|
58
|
+
name: templateVariable.text({ required: true }),
|
|
59
|
+
details: templateVariable.list({ text: templateVariable.text({ required: true }) }, { required: true }),
|
|
60
|
+
};
|
|
61
|
+
// The app name is optional, so the sentences that mention it are computed in
|
|
62
|
+
// code and handed over as variables; the template keeps heading and structure.
|
|
45
63
|
// The submitter's name stays out: the address is unverified, so any text in
|
|
46
64
|
// this mail could be planted by whoever typed someone else's email.
|
|
47
|
-
export function
|
|
65
|
+
export function waitlistConfirmationVariables(args) {
|
|
48
66
|
const t = CONFIRMATION_STRINGS[resolveWaitlistMailLocale(args.locale)];
|
|
49
67
|
return {
|
|
50
68
|
subject: t.subject(args.appName),
|
|
51
|
-
|
|
52
|
-
sections: [{ text: t.intro(args.appName) }],
|
|
69
|
+
intro: t.intro(args.appName),
|
|
53
70
|
footer: t.footer(args.appName),
|
|
54
71
|
};
|
|
55
72
|
}
|
|
73
|
+
export function waitlistConfirmationTemplate() {
|
|
74
|
+
return Object.fromEntries(Object.entries(CONFIRMATION_STRINGS).map(([locale, t]) => [
|
|
75
|
+
locale,
|
|
76
|
+
{
|
|
77
|
+
body: [mailHeading(t.header), mailParagraph("{intro}"), mailParagraph("{footer}")].join(""),
|
|
78
|
+
meta: { subject: "{{subject}}", category: "transactional" },
|
|
79
|
+
},
|
|
80
|
+
]));
|
|
81
|
+
}
|
|
56
82
|
// Operator-facing, so the entrant's locale does not apply: en/de, en default.
|
|
57
83
|
export function resolveWaitlistAdminMailLocale(adminLocale) {
|
|
58
84
|
return languageOf(adminLocale) === "de" ? "de" : "en";
|
|
59
85
|
}
|
|
60
|
-
export function
|
|
61
|
-
const t = ADMIN_NOTICE_STRINGS[resolveWaitlistAdminMailLocale(args.adminLocale)];
|
|
62
|
-
const details = [
|
|
63
|
-
`${args.name} <${args.email}>`,
|
|
64
|
-
...(args.company ? [args.company] : []),
|
|
65
|
-
...(args.message ? [args.message] : []),
|
|
66
|
-
];
|
|
86
|
+
export function waitlistAdminNoticeVariables(args) {
|
|
67
87
|
return {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
88
|
+
name: args.name,
|
|
89
|
+
details: [
|
|
90
|
+
`${args.name} <${args.email}>`,
|
|
91
|
+
...(args.company ? [args.company] : []),
|
|
92
|
+
...(args.message ? [args.message] : []),
|
|
93
|
+
].map((text) => ({ text })),
|
|
72
94
|
};
|
|
73
95
|
}
|
|
96
|
+
export function waitlistAdminNoticeTemplate() {
|
|
97
|
+
return Object.fromEntries(Object.entries(ADMIN_NOTICE_STRINGS).map(([locale, t]) => [
|
|
98
|
+
locale,
|
|
99
|
+
{
|
|
100
|
+
body: [
|
|
101
|
+
mailHeading(t.header),
|
|
102
|
+
mailParagraph(t.intro),
|
|
103
|
+
mailRepeatedRows("details", "text"),
|
|
104
|
+
mailParagraph(t.footer),
|
|
105
|
+
].join(""),
|
|
106
|
+
meta: { subject: t.subject("{{name}}"), category: "transactional" },
|
|
107
|
+
},
|
|
108
|
+
]));
|
|
109
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-bundled-features",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.363.0",
|
|
4
4
|
"description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -394,10 +394,6 @@
|
|
|
394
394
|
"types": "./dist/channel-telegram/index.d.ts",
|
|
395
395
|
"default": "./dist/channel-telegram/index.js"
|
|
396
396
|
},
|
|
397
|
-
"./renderer-simple": {
|
|
398
|
-
"types": "./dist/renderer-simple/index.d.ts",
|
|
399
|
-
"default": "./dist/renderer-simple/index.js"
|
|
400
|
-
},
|
|
401
397
|
"./renderer-pdf": {
|
|
402
398
|
"types": "./dist/renderer-pdf/index.d.ts",
|
|
403
399
|
"default": "./dist/renderer-pdf/index.js"
|
|
@@ -458,6 +454,10 @@
|
|
|
458
454
|
"types": "./dist/template-resolver/index.d.ts",
|
|
459
455
|
"default": "./dist/template-resolver/index.js"
|
|
460
456
|
},
|
|
457
|
+
"./template-resolver/document-schema": {
|
|
458
|
+
"types": "./dist/template-resolver/document-schema.d.ts",
|
|
459
|
+
"default": "./dist/template-resolver/document-schema.js"
|
|
460
|
+
},
|
|
461
461
|
"./template-resolver/seeding": {
|
|
462
462
|
"types": "./dist/template-resolver/seeding.d.ts",
|
|
463
463
|
"default": "./dist/template-resolver/seeding.js"
|
|
@@ -520,17 +520,27 @@
|
|
|
520
520
|
}
|
|
521
521
|
},
|
|
522
522
|
"dependencies": {
|
|
523
|
-
"@cosmicdrift/kumiko-dispatcher-live": "0.
|
|
524
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
525
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
526
|
-
"@cosmicdrift/kumiko-renderer": "0.
|
|
527
|
-
"@cosmicdrift/kumiko-renderer-web": "0.
|
|
528
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
523
|
+
"@cosmicdrift/kumiko-dispatcher-live": "0.363.0",
|
|
524
|
+
"@cosmicdrift/kumiko-framework": "0.363.0",
|
|
525
|
+
"@cosmicdrift/kumiko-headless": "0.363.0",
|
|
526
|
+
"@cosmicdrift/kumiko-renderer": "0.363.0",
|
|
527
|
+
"@cosmicdrift/kumiko-renderer-web": "0.363.0",
|
|
528
|
+
"@cosmicdrift/kumiko-types": "0.363.0",
|
|
529
529
|
"@mollie/api-client": "^4.5.0",
|
|
530
530
|
"@node-rs/argon2": "^2.0.2",
|
|
531
|
+
"@tiptap/core": "3.31.3",
|
|
532
|
+
"@tiptap/extension-link": "3.31.3",
|
|
533
|
+
"@tiptap/extension-list": "3.31.3",
|
|
534
|
+
"@tiptap/extension-table": "3.31.3",
|
|
535
|
+
"@tiptap/html": "3.31.3",
|
|
536
|
+
"@tiptap/extensions": "3.31.3",
|
|
537
|
+
"@tiptap/pm": "3.31.3",
|
|
538
|
+
"@tiptap/react": "3.31.3",
|
|
539
|
+
"@tiptap/starter-kit": "3.31.3",
|
|
531
540
|
"@types/mailparser": "^3.4.6",
|
|
532
541
|
"@types/qrcode": "^1.5.5",
|
|
533
542
|
"clsx": "^2.1.1",
|
|
543
|
+
"happy-dom": "^20.11.2",
|
|
534
544
|
"hono": "^4.13.1",
|
|
535
545
|
"imapflow": "^1.7.8",
|
|
536
546
|
"ioredis": "^5.10.1",
|
|
@@ -925,10 +935,6 @@
|
|
|
925
935
|
"types": "./dist/channel-telegram/index.d.ts",
|
|
926
936
|
"default": "./dist/channel-telegram/index.js"
|
|
927
937
|
},
|
|
928
|
-
"./renderer-simple": {
|
|
929
|
-
"types": "./dist/renderer-simple/index.d.ts",
|
|
930
|
-
"default": "./dist/renderer-simple/index.js"
|
|
931
|
-
},
|
|
932
938
|
"./renderer-pdf": {
|
|
933
939
|
"types": "./dist/renderer-pdf/index.d.ts",
|
|
934
940
|
"default": "./dist/renderer-pdf/index.js"
|
|
@@ -989,6 +995,10 @@
|
|
|
989
995
|
"types": "./dist/template-resolver/index.d.ts",
|
|
990
996
|
"default": "./dist/template-resolver/index.js"
|
|
991
997
|
},
|
|
998
|
+
"./template-resolver/document-schema": {
|
|
999
|
+
"types": "./dist/template-resolver/document-schema.d.ts",
|
|
1000
|
+
"default": "./dist/template-resolver/document-schema.js"
|
|
1001
|
+
},
|
|
992
1002
|
"./template-resolver/seeding": {
|
|
993
1003
|
"types": "./dist/template-resolver/seeding.d.ts",
|
|
994
1004
|
"default": "./dist/template-resolver/seeding.js"
|
|
@@ -1059,8 +1069,9 @@
|
|
|
1059
1069
|
],
|
|
1060
1070
|
"devDependencies": {
|
|
1061
1071
|
"@testing-library/user-event": "^14.6.1",
|
|
1062
|
-
"@cosmicdrift/kumiko-locale-de": "0.
|
|
1063
|
-
"@cosmicdrift/kumiko-locale-es": "0.
|
|
1072
|
+
"@cosmicdrift/kumiko-locale-de": "0.363.0",
|
|
1073
|
+
"@cosmicdrift/kumiko-locale-es": "0.363.0",
|
|
1074
|
+
"@cosmicdrift/kumiko-renderer-mail-html": "0.363.0",
|
|
1064
1075
|
"jsqr": "^1.4.0",
|
|
1065
1076
|
"unpdf": "^1.8.1"
|
|
1066
1077
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "includeDocumentDesigner lists the template navs in the admin workspaces",
|
|
6
|
+
"detail": "With includeDocumentDesigner, the tenant workspace shows document-designer:nav:templates and the platform workspace document-designer:nav:platform-templates. The option requires the document-designer feature and defaults to false."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.330.0",
|
|
4
10
|
"type": "breaking",
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "AuthMailContent is removed",
|
|
6
|
+
"detail": "The sections-based content type only fed the retired renderer-simple. Auth mails are template notifications with variables, so nothing builds or consumes AuthMailContent anymore.",
|
|
7
|
+
"migration": "Drop AuthMailContent imports; the auth mail text lives in the seeded templates and is overridden per tenant in the template editor."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"version": "0.363.0",
|
|
11
|
+
"type": "breaking",
|
|
12
|
+
"title": "Auth mails are notifications with seeded templates, render*Email is gone",
|
|
13
|
+
"detail": "password-reset, account-unlock, email-verification, signup-activation and invite are declared as r.notification with a localized template and variables, seeded as system templates at boot and rendered by renderer-mail-html, so a tenant can override the text in the template editor. A locale without its own subject key falls back to en, because the renderer has no locale fallback. AuthMailNotificationTypes is exported for the qualified names.",
|
|
14
|
+
"migration": "The notification types are now `auth-email-password:notify:<name>` (before: the plain names). Update delivery preferences, preference rows and tests that reference the old names. renderResetPasswordEmail, renderUnlockAccountEmail, renderVerifyEmail, renderActivationEmail, renderInviteEmail, AuthMailSection, RenderTokenContentArgs and RenderInviteEmailArgs are removed; AuthMailContent stays. An app that mounts auth-email-password now needs template-resolver, renderer-foundation and @cosmicdrift/kumiko-renderer-mail-html (composeRendererStack() from dev-server mounts all of them; with includeBundled, composeFeatures adds whichever is missing). Boot fails with a clear error otherwise, and apps without the template tables need a schema migration (`kumiko schema generate`). kumiko-schema-check counts the three as implicit features of every HAS_AUTH app, so its check fails until that migration exists. Tests that read the token from a mail use the text part (`mail.text`); the html part encodes `=` as `=`."
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"version": "0.354.0",
|
|
4
18
|
"type": "breaking",
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "Contract confirmation and termination mails use template variables",
|
|
6
|
+
"detail": "contract-confirmation, contract-termination-receipt and contract-termination-operator-notice are r.notification declarations with variables and localized templates (de, en). The notification types are qualified names now (billing-foundation:notify:<name>). The notify data is the template variable object (subject, details, contractLines, termsParagraphs, operatorEmail), not sections.",
|
|
7
|
+
"migration": "Update delivery preferences and tests that referenced the old type strings, and anything that listens to the notification data. An app that mounts it without includeBundled needs template-resolver, renderer-foundation and @cosmicdrift/kumiko-renderer-mail-html at boot (composeRendererStack() from dev-server mounts all of them), plus a delivery with the channel-email feature; apps without the template tables need a schema migration (`kumiko schema generate`)."
|
|
8
|
+
},
|
|
2
9
|
{
|
|
3
10
|
"version": "0.354.0",
|
|
4
11
|
"type": "breaking",
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "A notification without a mail template fails on the email channel",
|
|
6
|
+
"detail": "The renderer option of createChannelEmailFeature is removed. A notification routed to the email channel without template + meta fails its delivery permanently with \"has no mail template, declare template + meta on r.notification\". r.notification declares no channels, so this is not checked at boot; an app's own mail tests over the inmemory transport catch it.",
|
|
7
|
+
"migration": "Drop the renderer option. Declare template + meta (or localizedTemplate) and variables on every r.notification that reaches the email channel, or accept that its email delivery fails. Run the app's notification tests after the bump: every email notification without a template now fails there."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"version": "0.363.0",
|
|
11
|
+
"type": "improvement",
|
|
12
|
+
"title": "Email channel sends rendered-pdf attachments",
|
|
13
|
+
"detail": "The channel resolves rendered-pdf entries from notify data next to file entries; without a locale the message locale is used. A render failure fails the send job, so the retry runs it again."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"version": "0.363.0",
|
|
17
|
+
"type": "improvement",
|
|
18
|
+
"title": "Email channel sends file attachments and inline cid images",
|
|
19
|
+
"detail": "EmailMessage.attachments is sent through the SMTP transport (inline images with Content-ID). notify data.attachments with kind file entries are resolved through the file store; the PII guard rejects ciphertext file names."
|
|
20
|
+
},
|
|
2
21
|
{
|
|
3
22
|
"version": "0.350.0",
|
|
4
23
|
"type": "improvement",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "data-retention exports computeCutoff",
|
|
6
|
+
"detail": "computeCutoff(keepFor, now) and its Instant type are exported from @cosmicdrift/kumiko-bundled-features/data-retention, so apps that compute a retention cutoff themselves (for example a backfill) use the same keepFor parsing as the cleanup job instead of a copy."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.335.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -1,4 +1,52 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "NotificationRenderer and RendererInput removed, immediate notify renders with the tenant config",
|
|
6
|
+
"detail": "The inline (immediate, job-less) delivery path now gets the tenant config accessor like the delivery.render job, so the mail layout shows the tenant name in both paths. DeliveryServiceOptions and CreateDeliveryTestContextOptions accept tenantConfigFor; runProdApp wires it from the boot config resolver. The types NotificationRenderer and RendererInput are removed from the delivery exports because the legacy renderer path is gone.",
|
|
7
|
+
"migration": "Drop NotificationRenderer and RendererInput imports; render mails with template + meta on r.notification (see renderer-foundation)."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"version": "0.363.0",
|
|
11
|
+
"type": "improvement",
|
|
12
|
+
"title": "ChannelContext.renderMail renders template notifications for the email channel",
|
|
13
|
+
"detail": "A notification that declares a template is rendered through the mail renderer plugin with the recipient locale and the notification variables; the email channel fails when renderMail is missing instead of falling back to the legacy renderer. The job path passes the tenant config accessor to the renderer, the inline path renders without one."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"version": "0.363.0",
|
|
17
|
+
"type": "improvement",
|
|
18
|
+
"title": "Mails can attach a PDF that is rendered from a document template when the mail is sent",
|
|
19
|
+
"detail": "notify data.attachments accepts { kind: \"rendered-pdf\", templateSlug, variables, fileName, locale? }. The send job renders the PDF through the document-pdf renderer, so the job payload carries the variables (at most 64000 bytes as JSON), not the bytes. Variables are stored in the job payload, so keep personal data out of them or accept that retention."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"version": "0.363.0",
|
|
23
|
+
"type": "improvement",
|
|
24
|
+
"title": "ChannelContext.readAttachment takes an attachment origin",
|
|
25
|
+
"detail": "readAttachment(ref, origin) with origin \"template\" (from the renderer) or \"message\" (default, from notify data). Only template attachments may fall back to the system tenant; file refs from notify data stay limited to the sending tenant."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"version": "0.363.0",
|
|
29
|
+
"type": "improvement",
|
|
30
|
+
"title": "EMAIL_CHANNEL_NAME, createTemplateMailRenderer and createEmailAttachmentReader are exported",
|
|
31
|
+
"detail": "The email channel name is a shared constant instead of a string literal. The mail renderer and the inline-attachment reader that build the channel context are exported and accept a tenant-bound db, so a handler can send through the same path as a notification."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"version": "0.363.0",
|
|
35
|
+
"type": "improvement",
|
|
36
|
+
"title": "Notification messages carry attachments (file refs and inline cid images)",
|
|
37
|
+
"detail": "RenderedMessage and the send job payload accept attachments as references (kind file or inline), never bytes. ChannelContext.readAttachment resolves them tenant-scoped at send time; createDeliveryService takes a new filesForTenant option for the inline fallback path."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"version": "0.363.0",
|
|
41
|
+
"type": "improvement",
|
|
42
|
+
"title": "NotifyFactory takes an optional fileProviderResolver, so immediate and bootstrap mails can read attachments too"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"version": "0.363.0",
|
|
46
|
+
"type": "fix",
|
|
47
|
+
"title": "Queued mails render with the tenant's config again",
|
|
48
|
+
"detail": "The delivery render and send jobs read the tenant config through ctx.configFor, which job contexts do not carry, so queued mails rendered without tenant name, locale, currency and branding. Both jobs now use ctx.config, which the job runner builds for the payload's tenant."
|
|
49
|
+
},
|
|
2
50
|
{
|
|
3
51
|
"version": "0.357.0",
|
|
4
52
|
"type": "improvement",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "Branding screen edits the logo file and readBranding returns logoFile",
|
|
6
|
+
"detail": "The branding settings screen has a logo upload for managed-pages:config:branding-logo-file, and readBranding and the branding query include logoFile next to logoUrl. The template resource errors template_resource_too_large and template_resource_unsupported_image have German and Spanish texts."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.353.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -1,4 +1,43 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "document-pdf requests name a template, the response carries fileName",
|
|
6
|
+
"detail": "The document-pdf payload is { slug, locale, variables } instead of ready HTML in content. The response has a fileName, RendererContext gets an optional filesForTenant (file access per tenant) and RendererError has the new code unavailable for a renderer backend that cannot be reached.",
|
|
7
|
+
"migration": "Callers that sent `payload: { content }` switch to a document-pdf template and pass slug, locale and variables (money-horse credit-schedule-pdf follows in #621); renderer-pdf callers pass slug and locale too. The enterprise package @cosmicdriftgamestudio/kumiko-renderer-puppeteer-client no longer builds against these types and is replaced by @cosmicdrift/kumiko-renderer-puppeteer-client."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"version": "0.363.0",
|
|
11
|
+
"type": "improvement",
|
|
12
|
+
"title": "renderer plugins can preview a document",
|
|
13
|
+
"detail": "RendererPlugin gets the optional capability previewDocument(req, ctx), which returns the filled-in body and layout regions without calling the print service. template-resolver:query:preview with kind document-pdf uses it, so the editor shows replaced placeholders and the resource and required-placeholder checks; without such a plugin the preview keeps returning the body and raw layout."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"version": "0.363.0",
|
|
17
|
+
"type": "improvement",
|
|
18
|
+
"title": "PdfOptions has landscape",
|
|
19
|
+
"detail": "The document-pdf options gain landscape, which the puppeteer-service passes to Chromium."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"version": "0.363.0",
|
|
23
|
+
"type": "breaking",
|
|
24
|
+
"title": "RenderRequest kind mail replaces mail-html",
|
|
25
|
+
"detail": "RenderRequest and RenderResponse use kind mail with a MailPayload ({ slug, locale, variables, unsubscribeUrl? }) and a response of { subject, html, text, previewText? }. The export MailHtmlPayload is removed; use MailPayload. The default plugin name for kind mail stays mail-html. RendererContext gains an optional config accessor that plugins use for tenant locale, currency and branding.",
|
|
26
|
+
"migration": "Replace kind mail-html with mail in createRendererForTenant and render calls, pass { slug, locale, variables } instead of content/contentFormat, and read the subject from the response instead of building it yourself. Pass ctx.config in the RendererContext to get tenant locale, currency and branding."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"version": "0.363.0",
|
|
30
|
+
"type": "breaking",
|
|
31
|
+
"title": "renderer-simple, MailBranding and renderer kind \"notification\" are removed",
|
|
32
|
+
"detail": "Every mail is a stored template rendered by renderer-mail-html now. renderer-simple (createRendererSimpleFeature, simpleRenderer, createSimpleRenderer, RendererSimpleOptions, mail blocks with LocalizedText, MailBadge, MailChip, MailStage, MailStageState and MailTone), the MailBranding type, the renderer kind \"notification\" and AuthMailContent are gone. NotificationRenderer and RendererInput are removed from delivery, and createChannelEmailFeature no longer takes a renderer option. The type NotificationPayload is removed from renderer-foundation. The template-resolver keeps \"notification\" only as a stored kind so legacy rows stay readable; RENDER_KINDS is mail, document-pdf and image-snapshot.",
|
|
33
|
+
"migration": "Remove createRendererSimpleFeature() and any renderer or mailBranding option from your feature list and createChannelEmailFeature call. An r.notification that is sent by email needs template + meta (or localizedTemplate) and variables; the sections/header/footer data it carried is replaced by template variables. Branding (logo, footer) now comes from the tenant branding config and the mail layout of renderer-mail-html. Mount template-resolver, renderer-foundation and @cosmicdrift/kumiko-renderer-mail-html (composeRendererStack() mounts all of them) and run seedNotificationTemplates at boot. Existing template rows with kind \"notification\" are no longer rendered; re-create them as kind \"mail\" or archive them."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"version": "0.363.0",
|
|
37
|
+
"type": "improvement",
|
|
38
|
+
"title": "MailPayload.draft renders an unsaved mail template; RendererContext.db also accepts a TenantDb",
|
|
39
|
+
"detail": "MailDraft (content, meta, variableSchema) replaces the stored body and subject of the template with the payload's slug and keeps its stored images; a slug without a stored template renders as a tenant draft. The renderer sanitizes the draft body and validates its meta again, and the response carries no template provenance. RendererContext.db is widened from DbConnection to DbRunner | TenantDb."
|
|
40
|
+
},
|
|
2
41
|
{
|
|
3
42
|
"version": "0.306.0",
|
|
4
43
|
"type": "breaking",
|
|
@@ -1,4 +1,122 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.363.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "Overview and layout-source queries for the template designer",
|
|
6
|
+
"detail": "template-resolver:query:overview lists the mail, PDF and layout templates of the caller's tenant grouped by slug and kind (effective origin, locales, status, versions, layout slug, last change and the notifications that use it) and template-resolver:query:layout-source returns the header, signature and footer regions of a mail or PDF layout plus the locale a save has to use; a SystemAdmin also receives the MJML source of the system layout. The usage lookup is the exported collectTemplateUsage."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"version": "0.363.0",
|
|
10
|
+
"type": "improvement",
|
|
11
|
+
"title": "contentFormat \"document\" with a toolbar editor for mail and PDF templates",
|
|
12
|
+
"detail": "ContentEditorFormat gains \"document\". template-resolver registers DocumentContentEditor for it (tiptap, lazy-loaded) and stores the body as html. The toolbar offers paragraph style, bold, italic, lists, links, placeholders and the blocks image, table, button, divider, repeat and page break; the blocks prop picks them (MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS). Placeholders are inserted only as variable nodes (data-variable), never as {{name}} text. ContentPreview does not substitute example values for \"document\" content, because substituting a button or link href would make the schema drop that node. New exports from template-resolver/web: DocumentContentEditor, DocumentEditorProps, DocumentToolbarBlock, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"version": "0.363.0",
|
|
16
|
+
"type": "fix",
|
|
17
|
+
"title": "Preview uses the examples of a stored or draft variable schema",
|
|
18
|
+
"detail": "A template's variableSchema kept only type and required, label and example were dropped, so the preview showed [name] instead of the declared example. The schema now keeps label and example, for mail and document previews."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"version": "0.363.0",
|
|
22
|
+
"type": "improvement",
|
|
23
|
+
"title": "PDF meta gets orientation, printBackground and layoutHeaderFooter; paragraphs and headings get data-align",
|
|
24
|
+
"detail": "The document-pdf meta accepts orientation (portrait or landscape), printBackground (default true) and layoutHeaderFooter (false prints without the layout header and footer). Paragraphs and headings carry textAlign (left, center, right, justify), serialized as data-align and kept by the sanitizer only with these four values. New exports are evaluateDocumentDraft, localeSchema, DOCUMENT_TEXT_ALIGNMENTS and DocumentTextAlign; compileDocumentBodyToHandlebars accepts alignmentAsInlineStyle."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"version": "0.363.0",
|
|
28
|
+
"type": "breaking",
|
|
29
|
+
"title": "document-pdf templates require contentFormat html, and html bodies are sanitized on write",
|
|
30
|
+
"detail": "upsertSystem, upsertTenant, the collection-set handlers and seedSystemTemplate rebuild html bodies of kind mail-html and document-pdf through the new document schema (template-resolver/document-schema). Script elements, inline event handlers, embedded content (iframe, frame, object, embed, applet, portal), links and url attributes (svg href, xlink:href, form action, base) outside https/http/mailto/tel/{{placeholder}}, external image sources, alt text containing < or >, and invalid or prototype-chain variable names are rejected with a validation_error (or a thrown Error in seedSystemTemplate); anything the schema cannot express is dropped silently, and links keep only href (no target, rel, class or title). New exports: documentExtensions, DocumentLink and the other Document* nodes, isAllowedDocumentLinkHref, isDocumentReferenceName, isDocumentResourceKey, isDocumentPlaceholderHref, sanitizeDocumentHtml, sanitizeTemplateBody. kind document-pdf with another contentFormat is rejected with document_requires_html_format.",
|
|
31
|
+
"migration": "Store document-pdf bodies as html and reference images via data-resource instead of src. mail-html with markdown or mjml is unchanged."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"version": "0.363.0",
|
|
35
|
+
"type": "improvement",
|
|
36
|
+
"title": "Mail templates carry file attachments (PDF, PNG, JPEG)",
|
|
37
|
+
"detail": "linkedResources stays image only; file attachments of a mail template are listed in the optional TemplateResource.fileAttachments (kind file, fileRefId, fileName), sorted by key. template-resolver:write:resource-upload takes purpose \"attachment\" with a fileName; it checks the file by content (PDF, PNG, JPEG), keeps the original bytes, allows at most 10 per mail template and stores the entry next to the inline images. resource-remove, copy-locale and the bundle export/import carry attachments (bundle resource entries get purpose \"attachment\"). The preview lists attachments with kind \"inline\" or \"file\" (PreviewAttachment is now a union), send-test sends them, and the mail renderer attaches them after the inline images within the delivery attachment limit."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"version": "0.363.0",
|
|
41
|
+
"type": "improvement",
|
|
42
|
+
"title": "copy-locale can copy system templates (scope \"system\", system admins only)",
|
|
43
|
+
"detail": "template-resolver:write:copy-locale takes scope \"tenant\" (default) or \"system\". With \"system\" a system admin copies a system template to another locale as a draft; other callers get access denied."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"version": "0.363.0",
|
|
47
|
+
"type": "improvement",
|
|
48
|
+
"title": "Mail preview returns displayHtml for the editor",
|
|
49
|
+
"detail": "The preview of a mail template carries displayHtml, the body with cid images replaced by data URIs (png, jpeg, gif, webp, 5 MiB budget in total) so an editor can show it without cid support. The sent mail is unchanged."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"version": "0.363.0",
|
|
53
|
+
"type": "improvement",
|
|
54
|
+
"title": "Document editor gets variable labels, a handle, resource previews, canvas chrome, underline and PlaceholderLineEditor",
|
|
55
|
+
"detail": "DocumentContentEditor accepts variableLabels, systemVariables, resourcePreviews, chrome (\"default\" or \"canvas\") and onEditorReady (handle with insertPlaceholder, insertResource, focus). The new PlaceholderLineEditor edits plain text with {{name}} placeholders as chips on one line. Underline (u) is part of the document schema and survives the sanitizer."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"version": "0.363.0",
|
|
59
|
+
"type": "improvement",
|
|
60
|
+
"title": "Mail templates link a PDF rendered from a document template (resource-link-pdf)",
|
|
61
|
+
"detail": "New write template-resolver:write:resource-link-pdf takes templateId, key, templateSlug and fileName and stores a linkedResources entry { kind \"rendered-pdf\", templateSlug, fileName } in a mail template; nothing is uploaded. fileName is a one-line pattern that may use the mail's {{placeholders}} and must end with .pdf (no / \\ \" ; or ..). The document-pdf template must exist for the tenant or the system, otherwise the write fails with template_attachment_pdf_template_missing; an invalid pattern or slug fails with template_attachment_invalid. Uploaded files and linked PDFs share the limit of 10 attachments per template. resource-remove, copy-locale and the bundle export/import carry the entry (the bundle gets an optional pdfAttachments map of key to { templateSlug, fileName }; import does not check that the document template exists). TemplateResource gains pdfAttachmentLinks, LinkedResourceEntry gains the TemplatePdfAttachmentLink variant."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"version": "0.363.0",
|
|
65
|
+
"type": "improvement",
|
|
66
|
+
"title": "Preview and test mail use the images and attachments of the edited row, also while it is a draft",
|
|
67
|
+
"detail": "When preview or send-test get content and the caller has a row for (slug, kind, locale), that row supplies linkedResources whatever its status (also when it has none, so nothing is borrowed from the system template), so a tenant whose customization is saved as a draft sees its logo and attachments. MailDraft has an optional linkedResources; without it the stored active template's resources are used as before. PreviewAttachment gains the variant { kind \"rendered-pdf\", name, templateSlug } without sizeBytes, because the PDF is not rendered in the preview; size_under_cap does not count it."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"version": "0.363.0",
|
|
71
|
+
"type": "improvement",
|
|
72
|
+
"title": "Preview query and send-test write for mail and PDF templates",
|
|
73
|
+
"detail": "template-resolver:query:preview renders a draft, or the stored template when no content is given, with sample values from the declared variable examples (list variables get two rows). The draft passes the same write gates as a save and a mail goes through the real mail renderer, so subject, html, plain text and inline images match a real send. The response carries checks (images resolved, plain text present, size under 10 MiB, required placeholders used); a PDF template returns its sanitized body and the layout regions. template-resolver:write:send-test mails the rendered mail to the calling user's own address only, subject prefixed with [TEST], limited to 10 per user and hour. It needs delivery, channel-email and renderer-mail-html."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"version": "0.363.0",
|
|
77
|
+
"type": "improvement",
|
|
78
|
+
"title": "DocumentEditorProps toolbar option for an icon-only toolbar",
|
|
79
|
+
"detail": "DocumentEditorProps gains toolbar (\"full\" or \"compact\", default \"full\"). Compact renders the placeholder and block buttons icon-only with a tooltip and a narrower paragraph select, for narrow columns such as the layout editor regions. The formatting buttons now carry a tooltip with their label in every mode."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"version": "0.363.0",
|
|
83
|
+
"type": "breaking",
|
|
84
|
+
"title": "kind mail-html is replaced by mail, mail-layout and pdf-layout; templates carry meta",
|
|
85
|
+
"detail": "The kind mail-html is removed; the new non-render kind snippet holds collection content (reply snippets, signatures; any contentFormat, html is sanitized like a mail body). Mail bodies are kind mail (contentFormat html only, rebuilt through the document schema, meta.subject required), mail frames are kind mail-layout (contentFormat mjml), and pdf-layout (html) is new. The table gains a nullable meta column (JSON per kind, validated by parseTemplateMeta: mail takes subject, previewText, layoutSlug, category, sender; layouts take none; other kinds take no meta) and the template-resource entity moves to eventVersion 2 with an upcaster that reads stored mail-html events as mail. upsertSystem, upsertTenant (active), publish and seedSystemTemplate reject unknown placeholders and, for the same writes, bodies that miss a required variable of the notification with the same qualified name; a tenant draft may be incomplete and returns validation. Slugs must be kebab segments joined by a colon. seedSystemTemplate now validates the slug (templateSlugSchema) and the per-kind meta for every kind. A content collection of kind mail, mail-layout or pdf-layout is refused on collection-set (field issue on kind, templateResolver.errors.collection.kindNotAllowed), because such a tenant row would shadow the system template without the meta and placeholder gates. TemplateResource gains meta. New exports: parseTemplateMeta, isMailTemplateMeta, templateSlugSchema, validateTemplatePlaceholders, resolveTemplateVariables, compileDocumentBodyToHandlebars, MAIL_CATEGORIES and their types; seedNotificationTemplates and hasNotificationTemplates on template-resolver/seeding, which applyBootSeeds now calls. RENDER_KINDS contains mail instead of mail-html.",
|
|
86
|
+
"migration": "Rename kind mail-html to mail in app code, collections and seeds; mail bodies must be contentFormat html (markdown or mjml mail bodies are rejected) and carry meta.subject, mail layouts use kind mail-layout with contentFormat mjml and slug default. Slugs of every kind must now be kebab segments joined by a colon (upsert handlers and seedSystemTemplate reject dotted, underscored or camelCase slugs). Collections that used kind mail-html move to the new kind snippet (stored mail-html rows are upcast to mail, which collections refuse, so re-create those entries under snippet); collection-set refuses mail, mail-layout and pdf-layout collections. seedSystemTemplate callers must pass a kebab slug and valid meta for every kind, not only mail. Generate and apply the migration that adds the nullable meta column to read_template_resources; it ships a rebuild marker for read_template_resources so existing mail-html rows are read as mail after the rebuild."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"version": "0.363.0",
|
|
90
|
+
"type": "improvement",
|
|
91
|
+
"title": "resolveLayout finds a layout in any locale",
|
|
92
|
+
"detail": "TemplateResolverApi gains resolveLayout({ tenantId, slug, kind, locale }) for mail-layout and pdf-layout. It looks at the tenant first (requested locale, then the fallback locale, then any active locale) and then at the system layouts the same way, ignoring draft and archived rows. A layout saved by the layout editor under one locale is therefore found for every locale. The template preview uses it for the PDF layout."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"version": "0.363.0",
|
|
96
|
+
"type": "improvement",
|
|
97
|
+
"title": "PDF template meta, render provenance, system template lifecycle and override queries",
|
|
98
|
+
"detail": "kind document-pdf takes a strict meta (layoutSlug, pageFormat A4/Letter, margins in mm, fileName without / \\ \" ; or .., metadata title/author); new exports PDF_PAGE_FORMATS, PdfPageFormat, PdfTemplateMeta, readPdfTemplateMeta, DEFAULT_MAIL_LAYOUT_SLUG. RenderResponse (renderer-foundation) gains optional template and layout refs ({ templateId, templateVersion, scope }, new types RenderedTemplateRef and RenderProvenance); renderer-mail-html fills them. New handlers template-resolver:write:publish-system and archive-system (SystemAdmin), reset-to-system (TenantAdmin, SystemAdmin), queries usage, tenant-overrides (SystemAdmin, counts only) and diff-to-system. publish and archive answer not_found for rows outside the caller's tenant instead of a version_conflict; find-by-id also returns meta."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"version": "0.363.0",
|
|
102
|
+
"type": "breaking",
|
|
103
|
+
"title": "linkedResources is no longer a payload field of upsertSystem/upsertTenant; resourceUpload and resourceRemove manage it",
|
|
104
|
+
"detail": "Two steps - upload the image with POST /api/files (multipart, no entityType), then call template-resolver:write:resource-upload with { sourceFileRefId, templateId?, key? }. The handler re-encodes the caller's own unclaimed upload into a new file ref (width at most 1200 px) and links it into the template; resource-remove unlinks a key. upsertSystem and upsertTenant no longer accept linkedResources and leave the stored value untouched on update. The size cap is the system config key resource-max-bytes (default 2 MiB); a cap above the files route's maxUploadSize has no effect because the upload is rejected first. The source upload stays as an unclaimed file.",
|
|
105
|
+
"migration": "Whoever sent linkedResources with upsertSystem or upsertTenant now uploads the image via POST /api/files (multipart, no entityType) and links it with template-resolver:write:resource-upload { sourceFileRefId, templateId, key }. Server-side seeding (seedSystemTemplate linkedResources) stays."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"version": "0.363.0",
|
|
109
|
+
"type": "improvement",
|
|
110
|
+
"title": "Bundle import re-encodes its images like resource-upload; re-seeding keeps uploaded system resources",
|
|
111
|
+
"detail": "importBundle and importBundleSystem store each bundle resource through the same normalization as resource-upload (decoded format decides the content type, SVG and non-images are rejected, width at most 1200 px, resource-max-bytes applies), so an exported bundle carries the re-encoded bytes. seedSystemTemplate without linkedResources no longer resets the links of an existing row, so images a system admin uploaded survive the next boot. storeTemplateResource from the template-resolver barrel is the normalizing store; the raw byte variant is gone."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"version": "0.363.0",
|
|
115
|
+
"type": "breaking",
|
|
116
|
+
"title": "Tenant mail-layouts are structured html, pdf-layout and document-pdf are placeholder-validated",
|
|
117
|
+
"detail": "A new validate query dry-runs the write pipeline (used, unknown and missing placeholders, canSave, canPublish). document-pdf, pdf-layout and mail-layout now go through the same placeholder gate as mail; document-pdf and pdf-layout know the system placeholders page and pages. A tenant mail-layout is html with a data-content slot plus header, signature and footer regions that renderer-mail-html wraps in a fixed MJML frame; raw mjml (with {{{content}}} exactly once) is system-only. New handlers export-bundle, import-bundle, import-bundle-system and copy-locale move a template with its resource files between tenants and locales. r.notification accepts a record mapping from an entity row to the declared variables, validated at boot. publish and archive no longer touch system rows through a tenant-scoped SystemAdmin.",
|
|
118
|
+
"migration": "Tenant mail-layout rows stored as mjml are ignored by the renderer, which falls back to the system layout; re-create them as html with a data-content slot. upsert-system answers with an extra validation field. seedSystemTemplate errors now read `<label> rejected: <code> (<detail>); ...`. Layout bodies without the content slot are rejected on write. `set` now runs the same gate for mail, document-pdf, pdf-layout and mail-layout rows and rejects unsanitized markup or publish issues, since saving publishes; the mail renderer also re-sanitizes stored tenant html layouts and falls back to the system layout when they fail. upsert-system and upsert-tenant no longer accept linkedResources (resources go through the resource upload; bundle import and copy-locale attach them). Unknown data-resource keys are a validate warning (resource_not_uploaded), not a write error."
|
|
119
|
+
},
|
|
2
120
|
{
|
|
3
121
|
"version": "0.354.0",
|
|
4
122
|
"type": "fix",
|