@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
|
@@ -0,0 +1,205 @@
|
|
|
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
|
+
"key": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
13
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved.",
|
|
14
|
+
"description": "The role's key, as `fleetless.yaml` and every assignment write it. Unique in the organization."
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1,
|
|
19
|
+
"maxLength": 60,
|
|
20
|
+
"description": "The display name, 1 to 60 characters and trimmed. Changing it changes nothing about rights."
|
|
21
|
+
},
|
|
22
|
+
"inherits": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"description": "The keys of the roles this one inherits from. A role holds whatever its parents hold, and theirs in turn. A key that names no role is kept as written; inheritance through it grants nothing, and the key appears under `dangling`."
|
|
28
|
+
},
|
|
29
|
+
"users": {
|
|
30
|
+
"type": "integer",
|
|
31
|
+
"minimum": 0,
|
|
32
|
+
"maximum": 9007199254740991,
|
|
33
|
+
"description": "App users, in every app of the organization, who hold this role."
|
|
34
|
+
},
|
|
35
|
+
"invitations": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0,
|
|
38
|
+
"maximum": 9007199254740991,
|
|
39
|
+
"description": "Invitations that carry this role."
|
|
40
|
+
},
|
|
41
|
+
"app_defaults": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"minimum": 0,
|
|
44
|
+
"maximum": 9007199254740991,
|
|
45
|
+
"description": "Apps that use this role as their default role."
|
|
46
|
+
},
|
|
47
|
+
"references": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 0,
|
|
50
|
+
"maximum": 9007199254740991,
|
|
51
|
+
"description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml`. A rename with `update_references` rewrites them."
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"key",
|
|
56
|
+
"name",
|
|
57
|
+
"inherits",
|
|
58
|
+
"users",
|
|
59
|
+
"invitations",
|
|
60
|
+
"app_defaults",
|
|
61
|
+
"references"
|
|
62
|
+
],
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
},
|
|
65
|
+
"description": "The organization's roles with their counts, in the order they were created: the roles every organization starts with (`observe`, `operate` and `admin`) come first."
|
|
66
|
+
},
|
|
67
|
+
"dangling": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"key": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "A key that names no role of the organization, because the role was deleted or renamed or never existed."
|
|
75
|
+
},
|
|
76
|
+
"places": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"kind": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"enum": [
|
|
84
|
+
"config",
|
|
85
|
+
"app_user",
|
|
86
|
+
"invitation",
|
|
87
|
+
"app_default",
|
|
88
|
+
"role_inherits",
|
|
89
|
+
"org_default"
|
|
90
|
+
],
|
|
91
|
+
"description": "What writes the key: `config` is a `role` or `access` value in a robot's `fleetless.yaml`, `app_user` an app user who holds it, `invitation` an invitation that carries it, `app_default` an app's default role, `role_inherits` another role that inherits from it, and `org_default` one of the organization's defaults."
|
|
92
|
+
},
|
|
93
|
+
"label": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "What a person reads to find the place: the robot name (`config`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the app name (`app_default`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`)."
|
|
96
|
+
},
|
|
97
|
+
"path": {
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "null"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"description": "Where the key is written. For `config`, the place in the YAML, such as `services.arm_home.role` or `access.rules[1].role`; for `role_inherits`, the key of the role that inherits from it, because display names are not unique; `null` for every other kind."
|
|
107
|
+
},
|
|
108
|
+
"robot_id": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "string",
|
|
112
|
+
"format": "uuid",
|
|
113
|
+
"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)$"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "null"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"description": "The robot whose document holds the key (`config`); `null` for every other kind."
|
|
120
|
+
},
|
|
121
|
+
"app_id": {
|
|
122
|
+
"anyOf": [
|
|
123
|
+
{
|
|
124
|
+
"type": "string",
|
|
125
|
+
"format": "uuid",
|
|
126
|
+
"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)$"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "null"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"description": "The app the user, invitation or default role belongs to (`app_user`, `invitation`, `app_default`); `null` for every other kind."
|
|
133
|
+
},
|
|
134
|
+
"user_id": {
|
|
135
|
+
"anyOf": [
|
|
136
|
+
{
|
|
137
|
+
"type": "string",
|
|
138
|
+
"format": "uuid",
|
|
139
|
+
"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)$"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": "null"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"description": "The app user who holds the key (`app_user`); `null` for every other kind."
|
|
146
|
+
},
|
|
147
|
+
"document": {
|
|
148
|
+
"anyOf": [
|
|
149
|
+
{
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": [
|
|
152
|
+
"published",
|
|
153
|
+
"draft"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"type": "null"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"description": "Which version of the robot's document holds the key (`config`): the published one or the draft; `null` for every other kind."
|
|
161
|
+
},
|
|
162
|
+
"new_version": {
|
|
163
|
+
"anyOf": [
|
|
164
|
+
{
|
|
165
|
+
"type": "integer",
|
|
166
|
+
"exclusiveMinimum": 0,
|
|
167
|
+
"maximum": 9007199254740991
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"type": "null"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"description": "For a published document, the version number a rename with `update_references` would give it, a copy that differs only in the key; `null` for a draft and for every place that is no document."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": [
|
|
177
|
+
"kind",
|
|
178
|
+
"label",
|
|
179
|
+
"path",
|
|
180
|
+
"robot_id",
|
|
181
|
+
"app_id",
|
|
182
|
+
"user_id",
|
|
183
|
+
"document",
|
|
184
|
+
"new_version"
|
|
185
|
+
],
|
|
186
|
+
"additionalProperties": false
|
|
187
|
+
},
|
|
188
|
+
"description": "Every place that writes the key. It grants nothing wherever it is written; creating a role with this key makes the places count again."
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": [
|
|
192
|
+
"key",
|
|
193
|
+
"places"
|
|
194
|
+
],
|
|
195
|
+
"additionalProperties": false
|
|
196
|
+
},
|
|
197
|
+
"description": "Keys written somewhere that are no role, each with its places. Empty when nothing is out of step."
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": [
|
|
201
|
+
"roles",
|
|
202
|
+
"dangling"
|
|
203
|
+
],
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"key": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
8
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved.",
|
|
9
|
+
"description": "The role's key, as `fleetless.yaml` and every assignment write it. Unique in the organization."
|
|
10
|
+
},
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 60,
|
|
15
|
+
"description": "The display name, 1 to 60 characters and trimmed. Changing it changes nothing about rights."
|
|
16
|
+
},
|
|
17
|
+
"inherits": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"description": "The keys of the roles this one inherits from. A role holds whatever its parents hold, and theirs in turn. A key that names no role is kept as written; inheritance through it grants nothing, and the key appears under `dangling`."
|
|
23
|
+
},
|
|
24
|
+
"users": {
|
|
25
|
+
"type": "integer",
|
|
26
|
+
"minimum": 0,
|
|
27
|
+
"maximum": 9007199254740991,
|
|
28
|
+
"description": "App users, in every app of the organization, who hold this role."
|
|
29
|
+
},
|
|
30
|
+
"invitations": {
|
|
31
|
+
"type": "integer",
|
|
32
|
+
"minimum": 0,
|
|
33
|
+
"maximum": 9007199254740991,
|
|
34
|
+
"description": "Invitations that carry this role."
|
|
35
|
+
},
|
|
36
|
+
"app_defaults": {
|
|
37
|
+
"type": "integer",
|
|
38
|
+
"minimum": 0,
|
|
39
|
+
"maximum": 9007199254740991,
|
|
40
|
+
"description": "Apps that use this role as their default role."
|
|
41
|
+
},
|
|
42
|
+
"references": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 0,
|
|
45
|
+
"maximum": 9007199254740991,
|
|
46
|
+
"description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml`. A rename with `update_references` rewrites them."
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": [
|
|
50
|
+
"key",
|
|
51
|
+
"name",
|
|
52
|
+
"inherits",
|
|
53
|
+
"users",
|
|
54
|
+
"invitations",
|
|
55
|
+
"app_defaults",
|
|
56
|
+
"references"
|
|
57
|
+
],
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
|
-
"
|
|
19
|
-
"description": "The role the user holds from now on. A
|
|
18
|
+
"role": {
|
|
19
|
+
"description": "The role the user holds from now on, by key. A key that names no role is accepted and grants nothing. The change applies at once: the user's live subscriptions are re-checked against the new role, and those it no longer allows end.",
|
|
20
20
|
"type": "string",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
22
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
23
23
|
},
|
|
24
24
|
"status": {
|
|
25
25
|
"type": "string",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"name": {
|
|
6
|
+
"description": "A new display name, 1 to 60 characters; surrounding spaces are removed.",
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 1,
|
|
9
|
+
"maxLength": 60
|
|
10
|
+
},
|
|
11
|
+
"inherits": {
|
|
12
|
+
"description": "The role's parents from now on. It replaces the whole list; `[]` removes every parent. A list that would lead back to this role is refused with `role_cycle`.",
|
|
13
|
+
"maxItems": 50,
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
18
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"key": {
|
|
22
|
+
"description": "A new key. On its own, the rename is accepted at once and everything that still names the old key turns into a warning. To rewrite those places as well, add `update_references`.",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
25
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
26
|
+
},
|
|
27
|
+
"update_references": {
|
|
28
|
+
"description": "With `key`: rewrite every place that names the old key to the new one, in one transaction. Without `confirm`, when there are places to rewrite the call changes nothing and answers `409 confirmation_required` with the preview; a rename with none applies at once and needs no token.",
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"confirm": {
|
|
32
|
+
"description": "The `confirm` token of the preview the caller was shown. It confirms that preview only; if the places to rewrite have changed since, the call answers a new preview.",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
@@ -11,11 +11,58 @@
|
|
|
11
11
|
"type": "string",
|
|
12
12
|
"format": "date-time",
|
|
13
13
|
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
14
|
+
},
|
|
15
|
+
"warnings": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"path": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1
|
|
23
|
+
},
|
|
24
|
+
"slug": {
|
|
25
|
+
"anyOf": [
|
|
26
|
+
{
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "null"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"code": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"message": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1
|
|
41
|
+
},
|
|
42
|
+
"severity": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": [
|
|
45
|
+
"error",
|
|
46
|
+
"warning"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [
|
|
51
|
+
"path",
|
|
52
|
+
"slug",
|
|
53
|
+
"code",
|
|
54
|
+
"message",
|
|
55
|
+
"severity"
|
|
56
|
+
],
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
},
|
|
59
|
+
"description": "Every `warning` of the published document — an unknown topic, a role key that names no role of the organization, a rule that fits nothing. A warning never blocks a publish; it is here so the author does not have to go looking for it. `[]` for a document with none."
|
|
14
60
|
}
|
|
15
61
|
},
|
|
16
62
|
"required": [
|
|
17
63
|
"version",
|
|
18
|
-
"published_at"
|
|
64
|
+
"published_at",
|
|
65
|
+
"warnings"
|
|
19
66
|
],
|
|
20
67
|
"additionalProperties": false
|
|
21
68
|
}
|
|
@@ -227,6 +227,41 @@
|
|
|
227
227
|
"type": "string",
|
|
228
228
|
"minLength": 1,
|
|
229
229
|
"maxLength": 2000
|
|
230
|
+
},
|
|
231
|
+
"role": {
|
|
232
|
+
"anyOf": [
|
|
233
|
+
{
|
|
234
|
+
"type": "string",
|
|
235
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
236
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"minItems": 1,
|
|
240
|
+
"maxItems": 50,
|
|
241
|
+
"type": "array",
|
|
242
|
+
"items": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
245
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"defaultSnippets": [
|
|
250
|
+
{
|
|
251
|
+
"label": "one role",
|
|
252
|
+
"description": "The role that may use this; a role that inherits from it may too.",
|
|
253
|
+
"body": "${1:operate}"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"label": "any of several roles",
|
|
257
|
+
"description": "A list of roles; holding one of them, or inheriting from one, is enough.",
|
|
258
|
+
"body": [
|
|
259
|
+
"${1:operate}",
|
|
260
|
+
"${2:admin}"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"description": "Which role may send to this publisher, which is what driving the robot is: one role key, or a list of keys when several roles qualify. A role qualifies when it, or a role it inherits from, is named. Without this, the first rule of `access.rules` that fits the entry decides, and without a fitting rule the organization's default for `publish` applies. A key that names no role of the organization is a warning when you publish, never an error, and grants nothing. The robot ignores it; the cloud enforces it."
|
|
230
265
|
}
|
|
231
266
|
},
|
|
232
267
|
"required": [
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"defaults": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"read": {
|
|
9
|
+
"description": "Reading datapoints and cameras. One role key, a list of keys, or `null` or `[]` for nobody. Left out, the kind keeps what it has. A key that names no role is accepted and warns.",
|
|
10
|
+
"anyOf": [
|
|
11
|
+
{
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
14
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"maxItems": 50,
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
22
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "null"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"invoke": {
|
|
31
|
+
"description": "Calling services and starting actions. One role key, a list of keys, or `null` or `[]` for nobody. Left out, the kind keeps what it has. A key that names no role is accepted and warns.",
|
|
32
|
+
"anyOf": [
|
|
33
|
+
{
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
36
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"maxItems": 50,
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
44
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "null"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"publish": {
|
|
53
|
+
"description": "Driving a robot through its publishers. One role key, a list of keys, or `null` or `[]` for nobody. Left out, the kind keeps what it has. A key that names no role is accepted and warns.",
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
58
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"maxItems": 50,
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
66
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "null"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"assets": {
|
|
75
|
+
"description": "A robot's asset files, such as its URDF and meshes. One role key, a list of keys, or `null` or `[]` for nobody. Left out, the kind keeps what it has. A key that names no role is accepted and warns.",
|
|
76
|
+
"anyOf": [
|
|
77
|
+
{
|
|
78
|
+
"type": "string",
|
|
79
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
80
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"maxItems": 50,
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
88
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "null"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"job_history": {
|
|
97
|
+
"description": "The history of a robot's jobs. One role key, a list of keys, or `null` or `[]` for nobody. Left out, the kind keeps what it has. A key that names no role is accepted and warns.",
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{
|
|
100
|
+
"type": "string",
|
|
101
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
102
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"maxItems": 50,
|
|
106
|
+
"type": "array",
|
|
107
|
+
"items": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
110
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "null"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"description": "The kinds to change. A kind that is not named keeps its current default, so this is a patch of the defaults and not a replacement."
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": [
|
|
124
|
+
"defaults"
|
|
125
|
+
],
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"kind": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"enum": [
|
|
8
|
+
"config",
|
|
9
|
+
"app_user",
|
|
10
|
+
"invitation",
|
|
11
|
+
"app_default",
|
|
12
|
+
"role_inherits",
|
|
13
|
+
"org_default"
|
|
14
|
+
],
|
|
15
|
+
"description": "What writes the key: `config` is a `role` or `access` value in a robot's `fleetless.yaml`, `app_user` an app user who holds it, `invitation` an invitation that carries it, `app_default` an app's default role, `role_inherits` another role that inherits from it, and `org_default` one of the organization's defaults."
|
|
16
|
+
},
|
|
17
|
+
"label": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "What a person reads to find the place: the robot name (`config`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the app name (`app_default`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`)."
|
|
20
|
+
},
|
|
21
|
+
"path": {
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "null"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"description": "Where the key is written. For `config`, the place in the YAML, such as `services.arm_home.role` or `access.rules[1].role`; for `role_inherits`, the key of the role that inherits from it, because display names are not unique; `null` for every other kind."
|
|
31
|
+
},
|
|
32
|
+
"robot_id": {
|
|
33
|
+
"anyOf": [
|
|
34
|
+
{
|
|
35
|
+
"type": "string",
|
|
36
|
+
"format": "uuid",
|
|
37
|
+
"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)$"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "null"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"description": "The robot whose document holds the key (`config`); `null` for every other kind."
|
|
44
|
+
},
|
|
45
|
+
"app_id": {
|
|
46
|
+
"anyOf": [
|
|
47
|
+
{
|
|
48
|
+
"type": "string",
|
|
49
|
+
"format": "uuid",
|
|
50
|
+
"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)$"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "null"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"description": "The app the user, invitation or default role belongs to (`app_user`, `invitation`, `app_default`); `null` for every other kind."
|
|
57
|
+
},
|
|
58
|
+
"user_id": {
|
|
59
|
+
"anyOf": [
|
|
60
|
+
{
|
|
61
|
+
"type": "string",
|
|
62
|
+
"format": "uuid",
|
|
63
|
+
"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)$"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "null"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"description": "The app user who holds the key (`app_user`); `null` for every other kind."
|
|
70
|
+
},
|
|
71
|
+
"document": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{
|
|
74
|
+
"type": "string",
|
|
75
|
+
"enum": [
|
|
76
|
+
"published",
|
|
77
|
+
"draft"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "null"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"description": "Which version of the robot's document holds the key (`config`): the published one or the draft; `null` for every other kind."
|
|
85
|
+
},
|
|
86
|
+
"new_version": {
|
|
87
|
+
"anyOf": [
|
|
88
|
+
{
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"exclusiveMinimum": 0,
|
|
91
|
+
"maximum": 9007199254740991
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "null"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"description": "For a published document, the version number a rename with `update_references` would give it, a copy that differs only in the key; `null` for a draft and for every place that is no document."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": [
|
|
101
|
+
"kind",
|
|
102
|
+
"label",
|
|
103
|
+
"path",
|
|
104
|
+
"robot_id",
|
|
105
|
+
"app_id",
|
|
106
|
+
"user_id",
|
|
107
|
+
"document",
|
|
108
|
+
"new_version"
|
|
109
|
+
],
|
|
110
|
+
"additionalProperties": false
|
|
111
|
+
}
|