@fleetless/contracts 6.3.0-next.4 → 6.3.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 +11 -0
- package/artifacts/openapi.json +3 -3
- package/artifacts/routes.json +3 -2
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +8 -0
- package/dist/rest.d.ts +8 -7
- package/dist/rest.js +8 -7
- package/dist/routes.js +8 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,8 @@ version.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [6.3.0] — 2026-10-05
|
|
13
|
+
|
|
12
14
|
### Added
|
|
13
15
|
|
|
14
16
|
- **Billing.** `src/billing.ts`: `EU_COUNTRIES`, `countryCode`,
|
|
@@ -54,6 +56,11 @@ version.
|
|
|
54
56
|
answered with an error; nothing was charged. `details` is
|
|
55
57
|
`paymentProviderUnavailableDetails` (`provider`, Mollie's HTTP `status`
|
|
56
58
|
or `null` for a timeout). Retrying may work.
|
|
59
|
+
- **`history_migrating`** (`409`): a slug rename refused while the robot's
|
|
60
|
+
recorded history is being migrated to a new storage layout. Temporary;
|
|
61
|
+
nothing is written, and the same request succeeds once the migration has
|
|
62
|
+
finished. Listed on `POST /api/robots/:id/config/rename-slug`. A consumer
|
|
63
|
+
that switches exhaustively over `ErrorCode` gains one case.
|
|
57
64
|
|
|
58
65
|
### Changed
|
|
59
66
|
|
|
@@ -63,6 +70,10 @@ version.
|
|
|
63
70
|
- The notes of **`PUT /api/org/plan/change`** and the admin route no longer
|
|
64
71
|
say payment is missing; an upgrade of a billed org goes through the
|
|
65
72
|
billing routes.
|
|
73
|
+
- `POST /api/robots/:id/config/rename-slug`: the summary and notes, and the
|
|
74
|
+
`renameSlugRequest` doc comment, now say the history moves with the name
|
|
75
|
+
without rewriting stored samples, and that samples sent under the old slug
|
|
76
|
+
before the publish join the renamed history. No wire shape changed.
|
|
66
77
|
|
|
67
78
|
## [6.2.0] — 2026-10-04
|
|
68
79
|
|
package/artifacts/openapi.json
CHANGED
|
@@ -7101,7 +7101,7 @@
|
|
|
7101
7101
|
"/api/robots/{id}/config/rename-slug": {
|
|
7102
7102
|
"post": {
|
|
7103
7103
|
"operationId": "post_api_robots_id_config_rename_slug",
|
|
7104
|
-
"summary": "Renames a slug in the draft and
|
|
7104
|
+
"summary": "Renames a slug in the draft and moves every role grant and the recorded history with the name.",
|
|
7105
7105
|
"tags": [
|
|
7106
7106
|
"config"
|
|
7107
7107
|
],
|
|
@@ -7133,7 +7133,7 @@
|
|
|
7133
7133
|
}
|
|
7134
7134
|
},
|
|
7135
7135
|
"default": {
|
|
7136
|
-
"description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `invalid_uuid`, `not_found`, `validation_error`, `draft_not_a_document`, `unknown_slug`, `reserved_slug`, `duplicate_slug`, `internal_error`.",
|
|
7136
|
+
"description": "An error envelope. Codes this route is known to answer: `unauthorized`, `token_expired`, `token_revoked`, `invalid_uuid`, `not_found`, `validation_error`, `draft_not_a_document`, `unknown_slug`, `reserved_slug`, `duplicate_slug`, `history_migrating`, `internal_error`.",
|
|
7137
7137
|
"content": {
|
|
7138
7138
|
"application/json": {
|
|
7139
7139
|
"schema": {
|
|
@@ -7143,7 +7143,7 @@
|
|
|
7143
7143
|
}
|
|
7144
7144
|
}
|
|
7145
7145
|
},
|
|
7146
|
-
"description": "One transaction
|
|
7146
|
+
"description": "One transaction: the draft document and every app-role grant carrying the slug are rewritten, and the recorded history moves with the name without rewriting any stored sample, so a rename takes the same time however much history there is. Samples the robot still sends under the old slug until the next publish join the renamed history. The published configuration is immutable, so `requires_publish` says the rename is not live on the robot yet. A draft that is not a document is `409 draft_not_a_document` — the same word the usage preview uses for the same state. While the recorded history is being migrated the rename is refused with `409 history_migrating`; nothing is written, and the same request succeeds once the migration has finished.",
|
|
7147
7147
|
"requestBody": {
|
|
7148
7148
|
"required": true,
|
|
7149
7149
|
"content": {
|
package/artifacts/routes.json
CHANGED
|
@@ -5267,7 +5267,7 @@
|
|
|
5267
5267
|
"method": "POST",
|
|
5268
5268
|
"path": "/api/robots/:id/config/rename-slug",
|
|
5269
5269
|
"section": "config",
|
|
5270
|
-
"summary": "Renames a slug in the draft and
|
|
5270
|
+
"summary": "Renames a slug in the draft and moves every role grant and the recorded history with the name.",
|
|
5271
5271
|
"audience": "developer",
|
|
5272
5272
|
"auth": "developer",
|
|
5273
5273
|
"rateLimited": false,
|
|
@@ -5293,10 +5293,11 @@
|
|
|
5293
5293
|
"unknown_slug",
|
|
5294
5294
|
"reserved_slug",
|
|
5295
5295
|
"duplicate_slug",
|
|
5296
|
+
"history_migrating",
|
|
5296
5297
|
"internal_error"
|
|
5297
5298
|
],
|
|
5298
5299
|
"transport": "http",
|
|
5299
|
-
"notes": "One transaction
|
|
5300
|
+
"notes": "One transaction: the draft document and every app-role grant carrying the slug are rewritten, and the recorded history moves with the name without rewriting any stored sample, so a rename takes the same time however much history there is. Samples the robot still sends under the old slug until the next publish join the renamed history. The published configuration is immutable, so `requires_publish` says the rename is not live on the robot yet. A draft that is not a document is `409 draft_not_a_document` — the same word the usage preview uses for the same state. While the recorded history is being migrated the rename is refused with `409 history_migrating`; nothing is written, and the same request succeeds once the migration has finished."
|
|
5300
5301
|
},
|
|
5301
5302
|
{
|
|
5302
5303
|
"method": "GET",
|
package/dist/errors.d.ts
CHANGED
|
@@ -242,5 +242,5 @@ export type PaymentProviderUnavailableDetails = z.infer<typeof paymentProviderUn
|
|
|
242
242
|
* list is the shared vocabulary, not a closed set, so a new refusal never
|
|
243
243
|
* needs a contracts release before it can be reported honestly.
|
|
244
244
|
*/
|
|
245
|
-
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", "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_name_taken", "role_in_use", "last_role", "target_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", "payment_provider_unavailable"];
|
|
245
|
+
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", "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_name_taken", "role_in_use", "last_role", "target_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", "payment_provider_unavailable", "history_migrating"];
|
|
246
246
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
package/dist/errors.js
CHANGED
|
@@ -1061,4 +1061,12 @@ export const ERROR_CODES = [
|
|
|
1061
1061
|
* Retrying may work.
|
|
1062
1062
|
*/
|
|
1063
1063
|
'payment_provider_unavailable',
|
|
1064
|
+
// 2026-10-05 — the datapoint series key (#185).
|
|
1065
|
+
/**
|
|
1066
|
+
* `409`: a slug rename was refused because the robot's recorded history is
|
|
1067
|
+
* being migrated to a new storage layout. The refusal is temporary and
|
|
1068
|
+
* nothing was written: the same request succeeds once the migration has
|
|
1069
|
+
* finished. Retry later; nothing in the request needs to change.
|
|
1070
|
+
*/
|
|
1071
|
+
'history_migrating',
|
|
1064
1072
|
];
|
package/dist/rest.d.ts
CHANGED
|
@@ -2006,13 +2006,14 @@ export declare const patchRobotRequest: z.ZodObject<{
|
|
|
2006
2006
|
export type PatchRobotRequest = z.infer<typeof patchRobotRequest>;
|
|
2007
2007
|
/**
|
|
2008
2008
|
* `POST /api/robots/:id/config/rename-slug` — atomic server-side rename:
|
|
2009
|
-
* rewrites the **draft** config
|
|
2010
|
-
* `{robot_id, from}`, and the recorded history
|
|
2011
|
-
* Job runs and audit events
|
|
2012
|
-
*
|
|
2013
|
-
* (`requires_publish`); samples
|
|
2014
|
-
*
|
|
2015
|
-
*
|
|
2009
|
+
* rewrites the **draft** config and every app-role grant carrying
|
|
2010
|
+
* `{robot_id, from}`, and moves the recorded history with the name, in one
|
|
2011
|
+
* transaction, without rewriting stored samples. Job runs and audit events
|
|
2012
|
+
* keep the old slug as historical fact. The published config is immutable,
|
|
2013
|
+
* so the caller must publish afterwards (`requires_publish`); samples the
|
|
2014
|
+
* robot sends under the old slug between the rename and the publish join the
|
|
2015
|
+
* renamed history.
|
|
2016
|
+
* One residual remains in that same window: grants and the draft already name
|
|
2016
2017
|
* `to`, but the still-published config exposes only `from` until the
|
|
2017
2018
|
* publish lands — an end user's app has no working name for the datapoint
|
|
2018
2019
|
* at all for however long that gap lasts, since `to` isn't published yet
|
package/dist/rest.js
CHANGED
|
@@ -1852,13 +1852,14 @@ export const orgUsageResponse = z.object({
|
|
|
1852
1852
|
export const patchRobotRequest = z.object({ name: z.string().min(1).max(63) }).strict();
|
|
1853
1853
|
/**
|
|
1854
1854
|
* `POST /api/robots/:id/config/rename-slug` — atomic server-side rename:
|
|
1855
|
-
* rewrites the **draft** config
|
|
1856
|
-
* `{robot_id, from}`, and the recorded history
|
|
1857
|
-
* Job runs and audit events
|
|
1858
|
-
*
|
|
1859
|
-
* (`requires_publish`); samples
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1855
|
+
* rewrites the **draft** config and every app-role grant carrying
|
|
1856
|
+
* `{robot_id, from}`, and moves the recorded history with the name, in one
|
|
1857
|
+
* transaction, without rewriting stored samples. Job runs and audit events
|
|
1858
|
+
* keep the old slug as historical fact. The published config is immutable,
|
|
1859
|
+
* so the caller must publish afterwards (`requires_publish`); samples the
|
|
1860
|
+
* robot sends under the old slug between the rename and the publish join the
|
|
1861
|
+
* renamed history.
|
|
1862
|
+
* One residual remains in that same window: grants and the draft already name
|
|
1862
1863
|
* `to`, but the still-published config exposes only `from` until the
|
|
1863
1864
|
* publish lands — an end user's app has no working name for the datapoint
|
|
1864
1865
|
* at all for however long that gap lasts, since `to` isn't published yet
|
package/dist/routes.js
CHANGED
|
@@ -2324,17 +2324,20 @@ export const ROUTES = [
|
|
|
2324
2324
|
},
|
|
2325
2325
|
{
|
|
2326
2326
|
method: 'POST', path: '/api/robots/:id/config/rename-slug', section: 'config',
|
|
2327
|
-
summary: 'Renames a slug in the draft and
|
|
2327
|
+
summary: 'Renames a slug in the draft and moves every role grant and the recorded history with the name.',
|
|
2328
2328
|
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: false, status: 200,
|
|
2329
2329
|
params: [{ name: 'id', description: 'The robot\'s uuid, as returned by `POST /api/robots` or listed by `GET /api/robots`.' }],
|
|
2330
2330
|
query: null, request: renameSlugRequest, response: renameSlugResponse,
|
|
2331
2331
|
errors: [
|
|
2332
2332
|
...DEVELOPER_GUARD, 'invalid_uuid', 'not_found', 'validation_error', 'draft_not_a_document',
|
|
2333
|
-
'unknown_slug', 'reserved_slug', 'duplicate_slug', 'internal_error',
|
|
2333
|
+
'unknown_slug', 'reserved_slug', 'duplicate_slug', 'history_migrating', 'internal_error',
|
|
2334
2334
|
], transport: 'http',
|
|
2335
|
-
notes: 'One transaction
|
|
2336
|
-
'
|
|
2337
|
-
'
|
|
2335
|
+
notes: 'One transaction: the draft document and every app-role grant carrying the slug are rewritten, and the recorded history moves with ' +
|
|
2336
|
+
'the name without rewriting any stored sample, so a rename takes the same time however much history there is. Samples the robot ' +
|
|
2337
|
+
'still sends under the old slug until the next publish join the renamed history. The published configuration is immutable, so ' +
|
|
2338
|
+
'`requires_publish` says the rename is not live on the robot yet. A draft that is not a document is `409 draft_not_a_document` — the ' +
|
|
2339
|
+
'same word the usage preview uses for the same state. While the recorded history is being migrated the rename is refused with ' +
|
|
2340
|
+
'`409 history_migrating`; nothing is written, and the same request succeeds once the migration has finished.',
|
|
2338
2341
|
},
|
|
2339
2342
|
{
|
|
2340
2343
|
method: 'GET', path: '/api/robots/:id/config/slug-usage/:slug', section: 'config',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "6.3.0
|
|
3
|
+
"version": "6.3.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",
|