@fleetless/contracts 13.2.0 → 14.0.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 +169 -0
- package/artifacts/openapi.json +2092 -787
- package/artifacts/routes.json +229 -230
- package/artifacts/schema/access-warning.schema.json +51 -0
- package/artifacts/schema/action-config.schema.json +35 -0
- package/artifacts/schema/app-access-response.schema.json +136 -0
- package/artifacts/schema/app-access.schema.json +80 -0
- package/artifacts/schema/app-auth-config.schema.json +15 -0
- package/artifacts/schema/app-deletion-summary.schema.json +0 -7
- package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
- package/artifacts/schema/app-invitation.schema.json +5 -5
- package/artifacts/schema/app-list-response.schema.json +6 -6
- package/artifacts/schema/app-lock.schema.json +30 -0
- package/artifacts/schema/app-user-list-response.schema.json +13 -6
- package/artifacts/schema/app-user.schema.json +13 -6
- package/artifacts/schema/app.schema.json +6 -6
- package/artifacts/schema/auth-ok.schema.json +20 -6
- package/artifacts/schema/camera-list-response.schema.json +1 -1
- package/artifacts/schema/client-identity.schema.json +21 -6
- package/artifacts/schema/cloud-config.schema.json +359 -5
- package/artifacts/schema/config-draft-response.schema.json +389 -5
- package/artifacts/schema/config-version-response.schema.json +389 -5
- package/artifacts/schema/config-versions-response.schema.json +30 -0
- package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
- package/artifacts/schema/create-app-user-request.schema.json +4 -4
- package/artifacts/schema/create-org-role-request.schema.json +33 -0
- package/artifacts/schema/dangling-reference.schema.json +129 -0
- package/artifacts/schema/datapoint-config.schema.json +35 -0
- package/artifacts/schema/datapoint-list-response.schema.json +1 -1
- package/artifacts/schema/effective-capability.schema.json +104 -0
- package/artifacts/schema/effective-rights-query.schema.json +19 -0
- package/artifacts/schema/effective-rights-response.schema.json +310 -0
- package/artifacts/schema/effective-robot-rights.schema.json +266 -0
- package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
- package/artifacts/schema/invoke-response.schema.json +1 -1
- package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
- package/artifacts/schema/journal-intent-v2.schema.json +84 -0
- package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
- package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
- package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
- package/artifacts/schema/org-role-list-response.schema.json +205 -0
- package/artifacts/schema/org-role.schema.json +59 -0
- package/artifacts/schema/patch-app-user-request.schema.json +4 -4
- package/artifacts/schema/patch-org-role-request.schema.json +38 -0
- package/artifacts/schema/publish-config-response.schema.json +48 -1
- package/artifacts/schema/publisher-config.schema.json +35 -0
- package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
- package/artifacts/schema/reference-place.schema.json +111 -0
- package/artifacts/schema/rename-slug-response.schema.json +4 -3
- package/artifacts/schema/robot-config-doc.schema.json +359 -5
- package/artifacts/schema/role-cycle-details.schema.json +18 -0
- package/artifacts/schema/role-defaults-response.schema.json +59 -0
- package/artifacts/schema/role-rename-preview.schema.json +146 -0
- package/artifacts/schema/service-config.schema.json +35 -0
- package/artifacts/schema/slug-usage-response.schema.json +4 -3
- package/artifacts/schema/update-app-request.schema.json +0 -12
- package/dist/app-users.d.ts +30 -10
- package/dist/app-users.js +32 -12
- package/dist/apps.d.ts +242 -71
- package/dist/apps.js +205 -151
- package/dist/audit.d.ts +3 -3
- package/dist/billing.d.ts +10 -10
- package/dist/client-auth.d.ts +5 -2
- package/dist/client-auth.js +11 -3
- package/dist/client-robots.d.ts +1 -1
- package/dist/client-robots.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config-issues.d.ts +1 -1
- package/dist/config-issues.js +1 -1
- package/dist/config.d.ts +77 -11
- package/dist/config.js +108 -14
- package/dist/errors.d.ts +14 -5
- package/dist/errors.js +37 -24
- package/dist/index.d.ts +22 -12
- package/dist/index.js +16 -6
- package/dist/journal-intents.d.ts +30 -0
- package/dist/journal-intents.js +3 -0
- package/dist/legal-acceptances.d.ts +2 -2
- package/dist/mcp.d.ts +5 -37
- package/dist/mcp.js +4 -14
- package/dist/org-roles.d.ts +182 -0
- package/dist/org-roles.js +198 -0
- package/dist/plans.d.ts +6 -6
- package/dist/protocol.d.ts +19 -1
- package/dist/realtime.d.ts +6 -3
- package/dist/realtime.js +1 -1
- package/dist/rest.d.ts +104 -25
- package/dist/rest.js +67 -29
- package/dist/rights.d.ts +197 -0
- package/dist/rights.js +396 -0
- package/dist/routes.js +190 -148
- package/package.json +1 -1
- package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
- package/artifacts/schema/role-delete-query.schema.json +0 -13
- package/artifacts/schema/role-in-use-details.schema.json +0 -28
- package/artifacts/schema/role-list-response.schema.json +0 -48
- package/artifacts/schema/role-permissions.schema.json +0 -61
- package/artifacts/schema/role-rename-request.schema.json +0 -16
- package/artifacts/schema/role.schema.json +0 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.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",
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"role_id": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"format": "uuid",
|
|
8
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
9
|
-
},
|
|
10
|
-
"robots": {
|
|
11
|
-
"maxItems": 500,
|
|
12
|
-
"type": "array",
|
|
13
|
-
"items": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"robot_id": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"format": "uuid",
|
|
19
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
20
|
-
},
|
|
21
|
-
"robot_name": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"minLength": 1,
|
|
24
|
-
"maxLength": 200
|
|
25
|
-
},
|
|
26
|
-
"capabilities": {
|
|
27
|
-
"type": "object",
|
|
28
|
-
"properties": {
|
|
29
|
-
"action_history": {
|
|
30
|
-
"type": "boolean"
|
|
31
|
-
},
|
|
32
|
-
"assets": {
|
|
33
|
-
"type": "boolean"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"required": [
|
|
37
|
-
"action_history",
|
|
38
|
-
"assets"
|
|
39
|
-
],
|
|
40
|
-
"additionalProperties": false
|
|
41
|
-
},
|
|
42
|
-
"exposures": {
|
|
43
|
-
"maxItems": 2000,
|
|
44
|
-
"type": "array",
|
|
45
|
-
"items": {
|
|
46
|
-
"type": "object",
|
|
47
|
-
"properties": {
|
|
48
|
-
"slug": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"minLength": 2,
|
|
51
|
-
"maxLength": 63,
|
|
52
|
-
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
53
|
-
},
|
|
54
|
-
"kind": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"enum": [
|
|
57
|
-
"datapoint",
|
|
58
|
-
"service",
|
|
59
|
-
"action",
|
|
60
|
-
"publisher",
|
|
61
|
-
"camera"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"description": {
|
|
65
|
-
"anyOf": [
|
|
66
|
-
{
|
|
67
|
-
"type": "string",
|
|
68
|
-
"maxLength": 2000
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"type": "null"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"unit": {
|
|
76
|
-
"anyOf": [
|
|
77
|
-
{
|
|
78
|
-
"type": "string",
|
|
79
|
-
"maxLength": 32
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "null"
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
"decimals": {
|
|
87
|
-
"anyOf": [
|
|
88
|
-
{
|
|
89
|
-
"type": "integer",
|
|
90
|
-
"minimum": 0,
|
|
91
|
-
"maximum": 6
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"type": "null"
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
"input_schema": {
|
|
99
|
-
"anyOf": [
|
|
100
|
-
{},
|
|
101
|
-
{
|
|
102
|
-
"type": "null"
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"required": [
|
|
108
|
-
"slug",
|
|
109
|
-
"kind",
|
|
110
|
-
"description",
|
|
111
|
-
"unit",
|
|
112
|
-
"decimals",
|
|
113
|
-
"input_schema"
|
|
114
|
-
],
|
|
115
|
-
"additionalProperties": false
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"required": [
|
|
120
|
-
"robot_id",
|
|
121
|
-
"robot_name",
|
|
122
|
-
"capabilities",
|
|
123
|
-
"exposures"
|
|
124
|
-
],
|
|
125
|
-
"additionalProperties": false
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"required": [
|
|
130
|
-
"role_id",
|
|
131
|
-
"robots"
|
|
132
|
-
],
|
|
133
|
-
"additionalProperties": false
|
|
134
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"move_to": {
|
|
6
|
-
"description": "Another role of the same app that takes over the deleted role's app users, pending invitations and, when it applies, the app's default. The role itself or a role of another app answers `400 validation_error`.",
|
|
7
|
-
"type": "string",
|
|
8
|
-
"format": "uuid",
|
|
9
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"additionalProperties": false
|
|
13
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"users": {
|
|
6
|
-
"type": "integer",
|
|
7
|
-
"minimum": 0,
|
|
8
|
-
"maximum": 9007199254740991,
|
|
9
|
-
"description": "App users whose role this is."
|
|
10
|
-
},
|
|
11
|
-
"invitations": {
|
|
12
|
-
"type": "integer",
|
|
13
|
-
"minimum": 0,
|
|
14
|
-
"maximum": 9007199254740991,
|
|
15
|
-
"description": "Pending invitations that would grant this role when accepted."
|
|
16
|
-
},
|
|
17
|
-
"is_default": {
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"description": "`true` when this is the app's `default_role_id`; the default then moves with the users to `move_to`."
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"required": [
|
|
23
|
-
"users",
|
|
24
|
-
"invitations",
|
|
25
|
-
"is_default"
|
|
26
|
-
],
|
|
27
|
-
"additionalProperties": false
|
|
28
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"roles": {
|
|
6
|
-
"type": "array",
|
|
7
|
-
"items": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"format": "uuid",
|
|
13
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
14
|
-
"description": "The role, and what an app user's `role_id` and an app's `default_role_id` refer to."
|
|
15
|
-
},
|
|
16
|
-
"app_id": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"format": "uuid",
|
|
19
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
20
|
-
"description": "The app this role belongs to. Roles are never shared between apps, so a role id from another app reads as `not_found`."
|
|
21
|
-
},
|
|
22
|
-
"name": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"minLength": 1,
|
|
25
|
-
"maxLength": 60,
|
|
26
|
-
"description": "The role's name, shown wherever a user's access is chosen. The two roles every app starts with are named `observe` and `operate`."
|
|
27
|
-
},
|
|
28
|
-
"builtin": {
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"description": "`true` for the two roles every app starts with. Their **rights may be re-scoped** exactly like a custom role's, through `PUT /api/apps/:id/roles/:roleId/permissions` — the flag exists so the console can explain where they came from, not to protect them. Built-in roles can be renamed and deleted like any other; the flag only records that the cloud seeded them."
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"required": [
|
|
34
|
-
"id",
|
|
35
|
-
"app_id",
|
|
36
|
-
"name",
|
|
37
|
-
"builtin"
|
|
38
|
-
],
|
|
39
|
-
"additionalProperties": false
|
|
40
|
-
},
|
|
41
|
-
"description": "The app's roles, built-in and custom alike, ordered by `created_at` and then by `name`. The tie-break is not cosmetic — the two built-in roles are inserted in one statement and share a creation time to the microsecond, so never read a role by position."
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"required": [
|
|
45
|
-
"roles"
|
|
46
|
-
],
|
|
47
|
-
"additionalProperties": false
|
|
48
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"role_id": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"format": "uuid",
|
|
8
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
9
|
-
},
|
|
10
|
-
"grants": {
|
|
11
|
-
"type": "array",
|
|
12
|
-
"items": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"properties": {
|
|
15
|
-
"robot_id": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"format": "uuid",
|
|
18
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
19
|
-
},
|
|
20
|
-
"slugs": {
|
|
21
|
-
"type": "array",
|
|
22
|
-
"items": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"minLength": 2,
|
|
25
|
-
"maxLength": 63,
|
|
26
|
-
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"required": [
|
|
31
|
-
"robot_id",
|
|
32
|
-
"slugs"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"capabilities": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"properties": {
|
|
39
|
-
"action_history": {
|
|
40
|
-
"type": "boolean"
|
|
41
|
-
},
|
|
42
|
-
"presence": {
|
|
43
|
-
"type": "boolean"
|
|
44
|
-
},
|
|
45
|
-
"assets": {
|
|
46
|
-
"type": "boolean"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"required": [
|
|
50
|
-
"action_history",
|
|
51
|
-
"presence",
|
|
52
|
-
"assets"
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"required": [
|
|
57
|
-
"role_id",
|
|
58
|
-
"grants",
|
|
59
|
-
"capabilities"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"name": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"minLength": 1,
|
|
8
|
-
"maxLength": 60,
|
|
9
|
-
"description": "The new name, trimmed, 1 to 60 characters. Unique per app: another role of this app with the same name answers `409 role_name_taken`. The role's users keep it under its new name."
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"required": [
|
|
13
|
-
"name"
|
|
14
|
-
],
|
|
15
|
-
"additionalProperties": false
|
|
16
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"id": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"format": "uuid",
|
|
8
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
9
|
-
"description": "The role, and what an app user's `role_id` and an app's `default_role_id` refer to."
|
|
10
|
-
},
|
|
11
|
-
"app_id": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"format": "uuid",
|
|
14
|
-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
15
|
-
"description": "The app this role belongs to. Roles are never shared between apps, so a role id from another app reads as `not_found`."
|
|
16
|
-
},
|
|
17
|
-
"name": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"minLength": 1,
|
|
20
|
-
"maxLength": 60,
|
|
21
|
-
"description": "The role's name, shown wherever a user's access is chosen. The two roles every app starts with are named `observe` and `operate`."
|
|
22
|
-
},
|
|
23
|
-
"builtin": {
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"description": "`true` for the two roles every app starts with. Their **rights may be re-scoped** exactly like a custom role's, through `PUT /api/apps/:id/roles/:roleId/permissions` — the flag exists so the console can explain where they came from, not to protect them. Built-in roles can be renamed and deleted like any other; the flag only records that the cloud seeded them."
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"required": [
|
|
29
|
-
"id",
|
|
30
|
-
"app_id",
|
|
31
|
-
"name",
|
|
32
|
-
"builtin"
|
|
33
|
-
],
|
|
34
|
-
"additionalProperties": false
|
|
35
|
-
}
|