@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.
Files changed (182) hide show
  1. package/CHANGELOG.md +304 -0
  2. package/artifacts/openapi.json +20156 -10513
  3. package/artifacts/routes.json +1429 -292
  4. package/artifacts/schema/access-warning.schema.json +51 -0
  5. package/artifacts/schema/action-config.schema.json +35 -0
  6. package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
  7. package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
  8. package/artifacts/schema/app-access-response.schema.json +136 -0
  9. package/artifacts/schema/app-access.schema.json +80 -0
  10. package/artifacts/schema/app-deletion-summary.schema.json +15 -8
  11. package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
  12. package/artifacts/schema/app-invitation.schema.json +5 -5
  13. package/artifacts/schema/app-list-response.schema.json +6 -6
  14. package/artifacts/schema/app-lock.schema.json +30 -0
  15. package/artifacts/schema/app-user-list-response.schema.json +13 -6
  16. package/artifacts/schema/app-user.schema.json +13 -6
  17. package/artifacts/schema/app.schema.json +6 -6
  18. package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
  19. package/artifacts/schema/auth-ok.schema.json +20 -6
  20. package/artifacts/schema/camera-list-response.schema.json +1 -1
  21. package/artifacts/schema/client-identity.schema.json +21 -6
  22. package/artifacts/schema/cloud-config.schema.json +359 -5
  23. package/artifacts/schema/collection-actor.schema.json +35 -0
  24. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  25. package/artifacts/schema/collection-event.schema.json +216 -0
  26. package/artifacts/schema/collection-export-query.schema.json +56 -0
  27. package/artifacts/schema/collection-filter.schema.json +9 -0
  28. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  29. package/artifacts/schema/collection-import-request.schema.json +105 -0
  30. package/artifacts/schema/collection-import-result.schema.json +38 -0
  31. package/artifacts/schema/collection-list-response.schema.json +119 -0
  32. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  33. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  34. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  35. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  36. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  37. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  38. package/artifacts/schema/collection-record-write.schema.json +31 -0
  39. package/artifacts/schema/collection-record.schema.json +180 -0
  40. package/artifacts/schema/collection-revision.schema.json +295 -0
  41. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  42. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  43. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  44. package/artifacts/schema/collection-summary.schema.json +92 -0
  45. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  46. package/artifacts/schema/collections-access-change.schema.json +34 -0
  47. package/artifacts/schema/collections-document.schema.json +732 -0
  48. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  49. package/artifacts/schema/collections-effect.schema.json +384 -0
  50. package/artifacts/schema/collections-issue.schema.json +36 -0
  51. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  52. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  53. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  54. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  55. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  56. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  57. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  58. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  59. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  60. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  61. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  62. package/artifacts/schema/collections-version-response.schema.json +869 -0
  63. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  64. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  65. package/artifacts/schema/config-draft-response.schema.json +359 -5
  66. package/artifacts/schema/config-version-response.schema.json +359 -5
  67. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  68. package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
  69. package/artifacts/schema/create-app-user-request.schema.json +4 -4
  70. package/artifacts/schema/create-org-role-request.schema.json +33 -0
  71. package/artifacts/schema/dangling-reference.schema.json +130 -0
  72. package/artifacts/schema/datapoint-config.schema.json +35 -0
  73. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  74. package/artifacts/schema/effective-capability.schema.json +104 -0
  75. package/artifacts/schema/effective-rights-query.schema.json +19 -0
  76. package/artifacts/schema/effective-rights-response.schema.json +396 -0
  77. package/artifacts/schema/effective-robot-rights.schema.json +266 -0
  78. package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
  79. package/artifacts/schema/invoke-response.schema.json +1 -1
  80. package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
  81. package/artifacts/schema/journal-intent-v2.schema.json +84 -0
  82. package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
  83. package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
  84. package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
  85. package/artifacts/schema/org-plan.schema.json +29 -1
  86. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  87. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  88. package/artifacts/schema/org-quotas.schema.json +29 -1
  89. package/artifacts/schema/org-role-list-response.schema.json +206 -0
  90. package/artifacts/schema/org-role.schema.json +59 -0
  91. package/artifacts/schema/patch-app-user-request.schema.json +4 -4
  92. package/artifacts/schema/patch-org-role-request.schema.json +38 -0
  93. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  94. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  95. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  96. package/artifacts/schema/plan-limits.schema.json +29 -1
  97. package/artifacts/schema/plan-overrides.schema.json +26 -0
  98. package/artifacts/schema/publish-config-response.schema.json +48 -1
  99. package/artifacts/schema/publisher-config.schema.json +35 -0
  100. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  101. package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
  102. package/artifacts/schema/record-changed-details.schema.json +16 -0
  103. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  104. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  105. package/artifacts/schema/reference-place.schema.json +112 -0
  106. package/artifacts/schema/rename-slug-response.schema.json +4 -3
  107. package/artifacts/schema/required-missing-details.schema.json +19 -0
  108. package/artifacts/schema/robot-config-doc.schema.json +359 -5
  109. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  110. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  111. package/artifacts/schema/role-cycle-details.schema.json +18 -0
  112. package/artifacts/schema/role-defaults-response.schema.json +59 -0
  113. package/artifacts/schema/role-rename-preview.schema.json +147 -0
  114. package/artifacts/schema/service-config.schema.json +35 -0
  115. package/artifacts/schema/slug-usage-response.schema.json +4 -3
  116. package/artifacts/schema/update-app-request.schema.json +0 -12
  117. package/dist/app-users.d.ts +11 -8
  118. package/dist/app-users.js +18 -10
  119. package/dist/apps.d.ts +258 -71
  120. package/dist/apps.js +215 -151
  121. package/dist/audit.d.ts +35 -5
  122. package/dist/audit.js +40 -2
  123. package/dist/billing.d.ts +10 -10
  124. package/dist/client-auth.d.ts +5 -2
  125. package/dist/client-auth.js +11 -3
  126. package/dist/client-robots.d.ts +1 -1
  127. package/dist/client-robots.js +1 -1
  128. package/dist/collections-issues.d.ts +67 -0
  129. package/dist/collections-issues.js +340 -0
  130. package/dist/collections-records.d.ts +562 -0
  131. package/dist/collections-records.js +525 -0
  132. package/dist/collections-rights.d.ts +17 -0
  133. package/dist/collections-rights.js +41 -0
  134. package/dist/collections-schema.d.ts +1064 -0
  135. package/dist/collections-schema.js +386 -0
  136. package/dist/collections-templates.d.ts +55 -0
  137. package/dist/collections-templates.js +137 -0
  138. package/dist/collections-transfer.d.ts +101 -0
  139. package/dist/collections-transfer.js +206 -0
  140. package/dist/collections-values.d.ts +67 -0
  141. package/dist/collections-values.js +284 -0
  142. package/dist/collections.d.ts +568 -0
  143. package/dist/collections.js +332 -0
  144. package/dist/common.d.ts +1 -1
  145. package/dist/common.js +1 -1
  146. package/dist/config-issues.d.ts +1 -1
  147. package/dist/config-issues.js +1 -1
  148. package/dist/config.d.ts +78 -12
  149. package/dist/config.js +109 -15
  150. package/dist/errors.d.ts +63 -5
  151. package/dist/errors.js +152 -24
  152. package/dist/index.d.ts +40 -14
  153. package/dist/index.js +27 -7
  154. package/dist/journal-intents.d.ts +30 -0
  155. package/dist/journal-intents.js +3 -0
  156. package/dist/legal-acceptances.d.ts +2 -2
  157. package/dist/mcp.d.ts +5 -37
  158. package/dist/mcp.js +4 -14
  159. package/dist/org-roles.d.ts +186 -0
  160. package/dist/org-roles.js +199 -0
  161. package/dist/plans.d.ts +25 -7
  162. package/dist/plans.js +21 -1
  163. package/dist/protocol.d.ts +19 -1
  164. package/dist/realtime.d.ts +172 -3
  165. package/dist/realtime.js +164 -1
  166. package/dist/rest.d.ts +104 -53
  167. package/dist/rest.js +79 -55
  168. package/dist/rights.d.ts +197 -0
  169. package/dist/rights.js +396 -0
  170. package/dist/routes.d.ts +1 -1
  171. package/dist/routes.js +675 -150
  172. package/package.json +1 -1
  173. package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
  174. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  175. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  176. package/artifacts/schema/robot-details-doc.schema.json +0 -33
  177. package/artifacts/schema/role-delete-query.schema.json +0 -13
  178. package/artifacts/schema/role-in-use-details.schema.json +0 -28
  179. package/artifacts/schema/role-list-response.schema.json +0 -48
  180. package/artifacts/schema/role-permissions.schema.json +0 -61
  181. package/artifacts/schema/role-rename-request.schema.json +0 -16
  182. package/artifacts/schema/role.schema.json +0 -35
