@fleetless/contracts 15.4.0 → 15.5.0-next.1

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/CHANGELOG.md CHANGED
@@ -9,6 +9,30 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ### Changed
13
+
14
+ - **The default app mails carry an HTML part with the app's brand**
15
+ (fleetless/fleetless#1155). `DEFAULT_MAIL_TEMPLATES[kind].html` is a
16
+ string now, typed `string` and no longer `null`: a Liquid template that
17
+ lays out the same words as the text part, with the app's name, logo or
18
+ initials and accent at the head, as the hosted pages show them, and under
19
+ the sheet the app's legal links when both are set and `Secured by
20
+ Fleetless`. Light only: both colour-scheme metas say `light only` and no
21
+ rule follows the reader's system. The four strings are generated from the
22
+ cloud's mail layout into `src/app-mail-html.ts`, exported as
23
+ `DEFAULT_MAIL_HTML`; `scripts/write-app-mail-html.ts` writes that file
24
+ from the cloud's printer. Subjects and text do not change. A custom
25
+ template is sent exactly as written, with or without HTML.
26
+ - `MAIL_TEMPLATE_VARIABLES` gains five names after the eleven, in this
27
+ order: `app.accent` (`#rrggbb`, the app's accent where its plan includes
28
+ `hosted_logo`, otherwise `#161616`), `app.on_accent` (`#000000` or
29
+ `#ffffff`, whichever reads better on it), `app.initials` (one or two
30
+ letters, as on the hosted pages), `app.logo_src` (what to put into an
31
+ `<img src>`, or null when the app has no logo to show in a mail) and
32
+ `app.logo_shape` (`square`, `wide` or null). Sixteen in all. A consumer
33
+ that checks a template against the list accepts them; one that typed
34
+ `html` as `null` reads a string.
35
+
12
36
  ## [15.4.0] — 2026-11-13
13
37
 
14
38
  ### Changed
