@fleetless/contracts 15.4.0 → 15.5.0-next.2
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 +35 -0
- package/artifacts/openapi.json +2 -2
- package/artifacts/routes.json +5 -3
- package/dist/app-mail-html.d.ts +19 -0
- package/dist/app-mail-html.js +7 -0
- package/dist/app-users.d.ts +28 -6
- package/dist/app-users.js +36 -8
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/routes.js +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,41 @@ 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
|
+
- **The logo upload declares its 429 and 503**
|
|
36
|
+
(fleetless/fleetless#1155). `PUT /api/apps/:id/auth-config/logo` is
|
|
37
|
+
`rateLimited: true` and lists `rate_limited` and a new code,
|
|
38
|
+
`logo_draw_unavailable`. The cloud now draws each uploaded logo once into
|
|
39
|
+
the small picture the app's mails show; uploads are limited per
|
|
40
|
+
organization, five at once and then one a minute, answering
|
|
41
|
+
`429 rate_limited` with `retry_after_ms`. `logo_draw_unavailable` is `503`
|
|
42
|
+
when too many logos already wait to be drawn on the server or the drawing
|
|
43
|
+
itself fails: nothing was stored, the logo in place stays, retrying
|
|
44
|
+
shortly may work, and there is no details payload. A logo that cannot be
|
|
45
|
+
drawn because of its content stays `400 validation_error`.
|
|
46
|
+
|
|
12
47
|
## [15.4.0] — 2026-11-13
|
|
13
48
|
|
|
14
49
|
### Changed
|
package/artifacts/openapi.json
CHANGED
|
@@ -3628,7 +3628,7 @@
|
|
|
3628
3628
|
}
|
|
3629
3629
|
},
|
|
3630
3630
|
"default": {
|
|
3631
|
-
"description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `invalid_uuid`, `validation_error`, `not_found`, `unsupported_media_type`.",
|
|
3631
|
+
"description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `invalid_uuid`, `validation_error`, `not_found`, `unsupported_media_type`, `rate_limited`, `logo_draw_unavailable`.",
|
|
3632
3632
|
"content": {
|
|
3633
3633
|
"application/json": {
|
|
3634
3634
|
"schema": {
|
|
@@ -3638,7 +3638,7 @@
|
|
|
3638
3638
|
}
|
|
3639
3639
|
}
|
|
3640
3640
|
},
|
|
3641
|
-
"description": "The body is the **raw image**, not JSON, so it has no request schema: `Content-Type` is one of `HOSTED_LOGO_TYPES` (`image/png`, `image/svg+xml`) and anything else is `415 unsupported_media_type`. At most `HOSTED_LOGO_MAX_BYTES` (512 KB); a larger body, or one that is not the image its type names, is `400 validation_error`. A new logo replaces the stored one. The hosted pages load it from `hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs."
|
|
3641
|
+
"description": "The body is the **raw image**, not JSON, so it has no request schema: `Content-Type` is one of `HOSTED_LOGO_TYPES` (`image/png`, `image/svg+xml`) and anything else is `415 unsupported_media_type`. At most `HOSTED_LOGO_MAX_BYTES` (512 KB); a larger body, or one that is not the image its type names, is `400 validation_error`. A new logo replaces the stored one. The hosted pages load it from `hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs. \n\n**Each upload is also drawn once**, into the small picture the app's mails show, and a logo that cannot be drawn is `400 validation_error`. Drawing costs the server, so uploads are limited per organization: five at once, then one a minute, answering `429 rate_limited` with `retry_after_ms`. When too many logos already wait to be drawn on the server, or the drawing itself fails, the answer is `503 logo_draw_unavailable`: nothing was stored, the logo in place stays, and retrying shortly may work."
|
|
3642
3642
|
},
|
|
3643
3643
|
"delete": {
|
|
3644
3644
|
"operationId": "delete_api_apps_id_auth_config_logo",
|
package/artifacts/routes.json
CHANGED
|
@@ -2010,7 +2010,7 @@
|
|
|
2010
2010
|
"summary": "Stores the logo the hosted pages show above the app's name.",
|
|
2011
2011
|
"audience": "developer",
|
|
2012
2012
|
"auth": "developer",
|
|
2013
|
-
"rateLimited":
|
|
2013
|
+
"rateLimited": true,
|
|
2014
2014
|
"ownerTier": false,
|
|
2015
2015
|
"status": 200,
|
|
2016
2016
|
"params": [
|
|
@@ -2029,10 +2029,12 @@
|
|
|
2029
2029
|
"invalid_uuid",
|
|
2030
2030
|
"validation_error",
|
|
2031
2031
|
"not_found",
|
|
2032
|
-
"unsupported_media_type"
|
|
2032
|
+
"unsupported_media_type",
|
|
2033
|
+
"rate_limited",
|
|
2034
|
+
"logo_draw_unavailable"
|
|
2033
2035
|
],
|
|
2034
2036
|
"transport": "http",
|
|
2035
|
-
"notes": "The body is the **raw image**, not JSON, so it has no request schema: `Content-Type` is one of `HOSTED_LOGO_TYPES` (`image/png`, `image/svg+xml`) and anything else is `415 unsupported_media_type`. At most `HOSTED_LOGO_MAX_BYTES` (512 KB); a larger body, or one that is not the image its type names, is `400 validation_error`. A new logo replaces the stored one. The hosted pages load it from `hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs."
|
|
2037
|
+
"notes": "The body is the **raw image**, not JSON, so it has no request schema: `Content-Type` is one of `HOSTED_LOGO_TYPES` (`image/png`, `image/svg+xml`) and anything else is `415 unsupported_media_type`. At most `HOSTED_LOGO_MAX_BYTES` (512 KB); a larger body, or one that is not the image its type names, is `400 validation_error`. A new logo replaces the stored one. The hosted pages load it from `hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs. \n\n**Each upload is also drawn once**, into the small picture the app's mails show, and a logo that cannot be drawn is `400 validation_error`. Drawing costs the server, so uploads are limited per organization: five at once, then one a minute, answering `429 rate_limited` with `retry_after_ms`. When too many logos already wait to be drawn on the server, or the drawing itself fails, the answer is `503 logo_draw_unavailable`: nothing was stored, the logo in place stays, and retrying shortly may work."
|
|
2036
2038
|
},
|
|
2037
2039
|
{
|
|
2038
2040
|
"method": "DELETE",
|
|
@@ -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
|
+
* pull request fleetless/cloud#246.
|
|
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'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 }}.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </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'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.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </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.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </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.͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ </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
|
+
};
|
package/dist/app-users.d.ts
CHANGED
|
@@ -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
|
-
* **
|
|
617
|
-
*
|
|
618
|
-
*
|
|
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:
|
|
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
|
-
* **
|
|
711
|
-
*
|
|
712
|
-
*
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
822
|
+
html: DEFAULT_MAIL_HTML.login_code,
|
|
795
823
|
},
|
|
796
824
|
};
|
|
797
825
|
/**
|
package/dist/errors.d.ts
CHANGED
|
@@ -304,5 +304,5 @@ export type RoleCycleDetails = z.infer<typeof roleCycleDetails>;
|
|
|
304
304
|
* list is the shared vocabulary, not a closed set, so a new refusal never
|
|
305
305
|
* needs a contracts release before it can be reported honestly.
|
|
306
306
|
*/
|
|
307
|
-
export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_cycle", "role_key_taken", "confirmation_required", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "legal_offer_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden", "record_referenced", "record_changed", "collection_not_found", "collection_removed", "reference_invalid", "required_missing", "robot_not_attached"];
|
|
307
|
+
export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_cycle", "role_key_taken", "confirmation_required", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "legal_offer_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden", "logo_draw_unavailable", "record_referenced", "record_changed", "collection_not_found", "collection_removed", "reference_invalid", "required_missing", "robot_not_attached"];
|
|
308
308
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
package/dist/errors.js
CHANGED
|
@@ -1212,6 +1212,24 @@ export const ERROR_CODES = [
|
|
|
1212
1212
|
* policy guard on the developer HTTP surface.
|
|
1213
1213
|
*/
|
|
1214
1214
|
'support_forbidden',
|
|
1215
|
+
// 2026-11-14 — a layout for every mail (fleetless/fleetless#1155). Before the
|
|
1216
|
+
// collections, whose codes a test holds to be the last of the list.
|
|
1217
|
+
/**
|
|
1218
|
+
* `503` from `PUT /api/apps/:id/auth-config/logo`: the cloud could not draw
|
|
1219
|
+
* the small picture of the logo that mails show, for a reason that is the
|
|
1220
|
+
* server's and not the file's. Either too many logos already wait to be
|
|
1221
|
+
* drawn on this server, or the drawing itself failed. Nothing was stored,
|
|
1222
|
+
* the logo in place stays, and retrying shortly may work. No details
|
|
1223
|
+
* payload.
|
|
1224
|
+
*
|
|
1225
|
+
* One code for both: the caller's remedy is the same, and which of the two
|
|
1226
|
+
* it was belongs in the server's log. A logo that cannot be drawn because
|
|
1227
|
+
* of what is in it is `400 validation_error`, never this. Not `busy`,
|
|
1228
|
+
* which is the command path's one-job-per-slug refusal with its
|
|
1229
|
+
* `busyDetails`; not `internal_error`, which is the `500` of a handler
|
|
1230
|
+
* that threw something unmapped.
|
|
1231
|
+
*/
|
|
1232
|
+
'logo_draw_unavailable',
|
|
1215
1233
|
// 2026-11-04 — app collections.
|
|
1216
1234
|
/**
|
|
1217
1235
|
* `409`: the record cannot be deleted, or an import cannot delete it,
|
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/dist/routes.js
CHANGED
|
@@ -1251,14 +1251,19 @@ export const ROUTES = [
|
|
|
1251
1251
|
{
|
|
1252
1252
|
method: 'PUT', path: '/api/apps/:id/auth-config/logo', section: 'apps',
|
|
1253
1253
|
summary: "Stores the logo the hosted pages show above the app's name.",
|
|
1254
|
-
audience: 'developer', auth: 'developer', rateLimited:
|
|
1254
|
+
audience: 'developer', auth: 'developer', rateLimited: true, ownerTier: false, status: 200,
|
|
1255
1255
|
params: [{ name: 'id', description: 'The app\'s uuid, as returned by `POST /api/apps` or listed by `GET /api/apps`.' }],
|
|
1256
1256
|
query: null, request: null, response: appAuthConfig,
|
|
1257
|
-
errors: [...DEVELOPER_GUARD, 'invalid_uuid', 'validation_error', 'not_found', 'unsupported_media_type'
|
|
1257
|
+
errors: [...DEVELOPER_GUARD, 'invalid_uuid', 'validation_error', 'not_found', 'unsupported_media_type', 'rate_limited', 'logo_draw_unavailable'],
|
|
1258
|
+
transport: 'http',
|
|
1258
1259
|
notes: 'The body is the **raw image**, not JSON, so it has no request schema: `Content-Type` is one of `HOSTED_LOGO_TYPES` (`image/png`, ' +
|
|
1259
1260
|
'`image/svg+xml`) and anything else is `415 unsupported_media_type`. At most `HOSTED_LOGO_MAX_BYTES` (512 KB); a larger body, or one ' +
|
|
1260
1261
|
'that is not the image its type names, is `400 validation_error`. A new logo replaces the stored one. The hosted pages load it from ' +
|
|
1261
|
-
'`hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs.'
|
|
1262
|
+
'`hosted_logo_url` as an image only, and the cloud serves an SVG sandboxed, so a script inside one never runs. \n\n**Each upload is ' +
|
|
1263
|
+
'also drawn once**, into the small picture the app\'s mails show, and a logo that cannot be drawn is `400 validation_error`. Drawing ' +
|
|
1264
|
+
'costs the server, so uploads are limited per organization: five at once, then one a minute, answering `429 rate_limited` with ' +
|
|
1265
|
+
'`retry_after_ms`. When too many logos already wait to be drawn on the server, or the drawing itself fails, the answer is ' +
|
|
1266
|
+
'`503 logo_draw_unavailable`: nothing was stored, the logo in place stays, and retrying shortly may work.',
|
|
1262
1267
|
},
|
|
1263
1268
|
{
|
|
1264
1269
|
method: 'DELETE', path: '/api/apps/:id/auth-config/logo', section: 'apps',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.5.0-next.2",
|
|
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",
|