@fleetless/contracts 15.5.0-next.1 → 15.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,8 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [15.5.0] — 2026-11-14
13
+
12
14
  ### Changed
13
15
 
14
16
  - **The default app mails carry an HTML part with the app's brand**
@@ -32,6 +34,17 @@ version.
32
34
  `app.logo_shape` (`square`, `wide` or null). Sixteen in all. A consumer
33
35
  that checks a template against the list accepts them; one that typed
34
36
  `html` as `null` reads a string.
37
+ - **The logo upload declares its 429 and 503**
38
+ (fleetless/fleetless#1155). `PUT /api/apps/:id/auth-config/logo` is
39
+ `rateLimited: true` and lists `rate_limited` and a new code,
40
+ `logo_draw_unavailable`. The cloud now draws each uploaded logo once into
41
+ the small picture the app's mails show; uploads are limited per
42
+ organization, five at once and then one a minute, answering
43
+ `429 rate_limited` with `retry_after_ms`. `logo_draw_unavailable` is `503`
44
+ when too many logos already wait to be drawn on the server or the drawing
45
+ itself fails: nothing was stored, the logo in place stays, retrying
46
+ shortly may work, and there is no details payload. A logo that cannot be
47
+ drawn because of its content stays `400 validation_error`.
35
48
 
36
49
  ## [15.4.0] — 2026-11-13
37
50
 
@@ -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",
@@ -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": false,
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",
@@ -5,7 +5,7 @@
5
5
  * The default HTML of the four app mails, as the cloud's
6
6
  * `scripts/print-app-mail-defaults.ts` prints it on cloud branch
7
7
  * `feat/1155-mails-have-no-layout`,
8
- * commit 4b88972f02775404f5fae008789a9d8fb7c3c4de.
8
+ * pull request fleetless/cloud#246.
9
9
  * Written by `scripts/write-app-mail-html.ts`, which says how to regenerate
10
10
  * it.
11
11
  *
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/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: false, ownerTier: false, status: 200,
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'], transport: 'http',
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.5.0-next.1",
3
+ "version": "15.5.0",
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",