backend-manager 5.12.0 → 5.13.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.
@@ -33,7 +33,7 @@ Both transactional and marketing paths share the same preparation layer:
33
33
  | `resolveBrand(Manager)` | Clones brand config, sanitizes images (SVG→PNG via CDN naming) |
34
34
  | `resolveSender({ sender, from, group }, brand, brandDomain)` | Resolves sender from/display-name/ASM group by category key |
35
35
  | `renderContent({ content, html }, utmOptions)` | Markdown→HTML via markdown-it, applies UTM link tagging |
36
- | `resolveSignoff(signoff)` | Fills personal signoff defaults (headshot, name, URL) when `type: 'personal'` |
36
+ | `resolveSignoff(signoff)` | Defaults `type` to `'team'`; personal signoffs render only with caller-provided details (name/image/url) no built-in personal defaults |
37
37
  | `buildCategories(type, brandId, extra)` | Builds categories array: `['transactional', brandId, ...extra]` |
38
38
  | `buildUnsubscribeUrl({ email, groupId, template, websiteUrl })` | HMAC-signed one-click unsubscribe URL |
39
39
  | `buildTemplateData({ brand, subject, ... })` | Deep-merges system defaults with caller data into the template data tree |
@@ -96,11 +96,13 @@ await email.send({
96
96
  categories: ['account/welcome'],
97
97
  data: {
98
98
  content: { title: 'Welcome!', message: '# Hello!\n\nMarkdown here.' },
99
- signoff: { type: 'personal' },
99
+ signoff: { type: 'personal', name: 'Jane Doe, CEO', image: 'https://cdn.example.com/headshot.jpg', url: 'https://example.com', urlText: '@janedoe' },
100
100
  },
101
101
  });
102
102
  ```
103
103
 
104
+ A `personal` signoff without a `name` falls back to the team rendering — there are no built-in personal defaults.
105
+
104
106
  ### Per-template `data.content` shapes
105
107
 
106
108
  | Template | `data.content` fields |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "5.12.0",
3
+ "version": "5.13.0",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "files": [
@@ -171,14 +171,6 @@ Module.prototype.defaultize = function () {
171
171
  email.dynamicTemplateData.signoff = options?.data?.signoff || {};
172
172
  email.dynamicTemplateData.signoff.type = options?.data?.signoff?.type || 'team';
173
173
 
174
- if (email.dynamicTemplateData.signoff.type === 'personal') {
175
- email.dynamicTemplateData.signoff.image = options?.data?.signoff?.image
176
- || 'https://cdn.itwcreativeworks.com/assets/ian-wiedenman/images/website/ian-wiedenman-headshot-2021-color-1024x1024.jpg';
177
- email.dynamicTemplateData.signoff.name = options?.data?.signoff?.name || 'Ian Wiedenman, CEO';
178
- email.dynamicTemplateData.signoff.url = options?.data?.signoff?.url || 'https://ianwiedenman.com';
179
- email.dynamicTemplateData.signoff.urlText = options?.data?.signoff?.urlText || '@ianwieds';
180
- }
181
-
182
174
  email.dynamicTemplateData.user = Manager.User(options.user).properties;
183
175
 
184
176
  // Get brand configuration from Manager.config.brand (backend-manager-config.json)