@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,612 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "version": {
6
+ "anyOf": [
7
+ {
8
+ "type": "integer",
9
+ "minimum": 1,
10
+ "maximum": 9007199254740991
11
+ },
12
+ {
13
+ "type": "null"
14
+ }
15
+ ],
16
+ "description": "The published schema version. Null before anything was published."
17
+ },
18
+ "collections": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "properties": {
23
+ "key": {
24
+ "type": "string",
25
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
26
+ "description": "A collection key or a field key: `^[a-z][a-z0-9_]{0,62}$`. Keys appear in URLs, filters and record bodies; `label` is the text people read."
27
+ },
28
+ "label": {
29
+ "type": "string"
30
+ },
31
+ "description": {
32
+ "type": "string"
33
+ },
34
+ "binding": {
35
+ "type": "string",
36
+ "enum": [
37
+ "global",
38
+ "per_robot",
39
+ "one_per_robot"
40
+ ],
41
+ "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."
42
+ },
43
+ "display": {
44
+ "type": "string",
45
+ "description": "The template that names a record of this collection."
46
+ },
47
+ "fields": {
48
+ "type": "object",
49
+ "propertyNames": {
50
+ "type": "string",
51
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
52
+ "description": "A collection key or a field key: `^[a-z][a-z0-9_]{0,62}$`. Keys appear in URLs, filters and record bodies; `label` is the text people read."
53
+ },
54
+ "additionalProperties": {
55
+ "oneOf": [
56
+ {
57
+ "type": "object",
58
+ "properties": {
59
+ "type": {
60
+ "type": "string",
61
+ "const": "text"
62
+ },
63
+ "label": {
64
+ "type": "string",
65
+ "maxLength": 120,
66
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
67
+ },
68
+ "description": {
69
+ "type": "string",
70
+ "maxLength": 1000,
71
+ "description": "Free text that explains the field to the people who fill it in."
72
+ },
73
+ "required": {
74
+ "type": "boolean",
75
+ "description": "A new record must set this field, and an update may not clear it."
76
+ },
77
+ "unique": {
78
+ "anyOf": [
79
+ {
80
+ "type": "boolean"
81
+ },
82
+ {
83
+ "type": "string",
84
+ "const": "collection"
85
+ }
86
+ ],
87
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
88
+ },
89
+ "default": {
90
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
91
+ },
92
+ "max_length": {
93
+ "type": "integer",
94
+ "minimum": 1,
95
+ "maximum": 1000,
96
+ "description": "Longest value in characters. Default 255, at most 1000."
97
+ },
98
+ "pattern": {
99
+ "type": "string",
100
+ "maxLength": 1000,
101
+ "description": "A regular expression in the RE2 subset, checked in unicode mode: lookahead, lookbehind and backreferences are not supported. At most 1,000 characters, and the cloud may also refuse a pattern as too complex (its compiled size is bounded; counted repeats such as `{n}` multiply it), which a document reports as an invalid pattern. The value must match somewhere in it; anchor it with `^` and `$` to match the whole value."
102
+ },
103
+ "searchable": {
104
+ "type": "boolean",
105
+ "description": "Include this field in the `search` of record lists."
106
+ }
107
+ },
108
+ "required": [
109
+ "type"
110
+ ],
111
+ "additionalProperties": false
112
+ },
113
+ {
114
+ "type": "object",
115
+ "properties": {
116
+ "type": {
117
+ "type": "string",
118
+ "const": "long_text"
119
+ },
120
+ "label": {
121
+ "type": "string",
122
+ "maxLength": 120,
123
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
124
+ },
125
+ "description": {
126
+ "type": "string",
127
+ "maxLength": 1000,
128
+ "description": "Free text that explains the field to the people who fill it in."
129
+ },
130
+ "required": {
131
+ "type": "boolean",
132
+ "description": "A new record must set this field, and an update may not clear it."
133
+ },
134
+ "unique": {
135
+ "anyOf": [
136
+ {
137
+ "type": "boolean"
138
+ },
139
+ {
140
+ "type": "string",
141
+ "const": "collection"
142
+ }
143
+ ],
144
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
145
+ },
146
+ "default": {
147
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
148
+ },
149
+ "max_length": {
150
+ "type": "integer",
151
+ "minimum": 1,
152
+ "maximum": 100000,
153
+ "description": "Longest value in characters. Default 10000, at most 100000."
154
+ },
155
+ "searchable": {
156
+ "type": "boolean",
157
+ "description": "Include this field in the `search` of record lists."
158
+ }
159
+ },
160
+ "required": [
161
+ "type"
162
+ ],
163
+ "additionalProperties": false
164
+ },
165
+ {
166
+ "type": "object",
167
+ "properties": {
168
+ "type": {
169
+ "type": "string",
170
+ "const": "number"
171
+ },
172
+ "label": {
173
+ "type": "string",
174
+ "maxLength": 120,
175
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
176
+ },
177
+ "description": {
178
+ "type": "string",
179
+ "maxLength": 1000,
180
+ "description": "Free text that explains the field to the people who fill it in."
181
+ },
182
+ "required": {
183
+ "type": "boolean",
184
+ "description": "A new record must set this field, and an update may not clear it."
185
+ },
186
+ "unique": {
187
+ "anyOf": [
188
+ {
189
+ "type": "boolean"
190
+ },
191
+ {
192
+ "type": "string",
193
+ "const": "collection"
194
+ }
195
+ ],
196
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
197
+ },
198
+ "default": {
199
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
200
+ },
201
+ "integer": {
202
+ "type": "boolean",
203
+ "description": "Accept whole numbers only."
204
+ },
205
+ "min": {
206
+ "type": "number",
207
+ "description": "Smallest accepted value."
208
+ },
209
+ "max": {
210
+ "type": "number",
211
+ "description": "Largest accepted value."
212
+ },
213
+ "unit": {
214
+ "type": "string",
215
+ "description": "A unit to show next to the value, such as `m` or `rad/s`. Display only; nothing converts values."
216
+ }
217
+ },
218
+ "required": [
219
+ "type"
220
+ ],
221
+ "additionalProperties": false
222
+ },
223
+ {
224
+ "type": "object",
225
+ "properties": {
226
+ "type": {
227
+ "type": "string",
228
+ "const": "boolean"
229
+ },
230
+ "label": {
231
+ "type": "string",
232
+ "maxLength": 120,
233
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
234
+ },
235
+ "description": {
236
+ "type": "string",
237
+ "maxLength": 1000,
238
+ "description": "Free text that explains the field to the people who fill it in."
239
+ },
240
+ "required": {
241
+ "type": "boolean",
242
+ "description": "A new record must set this field, and an update may not clear it."
243
+ },
244
+ "unique": {
245
+ "anyOf": [
246
+ {
247
+ "type": "boolean"
248
+ },
249
+ {
250
+ "type": "string",
251
+ "const": "collection"
252
+ }
253
+ ],
254
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
255
+ },
256
+ "default": {
257
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
258
+ }
259
+ },
260
+ "required": [
261
+ "type"
262
+ ],
263
+ "additionalProperties": false
264
+ },
265
+ {
266
+ "type": "object",
267
+ "properties": {
268
+ "type": {
269
+ "type": "string",
270
+ "const": "select"
271
+ },
272
+ "label": {
273
+ "type": "string",
274
+ "maxLength": 120,
275
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
276
+ },
277
+ "description": {
278
+ "type": "string",
279
+ "maxLength": 1000,
280
+ "description": "Free text that explains the field to the people who fill it in."
281
+ },
282
+ "required": {
283
+ "type": "boolean",
284
+ "description": "A new record must set this field, and an update may not clear it."
285
+ },
286
+ "unique": {
287
+ "anyOf": [
288
+ {
289
+ "type": "boolean"
290
+ },
291
+ {
292
+ "type": "string",
293
+ "const": "collection"
294
+ }
295
+ ],
296
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
297
+ },
298
+ "default": {
299
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
300
+ },
301
+ "options": {
302
+ "minItems": 1,
303
+ "maxItems": 500,
304
+ "type": "array",
305
+ "items": {
306
+ "type": "object",
307
+ "properties": {
308
+ "value": {
309
+ "type": "string",
310
+ "minLength": 1,
311
+ "maxLength": 200,
312
+ "description": "What is stored in records and used in filters."
313
+ },
314
+ "label": {
315
+ "type": "string",
316
+ "description": "What people see instead of the value."
317
+ }
318
+ },
319
+ "required": [
320
+ "value"
321
+ ],
322
+ "additionalProperties": false
323
+ },
324
+ "description": "The accepted values, 1 to 500. Two options may not share a value."
325
+ },
326
+ "multiple": {
327
+ "type": "boolean",
328
+ "description": "Hold a list of distinct options instead of one."
329
+ },
330
+ "searchable": {
331
+ "type": "boolean",
332
+ "description": "Include the values and labels of the chosen options in the `search` of record lists."
333
+ }
334
+ },
335
+ "required": [
336
+ "type",
337
+ "options"
338
+ ],
339
+ "additionalProperties": false
340
+ },
341
+ {
342
+ "type": "object",
343
+ "properties": {
344
+ "type": {
345
+ "type": "string",
346
+ "const": "date"
347
+ },
348
+ "label": {
349
+ "type": "string",
350
+ "maxLength": 120,
351
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
352
+ },
353
+ "description": {
354
+ "type": "string",
355
+ "maxLength": 1000,
356
+ "description": "Free text that explains the field to the people who fill it in."
357
+ },
358
+ "required": {
359
+ "type": "boolean",
360
+ "description": "A new record must set this field, and an update may not clear it."
361
+ },
362
+ "unique": {
363
+ "anyOf": [
364
+ {
365
+ "type": "boolean"
366
+ },
367
+ {
368
+ "type": "string",
369
+ "const": "collection"
370
+ }
371
+ ],
372
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
373
+ },
374
+ "default": {
375
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
376
+ }
377
+ },
378
+ "required": [
379
+ "type"
380
+ ],
381
+ "additionalProperties": false
382
+ },
383
+ {
384
+ "type": "object",
385
+ "properties": {
386
+ "type": {
387
+ "type": "string",
388
+ "const": "datetime"
389
+ },
390
+ "label": {
391
+ "type": "string",
392
+ "maxLength": 120,
393
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
394
+ },
395
+ "description": {
396
+ "type": "string",
397
+ "maxLength": 1000,
398
+ "description": "Free text that explains the field to the people who fill it in."
399
+ },
400
+ "required": {
401
+ "type": "boolean",
402
+ "description": "A new record must set this field, and an update may not clear it."
403
+ },
404
+ "unique": {
405
+ "anyOf": [
406
+ {
407
+ "type": "boolean"
408
+ },
409
+ {
410
+ "type": "string",
411
+ "const": "collection"
412
+ }
413
+ ],
414
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
415
+ },
416
+ "default": {
417
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
418
+ }
419
+ },
420
+ "required": [
421
+ "type"
422
+ ],
423
+ "additionalProperties": false
424
+ },
425
+ {
426
+ "type": "object",
427
+ "properties": {
428
+ "type": {
429
+ "type": "string",
430
+ "const": "json"
431
+ },
432
+ "label": {
433
+ "type": "string",
434
+ "maxLength": 120,
435
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
436
+ },
437
+ "description": {
438
+ "type": "string",
439
+ "maxLength": 1000,
440
+ "description": "Free text that explains the field to the people who fill it in."
441
+ },
442
+ "required": {
443
+ "type": "boolean",
444
+ "description": "A new record must set this field, and an update may not clear it."
445
+ },
446
+ "unique": {
447
+ "anyOf": [
448
+ {
449
+ "type": "boolean"
450
+ },
451
+ {
452
+ "type": "string",
453
+ "const": "collection"
454
+ }
455
+ ],
456
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
457
+ },
458
+ "default": {
459
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
460
+ },
461
+ "schema": {
462
+ "anyOf": [
463
+ {
464
+ "type": "string"
465
+ },
466
+ {
467
+ "type": "object",
468
+ "propertyNames": {
469
+ "type": "string"
470
+ },
471
+ "additionalProperties": {}
472
+ }
473
+ ],
474
+ "description": "What the value must look like: the name of a built-in template (`pose2d`, `point2d`, `polygon2d`, `range1d`) or an inline JSON Schema (draft 2020-12). Without it any JSON value is accepted."
475
+ }
476
+ },
477
+ "required": [
478
+ "type"
479
+ ],
480
+ "additionalProperties": false
481
+ },
482
+ {
483
+ "type": "object",
484
+ "properties": {
485
+ "type": {
486
+ "type": "string",
487
+ "const": "reference"
488
+ },
489
+ "label": {
490
+ "type": "string",
491
+ "maxLength": 120,
492
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
493
+ },
494
+ "description": {
495
+ "type": "string",
496
+ "maxLength": 1000,
497
+ "description": "Free text that explains the field to the people who fill it in."
498
+ },
499
+ "required": {
500
+ "type": "boolean",
501
+ "description": "A new record must set this field, and an update may not clear it."
502
+ },
503
+ "unique": {
504
+ "anyOf": [
505
+ {
506
+ "type": "boolean"
507
+ },
508
+ {
509
+ "type": "string",
510
+ "const": "collection"
511
+ }
512
+ ],
513
+ "description": "`true`: no two records hold the same value, within the collection (`global`) or within one robot (`per_robot`, `one_per_robot`). `collection`: on a robot-bound collection, across all robots. Empty values never collide. Not allowed on `boolean` and `json` fields."
514
+ },
515
+ "default": {
516
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
517
+ },
518
+ "to": {
519
+ "type": "string",
520
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
521
+ "description": "The key of the collection whose records this field points at. It must be a collection of the same document."
522
+ },
523
+ "on_delete": {
524
+ "type": "string",
525
+ "enum": [
526
+ "prevent",
527
+ "clear"
528
+ ],
529
+ "description": "`prevent` (the default): a record that other records point at cannot be deleted. `clear`: deleting it clears the reference in the records that pointed at it."
530
+ }
531
+ },
532
+ "required": [
533
+ "type",
534
+ "to"
535
+ ],
536
+ "additionalProperties": false
537
+ }
538
+ ]
539
+ }
540
+ },
541
+ "can": {
542
+ "type": "object",
543
+ "properties": {
544
+ "read": {
545
+ "type": "boolean"
546
+ },
547
+ "create": {
548
+ "type": "boolean"
549
+ },
550
+ "update": {
551
+ "anyOf": [
552
+ {
553
+ "type": "string",
554
+ "enum": [
555
+ "all",
556
+ "own"
557
+ ]
558
+ },
559
+ {
560
+ "type": "boolean",
561
+ "const": false
562
+ }
563
+ ],
564
+ "description": "`all`: any record. `own`: only records the caller created. `false`: none."
565
+ },
566
+ "delete": {
567
+ "anyOf": [
568
+ {
569
+ "type": "string",
570
+ "enum": [
571
+ "all",
572
+ "own"
573
+ ]
574
+ },
575
+ {
576
+ "type": "boolean",
577
+ "const": false
578
+ }
579
+ ],
580
+ "description": "`all`: any record. `own`: only records the caller created. `false`: none."
581
+ }
582
+ },
583
+ "required": [
584
+ "read",
585
+ "create",
586
+ "update",
587
+ "delete"
588
+ ],
589
+ "additionalProperties": false,
590
+ "description": "What the caller may do with the records of this collection."
591
+ }
592
+ },
593
+ "required": [
594
+ "key",
595
+ "label",
596
+ "description",
597
+ "binding",
598
+ "display",
599
+ "fields",
600
+ "can"
601
+ ],
602
+ "additionalProperties": false
603
+ }
604
+ }
605
+ },
606
+ "required": [
607
+ "version",
608
+ "collections"
609
+ ],
610
+ "additionalProperties": false,
611
+ "description": "The collections the caller may read, with their field definitions and the caller's rights."
612
+ }