@@ -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
+ }
@@ -123,6 +123,32 @@
123
123
  }
124
124
  ],
125
125
  "description": "Days the org's audit log is kept."
126
+ },
127
+ "collection_records": {
128
+ "anyOf": [
129
+ {
130
+ "type": "integer",
131
+ "exclusiveMinimum": 0,
132
+ "maximum": 9007199254740991
133
+ },
134
+ {
135
+ "type": "null"
136
+ }
137
+ ],
138
+ "description": "Records in the app collections of all the org's apps, together. Only current records count, deleted ones and the history do not. A write or an import that would add records past it is refused `409 plan_limit` naming this key; reads continue."
139
+ },
140
+ "collection_bytes": {
141
+ "anyOf": [
142
+ {
143
+ "type": "integer",
144
+ "exclusiveMinimum": 0,
145
+ "maximum": 9007199254740991
146
+ },
147
+ {
148
+ "type": "null"
149
+ }
150
+ ],
151
+ "description": "Bytes the current records of all the org's app collections occupy, as stored JSON (decimal: 1 GB = 1,000,000,000). The history is shown beside it and not limited. A write or an import that would add data past it is refused `409 plan_limit` naming this key; reads continue."
126
152
  }
127
153
  },
128
154
  "required": [
@@ -133,7 +159,9 @@
133
159
  "live_video_ms_per_month",
134
160
  "asset_bytes_per_robot",
135
161
  "history_days",
136
- "audit_days"
162
+ "audit_days",
163
+ "collection_records",
164
+ "collection_bytes"
137
165
  ],