@@ -0,0 +1,19 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * **Generated. Do not edit by hand.**
4
+ *
5
+ * The default HTML of the four app mails, as the cloud's
6
+ * `scripts/print-app-mail-defaults.ts` prints it on cloud branch
7
+ * `feat/1155-mails-have-no-layout`,
8
+ * commit 4b88972f02775404f5fae008789a9d8fb7c3c4de.
9
+ * Written by `scripts/write-app-mail-html.ts`, which says how to regenerate
10
+ * it.
11
+ *
12
+ * Each value is a Liquid template: the cloud's mail layout for the app frame,
13
+ * with Liquid where the values go. A hand edit here is caught by the cloud
14
+ * test that renders each default and compares it with the layout's own
15
+ * output (`test/app-mail-defaults.test.ts`). `DEFAULT_MAIL_TEMPLATES` in
16
+ * `app-users.ts` carries these as its `html`.
17
+ */
18
+ import type { MailTemplateKind } from './app-users.js';
19
+ export declare const DEFAULT_MAIL_HTML: Record<MailTemplateKind, string>;
@@ -0,0 +1,7 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ export const DEFAULT_MAIL_HTML = {
3
+ "invite": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>You&#39;re invited to {{ app.name }}</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">{{ org.name }} has invited you as {{ role.name }}.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">You&#39;re invited to {{ app.name }}</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Hello {{ user.display_name | default: user.email }},</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\"><b style=\"color:#101614;font-weight:600\">{{ org.name }}</b> has invited you to {{ app.name }} as <b style=\"color:#101614;font-weight:600\">{{ role.name }}</b>.</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;table-layout:fixed\"><tr><td align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"background-color:{{ app.accent }};border-radius:10px\"><a href=\"{{ link }}\" style=\"display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center\">Accept the invitation</a></td></tr><tr><td style=\"padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Or open this link: <span style=\"font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px\">{{ link }}</span></td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you were not expecting this invitation, ignore this mail — no account is created until you accept.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n",
4
+ "verify": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>Confirm your email for {{ app.name }}</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">Confirm this address so you can sign in.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">Confirm your email for {{ app.name }}</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Hello {{ user.email }},</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Confirm this address so you can sign in to {{ app.name }}.</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;table-layout:fixed\"><tr><td align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"background-color:{{ app.accent }};border-radius:10px\"><a href=\"{{ link }}\" style=\"display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center\">Confirm this address</a></td></tr><tr><td style=\"padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Or open this link: <span style=\"font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px\">{{ link }}</span></td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you did not create this account, ignore this mail — the account stays unconfirmed and cannot be used.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n",
5
+ "reset": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>Reset your {{ app.name }} password</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">Choose a new password, or ignore this mail.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">Reset your {{ app.name }} password</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Hello {{ user.email }},</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Someone asked to reset the password for this address at {{ app.name }}.</p></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate;table-layout:fixed\"><tr><td align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"background-color:{{ app.accent }};border-radius:10px\"><a href=\"{{ link }}\" style=\"display:block;padding:15px 18px;border-radius:10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:15px;font-weight:600;color:{{ app.on_accent }};text-decoration:none;text-align:center\">Choose a new password</a></td></tr><tr><td style=\"padding:8px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:18px;color:#5f6b66;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">Or open this link: <span style=\"font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:12px\">{{ link }}</span></td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If it was not you, ignore this mail — your current password keeps working and nothing changes.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n",
6
+ "login_code": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"format-detection\" content=\"telephone=no, date=no, address=no, email=no\">\n<meta name=\"color-scheme\" content=\"light only\">\n<meta name=\"supported-color-schemes\" content=\"light only\">\n<title>Your {{ app.name }} sign-in code</title>\n<style>@media only screen and (max-width:480px){.canvas-pad{padding:20px 12px 18px !important}.sheet-pad{padding:24px 20px !important}}</style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f4f6f5;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%\"><div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;font-size:1px;line-height:1px;color:#f4f6f5;opacity:0\">It works once, for {{ expires_in_minutes }} minutes.&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;</div>\n<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f4f6f5\" style=\"width:100%;background-color:#f4f6f5;border-collapse:collapse\"><tr><td align=\"center\" class=\"canvas-pad\" style=\"padding:24px 16px 22px\">\n<!--[if mso]><table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><![endif]-->\n<table role=\"presentation\" width=\"600\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;max-width:600px;margin:0 auto;border-collapse:separate\"><tr><td class=\"sheet-pad\" bgcolor=\"#ffffff\" style=\"background-color:#ffffff;border:1px solid #dfe5e2;border-radius:16px;padding:32px 28px\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td style=\"padding:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\">{% if app.logo_src and app.logo_shape == 'wide' %}<img src=\"{{ app.logo_src }}\" width=\"168\" height=\"32\" alt=\"{{ app.name }}\" style=\"display:block;border:0\">{% elsif app.logo_src %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse\"><tr><td width=\"32\" style=\"width:32px\"><img src=\"{{ app.logo_src }}\" width=\"32\" height=\"32\" alt=\"\" style=\"display:block;border:0\"></td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% else %}<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td width=\"32\" height=\"32\" align=\"center\" bgcolor=\"{{ app.accent }}\" style=\"width:32px;height:32px;background-color:{{ app.accent }};border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:12.5px;line-height:32px;font-weight:700;letter-spacing:0.02em;color:{{ app.on_accent }};text-align:center\">{{ app.initials }}</td><td style=\"padding:0 0 0 10px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;font-weight:600;color:#101614\">{{ app.name }}</td></tr></table>{% endif %}</td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><h1 style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:22px;line-height:28px;font-weight:600;letter-spacing:-0.01em;color:#101614;text-wrap:balance\">Your sign-in code</h1></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:separate\"><tr><td align=\"center\" bgcolor=\"#eef2f0\" style=\"background-color:#eef2f0;border-radius:10px;padding:18px 16px;font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:30px;line-height:30px;font-weight:500;letter-spacing:0.16em;color:#101614;text-align:center;font-variant-numeric:tabular-nums;-webkit-user-select:all;user-select:all\">{{ code }}</td></tr></table></td></tr><tr><td style=\"padding:16px 0 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif\"><p style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#33403b;overflow-wrap:anywhere;word-wrap:break-word;word-break:break-word\">It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.</p></td></tr></table></td></tr><tr><td style=\"padding:14px 8px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:11.5px;line-height:18px;color:#5f6b66\">{% if app.operator_info_url and app.privacy_policy_url %}<p style=\"margin:0 0 3px\"><span style=\"font-size:12px;font-weight:600;color:#33403b\">{{ app.name }}</span> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.operator_info_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Operator information</a> <span style=\"color:#a2aaa6;padding:0 2px\">·</span> <a href=\"{{ app.privacy_policy_url }}\" style=\"color:#5f6b66;text-decoration:underline\">Privacy policy</a></p>{% endif %}<p style=\"margin:0\">Secured by Fleetless</p></td></tr></table>\n<!--[if mso]></td></tr></table><![endif]-->\n</td></tr></table>\n</body>\n</html>\n"
7
+ };
@@ -596,8 +596,23 @@ export type MailTemplateKind = z.infer<typeof mailTemplateKind>;
596
596
  *
