@fleetless/contracts 13.3.0 → 15.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 +304 -0
- package/artifacts/openapi.json +20156 -10513
- package/artifacts/routes.json +1429 -292
- package/artifacts/schema/access-warning.schema.json +51 -0
- package/artifacts/schema/action-config.schema.json +35 -0
- package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
- package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
- package/artifacts/schema/app-access-response.schema.json +136 -0
- package/artifacts/schema/app-access.schema.json +80 -0
- package/artifacts/schema/app-deletion-summary.schema.json +15 -8
- 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/asset-plan-limit-details.schema.json +3 -1
- 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/collection-actor.schema.json +35 -0
- package/artifacts/schema/collection-definitions-response.schema.json +612 -0
- package/artifacts/schema/collection-event.schema.json +216 -0
- package/artifacts/schema/collection-export-query.schema.json +56 -0
- package/artifacts/schema/collection-filter.schema.json +9 -0
- package/artifacts/schema/collection-import-preview.schema.json +143 -0
- package/artifacts/schema/collection-import-request.schema.json +105 -0
- package/artifacts/schema/collection-import-result.schema.json +38 -0
- package/artifacts/schema/collection-list-response.schema.json +119 -0
- package/artifacts/schema/collection-record-get-query.schema.json +12 -0
- package/artifacts/schema/collection-record-history-query.schema.json +35 -0
- package/artifacts/schema/collection-record-history-response.schema.json +389 -0
- package/artifacts/schema/collection-record-list-query.schema.json +67 -0
- package/artifacts/schema/collection-record-list-response.schema.json +212 -0
- package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
- package/artifacts/schema/collection-record-write.schema.json +31 -0
- package/artifacts/schema/collection-record.schema.json +180 -0
- package/artifacts/schema/collection-revision.schema.json +295 -0
- package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
- package/artifacts/schema/collection-subscribe.schema.json +48 -0
- package/artifacts/schema/collection-subscribed.schema.json +22 -0
- package/artifacts/schema/collection-summary.schema.json +92 -0
- package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
- package/artifacts/schema/collections-access-change.schema.json +34 -0
- package/artifacts/schema/collections-document.schema.json +732 -0
- package/artifacts/schema/collections-draft-response.schema.json +845 -0
- package/artifacts/schema/collections-effect.schema.json +384 -0
- package/artifacts/schema/collections-issue.schema.json +36 -0
- package/artifacts/schema/collections-publish-request.schema.json +18 -0
- package/artifacts/schema/collections-publish-response.schema.json +450 -0
- package/artifacts/schema/collections-purge-preview.schema.json +60 -0
- package/artifacts/schema/collections-purge-request.schema.json +27 -0
- package/artifacts/schema/collections-purge-response.schema.json +30 -0
- package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
- package/artifacts/schema/collections-restore-preview.schema.json +581 -0
- package/artifacts/schema/collections-restore-request.schema.json +27 -0
- package/artifacts/schema/collections-restore-response.schema.json +455 -0
- package/artifacts/schema/collections-schema-preview.schema.json +519 -0
- package/artifacts/schema/collections-schema-published.schema.json +22 -0
- package/artifacts/schema/collections-version-response.schema.json +869 -0
- package/artifacts/schema/collections-version-summary.schema.json +139 -0
- package/artifacts/schema/collections-versions-response.schema.json +167 -0
- package/artifacts/schema/config-draft-response.schema.json +359 -5
- package/artifacts/schema/config-version-response.schema.json +359 -5
- package/artifacts/schema/confirmation-required-details.schema.json +13 -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 +130 -0
- package/artifacts/schema/datapoint-config.schema.json +35 -0
- package/artifacts/schema/datapoint-list-response.schema.json +2 -2
- 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 +396 -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-plan.schema.json +29 -1
- package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
- package/artifacts/schema/org-quota-usage.schema.json +47 -1
- package/artifacts/schema/org-quotas.schema.json +29 -1
- package/artifacts/schema/org-role-list-response.schema.json +206 -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/plan-catalogue-entry.schema.json +29 -1
- package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
- package/artifacts/schema/plan-limit-details.schema.json +3 -1
- package/artifacts/schema/plan-limits.schema.json +29 -1
- package/artifacts/schema/plan-overrides.schema.json +26 -0
- package/artifacts/schema/publish-config-response.schema.json +48 -1
- package/artifacts/schema/publisher-config.schema.json +35 -0
- package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
- package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
- package/artifacts/schema/record-changed-details.schema.json +16 -0
- package/artifacts/schema/record-referenced-details.schema.json +35 -0
- package/artifacts/schema/reference-invalid-details.schema.json +25 -0
- package/artifacts/schema/reference-place.schema.json +112 -0
- package/artifacts/schema/rename-slug-response.schema.json +4 -3
- package/artifacts/schema/required-missing-details.schema.json +19 -0
- package/artifacts/schema/robot-config-doc.schema.json +359 -5
- package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
- package/artifacts/schema/role-collection-rights.schema.json +82 -0
- 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 +147 -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 +11 -8
- package/dist/app-users.js +18 -10
- package/dist/apps.d.ts +258 -71
- package/dist/apps.js +215 -151
- package/dist/audit.d.ts +35 -5
- package/dist/audit.js +40 -2
- 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/collections-issues.d.ts +67 -0
- package/dist/collections-issues.js +340 -0
- package/dist/collections-records.d.ts +562 -0
- package/dist/collections-records.js +525 -0
- package/dist/collections-rights.d.ts +17 -0
- package/dist/collections-rights.js +41 -0
- package/dist/collections-schema.d.ts +1064 -0
- package/dist/collections-schema.js +386 -0
- package/dist/collections-templates.d.ts +55 -0
- package/dist/collections-templates.js +137 -0
- package/dist/collections-transfer.d.ts +101 -0
- package/dist/collections-transfer.js +206 -0
- package/dist/collections-values.d.ts +67 -0
- package/dist/collections-values.js +284 -0
- package/dist/collections.d.ts +568 -0
- package/dist/collections.js +332 -0
- 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 +78 -12
- package/dist/config.js +109 -15
- package/dist/errors.d.ts +63 -5
- package/dist/errors.js +152 -24
- package/dist/index.d.ts +40 -14
- package/dist/index.js +27 -7
- 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 +186 -0
- package/dist/org-roles.js +199 -0
- package/dist/plans.d.ts +25 -7
- package/dist/plans.js +21 -1
- package/dist/protocol.d.ts +19 -1
- package/dist/realtime.d.ts +172 -3
- package/dist/realtime.js +164 -1
- package/dist/rest.d.ts +104 -53
- package/dist/rest.js +79 -55
- package/dist/rights.d.ts +197 -0
- package/dist/rights.js +396 -0
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +675 -150
- package/package.json +1 -1
- package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
- package/artifacts/schema/put-robot-details-request.schema.json +0 -41
- package/artifacts/schema/put-robot-details-response.schema.json +0 -43
- package/artifacts/schema/robot-details-doc.schema.json +0 -33
- 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
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"role": {
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "null"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"description": "The role key the answer is for: the one asked about, or the app user's own. `null` when the app user holds none."
|
|
15
|
+
},
|
|
16
|
+
"role_known": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "Whether the key names a role of the organization. `false` means every capability below is not granted."
|
|
19
|
+
},
|
|
20
|
+
"user_id": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "uuid",
|
|
25
|
+
"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)$"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "null"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"description": "The app user asked about; `null` when a role was asked about. A user who is not `active` reaches nothing, whatever role they hold: every capability below is not granted."
|
|
32
|
+
},
|
|
33
|
+
"robots": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"robot_id": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "uuid",
|
|
41
|
+
"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)$",
|
|
42
|
+
"description": "The robot, one that is attached to the app."
|
|
43
|
+
},
|
|
44
|
+
"robot_name": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"maxLength": 200,
|
|
48
|
+
"description": "The robot's name."
|
|
49
|
+
},
|
|
50
|
+
"published_version": {
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"exclusiveMinimum": 0,
|
|
55
|
+
"maximum": 9007199254740991
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "null"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"description": "The version of the robot's published `fleetless.yaml` that the answer was computed from; `null` when nothing is published."
|
|
62
|
+
},
|
|
63
|
+
"reachable": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"description": "Whether a session of this role reaches the robot at all: at least one slug or one capability is granted once the locks are applied. When `false`, `robots.describe` answers `not_found` for the robot and `robots.list` leaves it out; `capabilities` says why, and `datasheet` is the empty one."
|
|
66
|
+
},
|
|
67
|
+
"capabilities": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"name": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 2,
|
|
75
|
+
"maxLength": 63,
|
|
76
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$",
|
|
77
|
+
"description": "The exposure's slug, or `assets` or `job_history` for the capabilities that belong to the robot as a whole."
|
|
78
|
+
},
|
|
79
|
+
"kind": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"enum": [
|
|
82
|
+
"read",
|
|
83
|
+
"invoke",
|
|
84
|
+
"publish",
|
|
85
|
+
"assets",
|
|
86
|
+
"job_history"
|
|
87
|
+
],
|
|
88
|
+
"description": "The kind of access the capability needs."
|
|
89
|
+
},
|
|
90
|
+
"granted": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Whether the role may use it: its requirement is met and the app has not locked it."
|
|
93
|
+
},
|
|
94
|
+
"requirement": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"description": "The role keys that qualify, from the entry, the rule or the default that decided. Holding one of them, or inheriting from one, is enough. Empty when nobody qualifies."
|
|
100
|
+
},
|
|
101
|
+
"source": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"enum": [
|
|
104
|
+
"entry",
|
|
105
|
+
"rule",
|
|
106
|
+
"robot",
|
|
107
|
+
"org_default"
|
|
108
|
+
],
|
|
109
|
+
"description": "Where the requirement came from: `entry` is the entry's own `role`, `rule` the first matching rule of `access.rules`, `robot` the robot's `access.assets` or `access.job_history`, and `org_default` the organization's default for the kind."
|
|
110
|
+
},
|
|
111
|
+
"rule_index": {
|
|
112
|
+
"anyOf": [
|
|
113
|
+
{
|
|
114
|
+
"type": "integer",
|
|
115
|
+
"minimum": 0,
|
|
116
|
+
"maximum": 9007199254740991
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "null"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"description": "For `rule`, the position of the deciding rule in `access.rules`, counted from zero; `null` otherwise."
|
|
123
|
+
},
|
|
124
|
+
"rule_match": {
|
|
125
|
+
"anyOf": [
|
|
126
|
+
{
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "null"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"description": "For `rule`, that rule's `match` glob; `null` otherwise."
|
|
134
|
+
},
|
|
135
|
+
"satisfied_by": {
|
|
136
|
+
"anyOf": [
|
|
137
|
+
{
|
|
138
|
+
"type": "string"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "null"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"description": "The key from `requirement` that the role holds through inheritance. `null` when the role is named in the requirement itself, and when it does not meet the requirement at all. Independent of locks."
|
|
145
|
+
},
|
|
146
|
+
"locked": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"description": "Whether the app locks this capability, as a kind or as a single lock. A lock wins over the requirement."
|
|
149
|
+
},
|
|
150
|
+
"unknown_roles": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": {
|
|
153
|
+
"type": "string"
|
|
154
|
+
},
|
|
155
|
+
"description": "Keys in the requirement that name no role of the organization. They grant nothing."
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": [
|
|
159
|
+
"name",
|
|
160
|
+
"kind",
|
|
161
|
+
"granted",
|
|
162
|
+
"requirement",
|
|
163
|
+
"source",
|
|
164
|
+
"rule_index",
|
|
165
|
+
"rule_match",
|
|
166
|
+
"satisfied_by",
|
|
167
|
+
"locked",
|
|
168
|
+
"unknown_roles"
|
|
169
|
+
],
|
|
170
|
+
"additionalProperties": false
|
|
171
|
+
},
|
|
172
|
+
"description": "Every capability of the published configuration, and `assets` and `job_history`, each granted or not."
|
|
173
|
+
},
|
|
174
|
+
"datasheet": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"properties": {
|
|
177
|
+
"robot_id": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"format": "uuid",
|
|
180
|
+
"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)$"
|
|
181
|
+
},
|
|
182
|
+
"robot_name": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 1,
|
|
185
|
+
"maxLength": 200
|
|
186
|
+
},
|
|
187
|
+
"capabilities": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"properties": {
|
|
190
|
+
"job_history": {
|
|
191
|
+
"type": "boolean"
|
|
192
|
+
},
|
|
193
|
+
"assets": {
|
|
194
|
+
"type": "boolean"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"required": [
|
|
198
|
+
"job_history",
|
|
199
|
+
"assets"
|
|
200
|
+
],
|
|
201
|
+
"additionalProperties": false
|
|
202
|
+
},
|
|
203
|
+
"exposures": {
|
|
204
|
+
"maxItems": 2000,
|
|
205
|
+
"type": "array",
|
|
206
|
+
"items": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"properties": {
|
|
209
|
+
"slug": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"minLength": 2,
|
|
212
|
+
"maxLength": 63,
|
|
213
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
214
|
+
},
|
|
215
|
+
"kind": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"enum": [
|
|
218
|
+
"datapoint",
|
|
219
|
+
"service",
|
|
220
|
+
"action",
|
|
221
|
+
"publisher",
|
|
222
|
+
"camera"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
"description": {
|
|
226
|
+
"anyOf": [
|
|
227
|
+
{
|
|
228
|
+
"type": "string",
|
|
229
|
+
"maxLength": 2000
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"type": "null"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"unit": {
|
|
237
|
+
"anyOf": [
|
|
238
|
+
{
|
|
239
|
+
"type": "string",
|
|
240
|
+
"maxLength": 32
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "null"
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"decimals": {
|
|
248
|
+
"anyOf": [
|
|
249
|
+
{
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"minimum": 0,
|
|
252
|
+
"maximum": 6
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"type": "null"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"input_schema": {
|
|
260
|
+
"anyOf": [
|
|
261
|
+
{},
|
|
262
|
+
{
|
|
263
|
+
"type": "null"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": [
|
|
269
|
+
"slug",
|
|
270
|
+
"kind",
|
|
271
|
+
"description",
|
|
272
|
+
"unit",
|
|
273
|
+
"decimals",
|
|
274
|
+
"input_schema"
|
|
275
|
+
],
|
|
276
|
+
"additionalProperties": false
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"required": [
|
|
281
|
+
"robot_id",
|
|
282
|
+
"robot_name",
|
|
283
|
+
"capabilities",
|
|
284
|
+
"exposures"
|
|
285
|
+
],
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"description": "The datasheet an MCP session of this role would get for the robot."
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"required": [
|
|
291
|
+
"robot_id",
|
|
292
|
+
"robot_name",
|
|
293
|
+
"published_version",
|
|
294
|
+
"reachable",
|
|
295
|
+
"capabilities",
|
|
296
|
+
"datasheet"
|
|
297
|
+
],
|
|
298
|
+
"additionalProperties": false
|
|
299
|
+
},
|
|
300
|
+
"description": "The robots attached to the app, each with what the role may use."
|
|
301
|
+
},
|
|
302
|
+
"collections": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"items": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"collection": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
310
|
+
"description": "The collection's key."
|
|
311
|
+
},
|
|
312
|
+
"label": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"description": "The collection's label for people to read; its key when the schema gives none."
|
|
315
|
+
},
|
|
316
|
+
"binding": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"enum": [
|
|
319
|
+
"global",
|
|
320
|
+
"per_robot",
|
|
321
|
+
"one_per_robot"
|
|
322
|
+
],
|
|
323
|
+
"description": "`global`: records belong to the app and no robot. `per_robot`: every record belongs to one robot (system field `robot_id`, fixed when the record is created). `one_per_robot`: every robot of the app has exactly one record, which Fleetless creates itself."
|
|
324
|
+
},
|
|
325
|
+
"read": {
|
|
326
|
+
"type": "boolean",
|
|
327
|
+
"description": "Whether the role may read the records."
|
|
328
|
+
},
|
|
329
|
+
"create": {
|
|
330
|
+
"type": "boolean",
|
|
331
|
+
"description": "Whether the role may create records."
|
|
332
|
+
},
|
|
333
|
+
"update": {
|
|
334
|
+
"anyOf": [
|
|
335
|
+
{
|
|
336
|
+
"type": "string",
|
|
337
|
+
"const": "all"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"type": "string",
|
|
341
|
+
"const": "own"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"type": "boolean",
|
|
345
|
+
"const": false
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
"description": "`all`: the role may change every record. `own`: only records its user created. `false`: none."
|
|
349
|
+
},
|
|
350
|
+
"delete": {
|
|
351
|
+
"anyOf": [
|
|
352
|
+
{
|
|
353
|
+
"type": "string",
|
|
354
|
+
"const": "all"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"type": "string",
|
|
358
|
+
"const": "own"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"const": false
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"description": "`all`: the role may delete every record. `own`: only records its user created. `false`: none."
|
|
366
|
+
},
|
|
367
|
+
"robot_filter": {
|
|
368
|
+
"type": "boolean",
|
|
369
|
+
"description": "`true` on a collection that belongs to robots (`per_robot`, `one_per_robot`): the role sees and writes only the records of robots a session of the role reaches, whatever the rights above say. `false` on a `global` collection."
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"required": [
|
|
373
|
+
"collection",
|
|
374
|
+
"label",
|
|
375
|
+
"binding",
|
|
376
|
+
"read",
|
|
377
|
+
"create",
|
|
378
|
+
"update",
|
|
379
|
+
"delete",
|
|
380
|
+
"robot_filter"
|
|
381
|
+
],
|
|
382
|
+
"additionalProperties": false,
|
|
383
|
+
"description": "What one role may do with the records of one collection."
|
|
384
|
+
},
|
|
385
|
+
"description": "What the role may do with the records of each collection of the app's latest published schema, in the schema's order. Empty when the app has no published schema. A role that is no role, and a user who is not `active`, are granted nothing in any row."
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"required": [
|
|
389
|
+
"role",
|
|
390
|
+
"role_known",
|
|
391
|
+
"user_id",
|
|
392
|
+
"robots",
|
|
393
|
+
"collections"
|
|
394
|
+
],
|
|
395
|
+
"additionalProperties": false
|
|
396
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"robot_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 robot, one that is attached to the app."
|
|
10
|
+
},
|
|
11
|
+
"robot_name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 200,
|
|
15
|
+
"description": "The robot's name."
|
|
16
|
+
},
|
|
17
|
+
"published_version": {
|
|
18
|
+
"anyOf": [
|
|
19
|
+
{
|
|
20
|
+
"type": "integer",
|
|
21
|
+
"exclusiveMinimum": 0,
|
|
22
|
+
"maximum": 9007199254740991
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "null"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"description": "The version of the robot's published `fleetless.yaml` that the answer was computed from; `null` when nothing is published."
|
|
29
|
+
},
|
|
30
|
+
"reachable": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Whether a session of this role reaches the robot at all: at least one slug or one capability is granted once the locks are applied. When `false`, `robots.describe` answers `not_found` for the robot and `robots.list` leaves it out; `capabilities` says why, and `datasheet` is the empty one."
|
|
33
|
+
},
|
|
34
|
+
"capabilities": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"name": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 2,
|
|
42
|
+
"maxLength": 63,
|
|
43
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$",
|
|
44
|
+
"description": "The exposure's slug, or `assets` or `job_history` for the capabilities that belong to the robot as a whole."
|
|
45
|
+
},
|
|
46
|
+
"kind": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"read",
|
|
50
|
+
"invoke",
|
|
51
|
+
"publish",
|
|
52
|
+
"assets",
|
|
53
|
+
"job_history"
|
|
54
|
+
],
|
|
55
|
+
"description": "The kind of access the capability needs."
|
|
56
|
+
},
|
|
57
|
+
"granted": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"description": "Whether the role may use it: its requirement is met and the app has not locked it."
|
|
60
|
+
},
|
|
61
|
+
"requirement": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"description": "The role keys that qualify, from the entry, the rule or the default that decided. Holding one of them, or inheriting from one, is enough. Empty when nobody qualifies."
|
|
67
|
+
},
|
|
68
|
+
"source": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"entry",
|
|
72
|
+
"rule",
|
|
73
|
+
"robot",
|
|
74
|
+
"org_default"
|
|
75
|
+
],
|
|
76
|
+
"description": "Where the requirement came from: `entry` is the entry's own `role`, `rule` the first matching rule of `access.rules`, `robot` the robot's `access.assets` or `access.job_history`, and `org_default` the organization's default for the kind."
|
|
77
|
+
},
|
|
78
|
+
"rule_index": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 0,
|
|
83
|
+
"maximum": 9007199254740991
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "null"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"description": "For `rule`, the position of the deciding rule in `access.rules`, counted from zero; `null` otherwise."
|
|
90
|
+
},
|
|
91
|
+
"rule_match": {
|
|
92
|
+
"anyOf": [
|
|
93
|
+
{
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "null"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"description": "For `rule`, that rule's `match` glob; `null` otherwise."
|
|
101
|
+
},
|
|
102
|
+
"satisfied_by": {
|
|
103
|
+
"anyOf": [
|
|
104
|
+
{
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "null"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"description": "The key from `requirement` that the role holds through inheritance. `null` when the role is named in the requirement itself, and when it does not meet the requirement at all. Independent of locks."
|
|
112
|
+
},
|
|
113
|
+
"locked": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"description": "Whether the app locks this capability, as a kind or as a single lock. A lock wins over the requirement."
|
|
116
|
+
},
|
|
117
|
+
"unknown_roles": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"description": "Keys in the requirement that name no role of the organization. They grant nothing."
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": [
|
|
126
|
+
"name",
|
|
127
|
+
"kind",
|
|
128
|
+
"granted",
|
|
129
|
+
"requirement",
|
|
130
|
+
"source",
|
|
131
|
+
"rule_index",
|
|
132
|
+
"rule_match",
|
|
133
|
+
"satisfied_by",
|
|
134
|
+
"locked",
|
|
135
|
+
"unknown_roles"
|
|
136
|
+
],
|
|
137
|
+
"additionalProperties": false
|
|
138
|
+
},
|
|
139
|
+
"description": "Every capability of the published configuration, and `assets` and `job_history`, each granted or not."
|
|
140
|
+
},
|
|
141
|
+
"datasheet": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"robot_id": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"format": "uuid",
|
|
147
|
+
"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)$"
|
|
148
|
+
},
|
|
149
|
+
"robot_name": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"maxLength": 200
|
|
153
|
+
},
|
|
154
|
+
"capabilities": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"properties": {
|
|
157
|
+
"job_history": {
|
|
158
|
+
"type": "boolean"
|
|
159
|
+
},
|
|
160
|
+
"assets": {
|
|
161
|
+
"type": "boolean"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"job_history",
|
|
166
|
+
"assets"
|
|
167
|
+
],
|
|
168
|
+
"additionalProperties": false
|
|
169
|
+
},
|
|
170
|
+
"exposures": {
|
|
171
|
+
"maxItems": 2000,
|
|
172
|
+
"type": "array",
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"slug": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"minLength": 2,
|
|
179
|
+
"maxLength": 63,
|
|
180
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
181
|
+
},
|
|
182
|
+
"kind": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"enum": [
|
|
185
|
+
"datapoint",
|
|
186
|
+
"service",
|
|
187
|
+
"action",
|
|
188
|
+
"publisher",
|
|
189
|
+
"camera"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"description": {
|
|
193
|
+
"anyOf": [
|
|
194
|
+
{
|
|
195
|
+
"type": "string",
|
|
196
|
+
"maxLength": 2000
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"type": "null"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"unit": {
|
|
204
|
+
"anyOf": [
|
|
205
|
+
{
|
|
206
|
+
"type": "string",
|
|
207
|
+
"maxLength": 32
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"type": "null"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"decimals": {
|
|
215
|
+
"anyOf": [
|
|
216
|
+
{
|
|
217
|
+
"type": "integer",
|
|
218
|
+
"minimum": 0,
|
|
219
|
+
"maximum": 6
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"type": "null"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"input_schema": {
|
|
227
|
+
"anyOf": [
|
|
228
|
+
{},
|
|
229
|
+
{
|
|
230
|
+
"type": "null"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"required": [
|
|
236
|
+
"slug",
|
|
237
|
+
"kind",
|
|
238
|
+
"description",
|
|
239
|
+
"unit",
|
|
240
|
+
"decimals",
|
|
241
|
+
"input_schema"
|
|
242
|
+
],
|
|
243
|
+
"additionalProperties": false
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"required": [
|
|
248
|
+
"robot_id",
|
|
249
|
+
"robot_name",
|
|
250
|
+
"capabilities",
|
|
251
|
+
"exposures"
|
|
252
|
+
],
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"description": "The datasheet an MCP session of this role would get for the robot."
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"required": [
|
|
258
|
+
"robot_id",
|
|
259
|
+
"robot_name",
|
|
260
|
+
"published_version",
|
|
261
|
+
"reachable",
|
|
262
|
+
"capabilities",
|
|
263
|
+
"datasheet"
|
|
264
|
+
],
|
|
265
|
+
"additionalProperties": false
|
|
266
|
+
}
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"action",
|
|
127
127
|
"service"
|
|
128
128
|
],
|
|
129
|
-
"description": "Always `action` in this shape. A caller sends the same request for both kinds and cannot tell from
|
|
129
|
+
"description": "Always `action` in this shape. A caller sends the same request for both kinds and cannot tell from the slug alone which it invoked, so the answer says which it was rather than leaving it to be inferred from the shape."
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
"required": [
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"action",
|
|
125
125
|
"service"
|
|
126
126
|
],
|
|
127
|
-
"description": "Always `action` in this shape. A caller sends the same request for both kinds and cannot tell from
|
|
127
|
+
"description": "Always `action` in this shape. A caller sends the same request for both kinds and cannot tell from the slug alone which it invoked, so the answer says which it was rather than leaving it to be inferred from the shape."
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
"required": [
|