138
166
  "additionalProperties": false,
139
167
  "description": "What the plan allows. `null` means by contract."
@@ -209,6 +209,32 @@
209
209
  }
210
210
  ],
211
211
  "description": "Days the org's audit log is kept."
212
+ },
213
+ "collection_records": {
214
+ "anyOf": [
215
+ {
216
+ "type": "integer",
217
+ "exclusiveMinimum": 0,
218
+ "maximum": 9007199254740991
219
+ },
220
+ {
221
+ "type": "null"
222
+ }
223
+ ],
224
+ "description": "Records in the app collections of all the org's apps, together. Only current records count, deleted ones and the history do not. A write or an import that would add records past it is refused `409 plan_limit` naming this key; reads continue."
225
+ },
226
+ "collection_bytes": {
227
+ "anyOf": [
228
+ {
229
+ "type": "integer",
230
+ "exclusiveMinimum": 0,
231
+ "maximum": 9007199254740991
232
+ },
233
+ {
234
+ "type": "null"
235
+ }
236
+ ],
237
+ "description": "Bytes the current records of all the org's app collections occupy, as stored JSON (decimal: 1 GB = 1,000,000,000). The history is shown beside it and not limited. A write or an import that would add data past it is refused `409 plan_limit` naming this key; reads continue."
212
238
  }
213
239
  },
214
240
  "required": [
@@ -219,7 +245,9 @@
219
245
  "live_video_ms_per_month",
220
246
  "asset_bytes_per_robot",
221
247
  "history_days",
222
- "audit_days"
248
+ "audit_days",
249
+ "collection_records",
250
+ "collection_bytes"
223
251
  ],
224
252
  "additionalProperties": false,
225
253
  "description": "The org's effective limits: the plan's, raised by its add-ons, or an operator's override in their place. `null` means unlimited for a count, and 90 days for `history_days` and `audit_days`."