597
597
  * `role.name` is the display name of the organization role the invitee will
598
598
  * hold, not its key.
599
+ *
600
+ * **The last five are the app's brand** (fleetless/fleetless#1155), the same
601
+ * one its hosted pages show, so a template can lay a mail out the way the
602
+ * default HTML does:
603
+ *
604
+ * - `app.accent`: `#rrggbb`, the app's accent where its plan includes
605
+ * `hosted_logo`, otherwise `#161616`.
606
+ * - `app.on_accent`: `#000000` or `#ffffff`, whichever reads better on the
607
+ * accent.
608
+ * - `app.initials`: one or two letters, as on the hosted pages.
609
+ * - `app.logo_src`: what to put into an `<img src>`, or null when the app has
610
+ * no logo to show in a mail. In a sent mail it is an inline image
611
+ * (`cid:`), in a preview a `data:` address of the same picture.
612
+ * - `app.logo_shape`: `square`, `wide` or null. A square logo sits beside the
613
+ * app's name, a wide one replaces it.
599
614
  */
600
- export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name", "user.email", "user.display_name", "role.name", "link", "expires_in_hours", "code", "expires_in_minutes", "app.operator_info_url", "app.privacy_policy_url"];
615
+ export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name", "user.email", "user.display_name", "role.name", "link", "expires_in_hours", "code", "expires_in_minutes", "app.operator_info_url", "app.privacy_policy_url", "app.accent", "app.on_accent", "app.initials", "app.logo_src", "app.logo_shape"];
601
616
  /**
602
617
  * **The Fleetless default text for the four app mails.**
603
618
  *
@@ -613,9 +628,15 @@ export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name",
613
628
  * same renderer, the same bounds — so the cloud's fallback path cannot become
614
629
  * a second, weaker mechanism that merely looks like the real one.
615
630
  *
616
- * **Text-only (`html: null`).** A text part is a complete mail, and a default
617
- * that shipped markup would make every app that never opens the Mails tab send
618
- * Fleetless-styled HTML on behalf of a product that is not Fleetless.
631
+ * **The HTML part carries the app's brand** (fleetless/fleetless#1155).
632
+ * `html` is `DEFAULT_MAIL_HTML[kind]`, which the cloud's mail layout prints:
633
+ * the app's name, logo or initials and accent at the head, as the hosted
634
+ * pages show them, the same words as the text below, and under the sheet the
635
+ * app's legal links when both are set and `Secured by Fleetless`. It is the
636
+ * app's mail, not a Fleetless-styled one, so an app that never opens the
637
+ * Mails tab sends it on its own behalf. The text part stays a complete mail
638
+ * and does not change. A custom template is sent exactly as written, with or
639
+ * without HTML: a default never wraps or completes it.
619
640
  *
620
641
  * The voice is plain and short, names the app rather than this platform, and
621
642
  * says what the link does, how long it lasts, and what to do if it was not
@@ -647,12 +668,13 @@ export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name",
647
668
  * is the cloud's business — contracts has no renderer and adding one to check
648
669
  * its own constant would be a second, weaker copy of the thing that actually
649
670
  * sends mail. Here they are pinned as a complete, non-empty set; the cloud
650
- * asserts that the mail it sends for each kind is this exact text.
671
+ * asserts that the mail it sends for each kind is this exact text, and that
672
+ * each HTML default is what its layout prints.
651
673
  */
652
674
  export declare const DEFAULT_MAIL_TEMPLATES: Record<MailTemplateKind, {
653
675
  subject: string;
654
676
  text: string;
655
- html: null;
677
+ html: string;
656
678
  }>;
657
679
  /**
658
680
  * One stored template. `html` is nullable because the mailer's HTML part is
package/dist/app-users.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import { z } from 'zod';
3
3
  import { idpIssuer, mailStatus, password } from './identity.js';
4
+ import { DEFAULT_MAIL_HTML } from './app-mail-html.js';
4
5
  import { httpsLegalUrl } from './legal.js';
5
6
  import { roleKey } from './rights.js';
6
7
  /**
@@ -673,6 +674,21 @@ export const mailTemplateKind = z.enum(['invite', 'verify', 'reset', 'login_code
673
674
  *
674
675
  * `role.name` is the display name of the organization role the invitee will
675
676
  * hold, not its key.
677
+ *
678
+ * **The last five are the app's brand** (fleetless/fleetless#1155), the same
679
+ * one its hosted pages show, so a template can lay a mail out the way the
680
+ * default HTML does:
681
+ *
682
+ * - `app.accent`: `#rrggbb`, the app's accent where its plan includes
683
+ * `hosted_logo`, otherwise `#161616`.
684
+ * - `app.on_accent`: `#000000` or `#ffffff`, whichever reads better on the
685
+ * accent.
686
+ * - `app.initials`: one or two letters, as on the hosted pages.
687
+ * - `app.logo_src`: what to put into an `<img src>`, or null when the app has
688
+ * no logo to show in a mail. In a sent mail it is an inline image
689
+ * (`cid:`), in a preview a `data:` address of the same picture.
690
+ * - `app.logo_shape`: `square`, `wide` or null. A square logo sits beside the
691
+ * app's name, a wide one replaces it.
676
692
  */