@@ -10,7 +10,9 @@
10
10
  "apps",
11
11
  "app_users",
12
12
  "live_video_ms_per_month",
13
- "asset_bytes_per_robot"
13
+ "asset_bytes_per_robot",
14
+ "collection_records",
15
+ "collection_bytes"
14
16
  ],
15
17
  "description": "The limit the action would exceed."
16
18
  },
@@ -105,6 +105,32 @@
105
105
  }
106
106
  ],
107
107
  "description": "Days the org's audit log is kept."
108
+ },
109
+ "collection_records": {
110
+ "anyOf": [
111
+ {
112
+ "type": "integer",
113
+ "exclusiveMinimum": 0,
114
+ "maximum": 9007199254740991
115
+ },
116
+ {
117
+ "type": "null"
118
+ }
119
+ ],
120
+ "description": "Records in the app collections of all the org's apps, together. Only current records count, deleted ones and the history do not. A write or an import that would add records past it is refused `409 plan_limit` naming this key; reads continue."
121
+ },
122
+ "collection_bytes": {
123
+ "anyOf": [
124
+ {
125
+ "type": "integer",
126
+ "exclusiveMinimum": 0,
127
+ "maximum": 9007199254740991
128
+ },
129
+ {
130
+ "type": "null"
131
+ }
132
+ ],
133
+ "description": "Bytes the current records of all the org's app collections occupy, as stored JSON (decimal: 1 GB = 1,000,000,000). The history is shown beside it and not limited. A write or an import that would add data past it is refused `409 plan_limit` naming this key; reads continue."
108
134
  }
109
135
  },
110
136
  "required": [
@@ -115,7 +141,9 @@
115
141
  "live_video_ms_per_month",
116
142
  "asset_bytes_per_robot",
117
143
  "history_days",
118
- "audit_days"
144
+ "audit_days",
145
+ "collection_records",
146
+ "collection_bytes"
119
147
  ],
120
148
  "additionalProperties": false
121
149
  }
@@ -105,6 +105,32 @@
105
105
  "type": "null"
106
106
  }
107
107
  ]
108
+ },
109
+ "collection_records": {
110
+ "description": "Replaces the plan's `collection_records`. `null` clears the override.",
111
+ "anyOf": [
112
+ {
113
+ "type": "integer",
114
+ "exclusiveMinimum": 0,
115
+ "maximum": 9007199254740991
116
+ },
117
+ {
118
+ "type": "null"
119
+ }
120
+ ]
121
+ },
122
+ "collection_bytes": {
123
+ "description": "Replaces the plan's `collection_bytes`. `null` clears the override.",
124
+ "anyOf": [
125
+ {
126
+ "type": "integer",
127
+ "exclusiveMinimum": 0,
128
+ "maximum": 9007199254740991
129
+ },
130
+ {
131
+ "type": "null"
132
+ }
133
+ ]
108
134
  }
109
135
  },
110
136
  "additionalProperties": false