677
693
  export const MAIL_TEMPLATE_VARIABLES = [
678
694
  'app.name',
@@ -686,6 +702,11 @@ export const MAIL_TEMPLATE_VARIABLES = [
686
702
  'expires_in_minutes',
687
703
  'app.operator_info_url',
688
704
  'app.privacy_policy_url',
705
+ 'app.accent',
706
+ 'app.on_accent',
707
+ 'app.initials',
708
+ 'app.logo_src',
709
+ 'app.logo_shape',
689
710
  ];
690
711
  /** Omit the entire D.2 line while a legacy app has either legal link unset. */
691
712
  const APP_LEGAL_MAIL_FOOTER = `{% if app.operator_info_url and app.privacy_policy_url %}
@@ -707,9 +728,15 @@ const APP_LEGAL_MAIL_FOOTER = `{% if app.operator_info_url and app.privacy_polic
707
728
  * same renderer, the same bounds — so the cloud's fallback path cannot become
708
729
  * a second, weaker mechanism that merely looks like the real one.
709
730
  *
710
- * **Text-only (`html: null`).** A text part is a complete mail, and a default
711
- * that shipped markup would make every app that never opens the Mails tab send
712
- * Fleetless-styled HTML on behalf of a product that is not Fleetless.
731
+ * **The HTML part carries the app's brand** (fleetless/fleetless#1155).
732
+ * `html` is `DEFAULT_MAIL_HTML[kind]`, which the cloud's mail layout prints:
733
+ * the app's name, logo or initials and accent at the head, as the hosted
734
+ * pages show them, the same words as the text below, and under the sheet the
735
+ * app's legal links when both are set and `Secured by Fleetless`. It is the
736
+ * app's mail, not a Fleetless-styled one, so an app that never opens the
737
+ * Mails tab sends it on its own behalf. The text part stays a complete mail
738
+ * and does not change. A custom template is sent exactly as written, with or
739
+ * without HTML: a default never wraps or completes it.
713
740
  *
714
741
  * The voice is plain and short, names the app rather than this platform, and
715
742
  * says what the link does, how long it lasts, and what to do if it was not
@@ -741,7 +768,8 @@ const APP_LEGAL_MAIL_FOOTER = `{% if app.operator_info_url and app.privacy_polic
741
768
  * is the cloud's business — contracts has no renderer and adding one to check
742
769
  * its own constant would be a second, weaker copy of the thing that actually
743
770
  * sends mail. Here they are pinned as a complete, non-empty set; the cloud
744
- * asserts that the mail it sends for each kind is this exact text.
771
+ * asserts that the mail it sends for each kind is this exact text, and that
772
+ * each HTML default is what its layout prints.
745
773
  */
746
774
  export const DEFAULT_MAIL_TEMPLATES = {
747
775
  invite: {
@@ -756,7 +784,7 @@ Accept the invitation:
756
784
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you were not expecting this invitation, ignore this mail — no account is created until you accept.
757
785
  ${APP_LEGAL_MAIL_FOOTER}
758
786
  `,
759
- html: null,
787
+ html: DEFAULT_MAIL_HTML.invite,
760
788
  },
761
789
  verify: {
762
790
  subject: 'Confirm your email for {{ app.name }}',
@@ -768,7 +796,7 @@ Confirm this address so you can sign in to {{ app.name }}:
768
796
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you did not create this account, ignore this mail — the account stays unconfirmed and cannot be used.
769
797
  ${APP_LEGAL_MAIL_FOOTER}
770
798
  `,
771
- html: null,
799
+ html: DEFAULT_MAIL_HTML.verify,
772
800
  },
773
801
  reset: {
774
802
  subject: 'Reset your {{ app.name }} password',
@@ -782,7 +810,7 @@ Choose a new password:
782
810
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If it was not you, ignore this mail — your current password keeps working and nothing changes.
783
811
  ${APP_LEGAL_MAIL_FOOTER}
784
812
  `,
785
- html: null,
813
+ html: DEFAULT_MAIL_HTML.reset,
786
814
  },
787
815
  login_code: {
788
816
  subject: 'Your {{ app.name }} sign-in code',
@@ -791,7 +819,7 @@ ${APP_LEGAL_MAIL_FOOTER}
791
819
  It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.
792
820
 
793
821
  ${APP_LEGAL_MAIL_FOOTER}`,
794
- html: null,
822
+ html: DEFAULT_MAIL_HTML.login_code,
795
823
  },
796
824
  };
797
825
  /**
package/dist/index.d.ts CHANGED
@@ -68,6 +68,7 @@ export type { LegalDocumentReference, LegalTextReferences } from './legal.js';
68
68
  export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
69
69
  export type { LegalAcceptanceListQuery, LegalAcceptanceVersionRow, LegalAcceptanceListResponse } from './legal-acceptances.js';
70
70
  export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, hostedLogoShape, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
71
+ export { DEFAULT_MAIL_HTML } from './app-mail-html.js';
71
72
  export type { AppUserStatus, AppUser, AppUserListResponse, CreateAppUserRequest, PatchAppUserRequest, CreateAppInvitationRequest, AppInvitation, PendingAppInvitation, AppInvitationListResponse, AppOidcProvider, AppOidcProviderListResponse, CreateAppOidcProviderRequest, PatchAppOidcProviderRequest, AppAuthConfig, AppSignInMethods, AppTwoFactorPolicy, AppHostedPages, HostedLogoShape, PutAppAuthRegistrationRequest, PutAppAuthSignInRequest, PutAppAuthUrlsRequest, PutAppAuthMcpRequest, PutAppAuthLookRequest, MailTemplateKind, AppMailTemplate, AppMailTemplateListResponse, PutAppMailTemplateRequest, MailTemplatePreviewRequest, MailTemplatePreviewResponse, MailTemplateProblemDetails, MailOutcome, } from './app-users.js';
72
73
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
73
74
  export type { AssetKind, Asset, UrdfCompleteness, AssetListResponse, AssetsClearResponse, MissingAssetQuery, AssetSyncRequest, AssetSyncResponse, AssetSyncState, AssetSyncStatus, AssetFailure, AssetFailureKind, AssetStoreRefusedDetails, AssetSyncBusyDetails, } from './assets.js';
package/dist/index.js CHANGED
@@ -67,6 +67,7 @@ export { httpsLegalUrl, legalDocumentReference, legalTextReferences, TERMS_VERSI
67
67
  export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
68
68
  // The per-app identity space.
69
69
  export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, hostedLogoShape, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
70
+ export { DEFAULT_MAIL_HTML } from './app-mail-html.js';
70
71
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
71
72
  export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS, COLLECTION_AUDIT_ACTIONS } from './audit.js';
72
73
  export { alertRowCondition, alertSeverity, alertState, datapointAlertRow, alertListResponse, orgFiringAlertsResponse, orgAlertsQuery, datapointDisplay, putDatapointDisplayRequest, } from './alerts.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "15.4.0",
3
+ "version": "15.5.0-next.1",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",