@@ -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,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "source": {
6
+ "type": "string",
7
+ "maxLength": 1000000,
8
+ "description": "The whole document as YAML or JSON text, at most 1,000,000 bytes of UTF-8, which is fewer characters when some are not plain ASCII. It replaces the draft and is refused with the problems found if it is not valid."
9
+ }
10
+ },
11
+ "required": [
12
+ "source"
13
+ ],
14
+ "additionalProperties": false,
15
+ "description": "Replaces the draft with a whole document."
16
+ }
@@ -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,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "revision": {
6
+ "type": "integer",
7
+ "minimum": 1,
8
+ "maximum": 9007199254740991,
9
+ "description": "The current revision of the record, which is not the `expected_revision` that was sent."
10
+ }
11
+ },
12
+ "required": [
13
+ "revision"
14
+ ],
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "references": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "collection": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "description": "The key of a collection that has records pointing at this one."
14
+ },
15
+ "count": {
16
+ "type": "integer",
17
+ "minimum": 1,
18
+ "maximum": 9007199254740991,
19
+ "description": "How many records of that collection point at it."
20
+ }
21
+ },
22
+ "required": [
23
+ "collection",
24
+ "count"
25
+ ],
26
+ "additionalProperties": false
27
+ },
28
+ "description": "The collections whose records reference the record, each with how many. Only collections the caller may read are named, so the list is empty when the records that point here are all in collections the caller cannot read; the refusal still stands."
29
+ }
30
+ },
31
+ "required": [
32
+ "references"
33
+ ],
34
+ "additionalProperties": false
35
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "field": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "The key of the reference field."
9
+ },
10
+ "reason": {
11
+ "type": "string",
12
+ "enum": [
13
+ "missing",
14
+ "other_robot",
15
+ "not_readable"
16
+ ],
17
+ "description": "`missing`: no record of the target collection has that id. `other_robot`: the target belongs to another robot than the record that points at it. `not_readable`: the caller may not read the target collection."
18
+ }
19
+ },
20
+ "required": [
21
+ "field",
22
+ "reason"
23
+ ],
24
+ "additionalProperties": false
25
+ }
@@ -0,0 +1,112 @@
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
+ "collection_schema",
10
+ "app_user",
11
+ "invitation",
12
+ "app_default",
13
+ "role_inherits",
14
+ "org_default"
15
+ ],
16
+ "description": "What writes the key: `config` is a `role` or `access` value in a robot's `fleetless.yaml`, `collection_schema` an `access` entry of a collection in an app's collections schema, `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."
17
+ },
18
+ "label": {
19
+ "type": "string",
20
+ "description": "What a person reads to find the place: the robot name (`config`), the app name (`collection_schema`, `app_default`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`)."
21
+ },
22
+ "path": {
23
+ "anyOf": [
24
+ {
25
+ "type": "string"
26
+ },
27
+ {
28
+ "type": "null"
29
+ }
30
+ ],
31
+ "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 `collection_schema`, the place in the collections schema, such as `collections.notes.access.update.own[1]`; for `role_inherits`, the key of the role that inherits from it, because display names are not unique; `null` for every other kind."
32
+ },
33
+ "robot_id": {
34
+ "anyOf": [
35
+ {
36
+ "type": "string",
37
+ "format": "uuid",
38
+ "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)$"
39
+ },
40
+ {
41
+ "type": "null"
42
+ }
43
+ ],
44
+ "description": "The robot whose document holds the key (`config`); `null` for every other kind."
45
+ },
46
+ "app_id": {
47
+ "anyOf": [
48
+ {
49
+ "type": "string",
50
+ "format": "uuid",
51
+ "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)$"
52
+ },
53
+ {
54
+ "type": "null"
55
+ }
56
+ ],
57
+ "description": "The app the key belongs to: the app whose collections schema holds it (`collection_schema`), or the app of the user, invitation or default role (`app_user`, `invitation`, `app_default`); `null` for every other kind."
58
+ },
59
+ "user_id": {
60
+ "anyOf": [
61
+ {
62
+ "type": "string",
63
+ "format": "uuid",
64
+ "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)$"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ],
70
+ "description": "The app user who holds the key (`app_user`); `null` for every other kind."
71
+ },
72
+ "document": {
73
+ "anyOf": [
74
+ {
75
+ "type": "string",
76
+ "enum": [
77
+ "published",
78
+ "draft"
79
+ ]
80
+ },
81
+ {
82
+ "type": "null"
83
+ }
84
+ ],
85
+ "description": "Which version of the document holds the key (`config`: the robot's configuration, `collection_schema`: the app's collections schema): the published one or the draft; `null` for every other kind."
86
+ },
87
+ "new_version": {
88
+ "anyOf": [
89
+ {
90
+ "type": "integer",
91
+ "exclusiveMinimum": 0,
92
+ "maximum": 9007199254740991
93
+ },
94
+ {
95
+ "type": "null"
96
+ }
97
+ ],
98
+ "description": "For a published document (`config` or `collection_schema`), 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."
99
+ }
100
+ },
101
+ "required": [
102
+ "kind",
103
+ "label",
104
+ "path",
105
+ "robot_id",
106
+ "app_id",
107
+ "user_id",
108
+ "document",
109
+ "new_version"
110
+ ],
111
+ "additionalProperties": false
112
+ }