@fleetless/contracts 14.0.0 → 15.0.1

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 (126) hide show
  1. package/CHANGELOG.md +184 -0
  2. package/artifacts/openapi.json +20210 -11764
  3. package/artifacts/routes.json +1160 -39
  4. package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
  5. package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
  6. package/artifacts/schema/app-deletion-summary.schema.json +15 -1
  7. package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
  8. package/artifacts/schema/billing-change-response.schema.json +9 -8
  9. package/artifacts/schema/checkout-response.schema.json +6 -6
  10. package/artifacts/schema/cloud-config.schema.json +5 -5
  11. package/artifacts/schema/collection-actor.schema.json +35 -0
  12. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  13. package/artifacts/schema/collection-event.schema.json +216 -0
  14. package/artifacts/schema/collection-export-query.schema.json +56 -0
  15. package/artifacts/schema/collection-filter.schema.json +9 -0
  16. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  17. package/artifacts/schema/collection-import-request.schema.json +105 -0
  18. package/artifacts/schema/collection-import-result.schema.json +38 -0
  19. package/artifacts/schema/collection-list-response.schema.json +119 -0
  20. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  21. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  22. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  23. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  24. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  25. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  26. package/artifacts/schema/collection-record-write.schema.json +31 -0
  27. package/artifacts/schema/collection-record.schema.json +180 -0
  28. package/artifacts/schema/collection-revision.schema.json +295 -0
  29. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  30. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  31. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  32. package/artifacts/schema/collection-summary.schema.json +92 -0
  33. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  34. package/artifacts/schema/collections-access-change.schema.json +34 -0
  35. package/artifacts/schema/collections-document.schema.json +732 -0
  36. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  37. package/artifacts/schema/collections-effect.schema.json +384 -0
  38. package/artifacts/schema/collections-issue.schema.json +36 -0
  39. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  40. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  41. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  42. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  43. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  44. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  45. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  46. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  47. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  48. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  49. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  50. package/artifacts/schema/collections-version-response.schema.json +869 -0
  51. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  52. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  53. package/artifacts/schema/config-draft-response.schema.json +5 -5
  54. package/artifacts/schema/config-version-response.schema.json +5 -5
  55. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  56. package/artifacts/schema/dangling-reference.schema.json +7 -6
  57. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  58. package/artifacts/schema/effective-rights-response.schema.json +87 -1
  59. package/artifacts/schema/org-plan.schema.json +29 -1
  60. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  61. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  62. package/artifacts/schema/org-quotas.schema.json +29 -1
  63. package/artifacts/schema/org-role-list-response.schema.json +8 -7
  64. package/artifacts/schema/org-role.schema.json +1 -1
  65. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  66. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  67. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  68. package/artifacts/schema/plan-limits.schema.json +29 -1
  69. package/artifacts/schema/plan-overrides.schema.json +26 -0
  70. package/artifacts/schema/purchase-conflict-details.schema.json +6 -6
  71. package/artifacts/schema/purchase-intent-draft.schema.json +5 -5
  72. package/artifacts/schema/purchase-intent-payment-started.schema.json +1 -1
  73. package/artifacts/schema/purchase-intent-response.schema.json +10 -9
  74. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  75. package/artifacts/schema/record-changed-details.schema.json +16 -0
  76. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  77. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  78. package/artifacts/schema/reference-place.schema.json +7 -6
  79. package/artifacts/schema/required-missing-details.schema.json +19 -0
  80. package/artifacts/schema/robot-config-doc.schema.json +5 -5
  81. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  82. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  83. package/artifacts/schema/role-rename-preview.schema.json +7 -6
  84. package/dist/apps.d.ts +18 -2
  85. package/dist/apps.js +12 -2
  86. package/dist/audit.d.ts +32 -2
  87. package/dist/audit.js +40 -2
  88. package/dist/billing.js +12 -3
  89. package/dist/collections-issues.d.ts +67 -0
  90. package/dist/collections-issues.js +340 -0
  91. package/dist/collections-records.d.ts +562 -0
  92. package/dist/collections-records.js +525 -0
  93. package/dist/collections-rights.d.ts +17 -0
  94. package/dist/collections-rights.js +41 -0
  95. package/dist/collections-schema.d.ts +1064 -0
  96. package/dist/collections-schema.js +386 -0
  97. package/dist/collections-templates.d.ts +55 -0
  98. package/dist/collections-templates.js +137 -0
  99. package/dist/collections-transfer.d.ts +101 -0
  100. package/dist/collections-transfer.js +206 -0
  101. package/dist/collections-values.d.ts +67 -0
  102. package/dist/collections-values.js +284 -0
  103. package/dist/collections.d.ts +568 -0
  104. package/dist/collections.js +332 -0
  105. package/dist/config.d.ts +8 -8
  106. package/dist/config.js +13 -13
  107. package/dist/errors.d.ts +50 -1
  108. package/dist/errors.js +117 -2
  109. package/dist/index.d.ts +24 -8
  110. package/dist/index.js +13 -3
  111. package/dist/org-roles.d.ts +4 -0
  112. package/dist/org-roles.js +10 -9
  113. package/dist/plans.d.ts +22 -2
  114. package/dist/plans.js +26 -4
  115. package/dist/realtime.d.ts +166 -0
  116. package/dist/realtime.js +163 -0
  117. package/dist/rest.d.ts +28 -28
  118. package/dist/rest.js +39 -27
  119. package/dist/rights.d.ts +2 -2
  120. package/dist/rights.js +1 -1
  121. package/dist/routes.d.ts +1 -1
  122. package/dist/routes.js +495 -21
  123. package/package.json +1 -1
  124. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  125. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  126. package/artifacts/schema/robot-details-doc.schema.json +0 -33
@@ -0,0 +1,869 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "version": {
6
+ "type": "integer",
7
+ "minimum": 1,
8
+ "maximum": 9007199254740991
9
+ },
10
+ "published_at": {
11
+ "type": "string",
12
+ "format": "date-time",
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
+ "published_by": {
16
+ "type": "object",
17
+ "properties": {
18
+ "kind": {
19
+ "type": "string",
20
+ "enum": [
21
+ "developer",
22
+ "app_user",
23
+ "server_key",
24
+ "fleetless"
25
+ ],
26
+ "description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
27
+ },
28
+ "id": {
29
+ "type": "string",
30
+ "format": "uuid",
31
+ "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)$",
32
+ "description": "The id of the developer, app user or server key. The nil id for the platform."
33
+ },
34
+ "label": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 200,
38
+ "description": "A name to show: the person's display name, the name of a server key, `Fleetless`, `Deleted user` when the user no longer exists, or `Deleted key` when the key does. A person without a display name reads as their email address to a developer or a server key and to themselves, and to an app user reading someone else as `Team member` (a developer) or `User` (an app user): an app user never learns another person's address."
39
+ }
40
+ },
41
+ "required": [
42
+ "kind",
43
+ "id",
44
+ "label"
45
+ ],
46
+ "additionalProperties": false,
47
+ "description": "Who or what made a change to a record."
48
+ },
49
+ "effect_counts": {
50
+ "type": "object",
51
+ "propertyNames": {
52
+ "type": "string"
53
+ },
54
+ "additionalProperties": {
55
+ "type": "integer",
56
+ "minimum": 0,
57
+ "maximum": 9007199254740991
58
+ },
59
+ "description": "For each kind of effect the publish had, how many records or values it touched, by effect `kind`. Empty when it had none."
60
+ },
61
+ "restored_from": {
62
+ "anyOf": [
63
+ {
64
+ "type": "integer",
65
+ "minimum": 1,
66
+ "maximum": 9007199254740991
67
+ },
68
+ {
69
+ "type": "null"
70
+ }
71
+ ],
72
+ "description": "The version this one restored. Null for an ordinary publish."
73
+ },
74
+ "restore_with_data": {
75
+ "type": "boolean",
76
+ "description": "Whether restoring this version can also put records back: its restore point is at most 90 days old, has not been purged, and it is not the current version."
77
+ },
78
+ "with_data": {
79
+ "type": "boolean",
80
+ "description": "Whether this version came from a restore that also put records back. `false` for an ordinary publish and for a restore of the document alone."
81
+ },
82
+ "reverted_totals": {
83
+ "anyOf": [
84
+ {
85
+ "type": "object",
86
+ "properties": {
87
+ "changes": {
88
+ "type": "integer",
89
+ "minimum": 0,
90
+ "maximum": 9007199254740991,
91
+ "description": "Changes made since the restore point that were reverted."
92
+ },
93
+ "records_back": {
94
+ "type": "integer",
95
+ "minimum": 0,
96
+ "maximum": 9007199254740991,
97
+ "description": "Deleted records that came back."
98
+ },
99
+ "records_deleted": {
100
+ "type": "integer",
101
+ "minimum": 0,
102
+ "maximum": 9007199254740991,
103
+ "description": "Records created since the restore point that were deleted."
104
+ },
105
+ "robots_gone": {
106
+ "type": "integer",
107
+ "minimum": 0,
108
+ "maximum": 9007199254740991,
109
+ "description": "Records of robots that were deleted since, which could not come back."
110
+ }
111
+ },
112
+ "required": [
113
+ "changes",
114
+ "records_back",
115
+ "records_deleted",
116
+ "robots_gone"
117
+ ],
118
+ "additionalProperties": false
119
+ },
120
+ {
121
+ "type": "null"
122
+ }
123
+ ],
124
+ "description": "What putting the records back did, in all the collections together, so that the history of versions can say what came back. Null unless `with_data`."
125
+ },
126
+ "source": {
127
+ "type": "string",
128
+ "description": "The document as it was published, as text."
129
+ },
130
+ "doc": {
131
+ "type": "object",
132
+ "properties": {
133
+ "format": {
134
+ "type": "number",
135
+ "const": 1,
136
+ "description": "The document format version. Always 1."
137
+ },
138
+ "collections": {
139
+ "description": "The collections of the app by key, at most 50. Nothing under `collections:` (null) means none.",
140
+ "type": "object",
141
+ "propertyNames": {
142
+ "type": "string",
143
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
144
+ "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."
145
+ },
146
+ "additionalProperties": {
147
+ "type": "object",
148
+ "properties": {
149
+ "label": {
150
+ "type": "string",
151
+ "description": "A name for people to read. It may change at any time; the key is what code uses."
152
+ },
153
+ "description": {
154
+ "type": "string",
155
+ "description": "Free text that explains the collection to people."
156
+ },
157
+ "binding": {
158
+ "type": "string",
159
+ "enum": [
160
+ "global",
161
+ "per_robot",
162
+ "one_per_robot"
163
+ ],
164
+ "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."
165
+ },
166
+ "display": {
167
+ "type": "string",
168
+ "description": "A template that names a record in lists, references and titles, for example `{{name}} ({{location.name}})`. A placeholder is a field of this collection, a system field (`id`, `created_at`, `created_by`, `updated_at`, `updated_by`, `revision`, and `robot_id` on robot-bound collections), `robot.name` on robot-bound collections, or `<reference field>.<field of the target>`."
169
+ },
170
+ "access": {
171
+ "type": "object",
172
+ "properties": {
173
+ "read": {
174
+ "anyOf": [
175
+ {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 63
179
+ },
180
+ {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "string",
184
+ "minLength": 1,
185
+ "maxLength": 63
186
+ }
187
+ }
188
+ ],
189
+ "description": "Roles that may read records."
190
+ },
191
+ "create": {
192
+ "anyOf": [
193
+ {
194
+ "type": "string",
195
+ "minLength": 1,
196
+ "maxLength": 63
197
+ },
198
+ {
199
+ "type": "array",
200
+ "items": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 63
204
+ }
205
+ }
206
+ ],
207
+ "description": "Roles that may create records. Has no effect on `one_per_robot` collections, whose records Fleetless creates."
208
+ },
209
+ "update": {
210
+ "anyOf": [
211
+ {
212
+ "anyOf": [
213
+ {
214
+ "type": "string",
215
+ "minLength": 1,
216
+ "maxLength": 63
217
+ },
218
+ {
219
+ "type": "array",
220
+ "items": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "maxLength": 63
224
+ }
225
+ }
226
+ ],
227
+ "description": "The key of an organization role, or a list of keys. A key that names no role grants nothing."
228
+ },
229
+ {
230
+ "type": "object",
231
+ "properties": {
232
+ "all": {
233
+ "anyOf": [
234
+ {
235
+ "type": "string",
236
+ "minLength": 1,
237
+ "maxLength": 63
238
+ },
239
+ {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "string",
243
+ "minLength": 1,
244
+ "maxLength": 63
245
+ }
246
+ }
247
+ ],
248
+ "description": "Roles that may do this to every record."
249
+ },
250
+ "own": {
251
+ "anyOf": [
252
+ {
253
+ "type": "string",
254
+ "minLength": 1,
255
+ "maxLength": 63
256
+ },
257
+ {
258
+ "type": "array",
259
+ "items": {
260
+ "type": "string",
261
+ "minLength": 1,
262
+ "maxLength": 63
263
+ }
264
+ }
265
+ ],
266
+ "description": "Roles that may do this only to records they created themselves."
267
+ }
268
+ },
269
+ "additionalProperties": false
270
+ }
271
+ ],
272
+ "description": "Roles that may change records: a role key, a list, or `{ all, own }` to tell every record from the ones a role created itself."
273
+ },
274
+ "delete": {
275
+ "anyOf": [
276
+ {
277
+ "anyOf": [
278
+ {
279
+ "type": "string",
280
+ "minLength": 1,
281
+ "maxLength": 63
282
+ },
283
+ {
284
+ "type": "array",
285
+ "items": {
286
+ "type": "string",
287
+ "minLength": 1,
288
+ "maxLength": 63
289
+ }
290
+ }
291
+ ],
292
+ "description": "The key of an organization role, or a list of keys. A key that names no role grants nothing."
293
+ },
294
+ {
295
+ "type": "object",
296
+ "properties": {
297
+ "all": {
298
+ "anyOf": [
299
+ {
300
+ "type": "string",
301
+ "minLength": 1,
302
+ "maxLength": 63
303
+ },
304
+ {
305
+ "type": "array",
306
+ "items": {
307
+ "type": "string",
308
+ "minLength": 1,
309
+ "maxLength": 63
310
+ }
311
+ }
312
+ ],
313
+ "description": "Roles that may do this to every record."
314
+ },
315
+ "own": {
316
+ "anyOf": [
317
+ {
318
+ "type": "string",
319
+ "minLength": 1,
320
+ "maxLength": 63
321
+ },
322
+ {
323
+ "type": "array",
324
+ "items": {
325
+ "type": "string",
326
+ "minLength": 1,
327
+ "maxLength": 63
328
+ }
329
+ }
330
+ ],
331
+ "description": "Roles that may do this only to records they created themselves."
332
+ }
333
+ },
334
+ "additionalProperties": false
335
+ }
336
+ ],
337
+ "description": "Roles that may delete records: a role key, a list, or `{ all, own }`. Has no effect on `one_per_robot` collections, whose records are never deleted through the API."
338
+ }
339
+ },
340
+ "additionalProperties": false,
341
+ "description": "Which roles may read, create, update and delete the records of this collection. A missing key grants that action to nobody; developers and server keys can always do everything."
342
+ },
343
+ "fields": {
344
+ "type": "object",
345
+ "propertyNames": {
346
+ "type": "string",
347
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
348
+ "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."
349
+ },
350
+ "additionalProperties": {
351
+ "oneOf": [
352
+ {
353
+ "type": "object",
354
+ "properties": {
355
+ "type": {
356
+ "type": "string",
357
+ "const": "text"
358
+ },
359
+ "label": {
360
+ "type": "string",
361
+ "maxLength": 120,
362
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
363
+ },
364
+ "description": {
365
+ "type": "string",
366
+ "maxLength": 1000,
367
+ "description": "Free text that explains the field to the people who fill it in."
368
+ },
369
+ "required": {
370
+ "type": "boolean",
371
+ "description": "A new record must set this field, and an update may not clear it."
372
+ },
373
+ "unique": {
374
+ "anyOf": [
375
+ {
376
+ "type": "boolean"
377
+ },
378
+ {
379
+ "type": "string",
380
+ "const": "collection"
381
+ }
382
+ ],
383
+ "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."
384
+ },
385
+ "default": {
386
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
387
+ },
388
+ "max_length": {
389
+ "type": "integer",
390
+ "minimum": 1,
391
+ "maximum": 1000,
392
+ "description": "Longest value in characters. Default 255, at most 1000."
393
+ },
394
+ "pattern": {
395
+ "type": "string",
396
+ "maxLength": 1000,
397
+ "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."
398
+ },
399
+ "searchable": {
400
+ "type": "boolean",
401
+ "description": "Include this field in the `search` of record lists."
402
+ }
403
+ },
404
+ "required": [
405
+ "type"
406
+ ],
407
+ "additionalProperties": false
408
+ },
409
+ {
410
+ "type": "object",
411
+ "properties": {
412
+ "type": {
413
+ "type": "string",
414
+ "const": "long_text"
415
+ },
416
+ "label": {
417
+ "type": "string",
418
+ "maxLength": 120,
419
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
420
+ },
421
+ "description": {
422
+ "type": "string",
423
+ "maxLength": 1000,
424
+ "description": "Free text that explains the field to the people who fill it in."
425
+ },
426
+ "required": {
427
+ "type": "boolean",
428
+ "description": "A new record must set this field, and an update may not clear it."
429
+ },
430
+ "unique": {
431
+ "anyOf": [
432
+ {
433
+ "type": "boolean"
434
+ },
435
+ {
436
+ "type": "string",
437
+ "const": "collection"
438
+ }
439
+ ],
440
+ "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."
441
+ },
442
+ "default": {
443
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
444
+ },
445
+ "max_length": {
446
+ "type": "integer",
447
+ "minimum": 1,
448
+ "maximum": 100000,
449
+ "description": "Longest value in characters. Default 10000, at most 100000."
450
+ },
451
+ "searchable": {
452
+ "type": "boolean",
453
+ "description": "Include this field in the `search` of record lists."
454
+ }
455
+ },
456
+ "required": [
457
+ "type"
458
+ ],
459
+ "additionalProperties": false
460
+ },
461
+ {
462
+ "type": "object",
463
+ "properties": {
464
+ "type": {
465
+ "type": "string",
466
+ "const": "number"
467
+ },
468
+ "label": {
469
+ "type": "string",
470
+ "maxLength": 120,
471
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
472
+ },
473
+ "description": {
474
+ "type": "string",
475
+ "maxLength": 1000,
476
+ "description": "Free text that explains the field to the people who fill it in."
477
+ },
478
+ "required": {
479
+ "type": "boolean",
480
+ "description": "A new record must set this field, and an update may not clear it."
481
+ },
482
+ "unique": {
483
+ "anyOf": [
484
+ {
485
+ "type": "boolean"
486
+ },
487
+ {
488
+ "type": "string",
489
+ "const": "collection"
490
+ }
491
+ ],
492
+ "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."
493
+ },
494
+ "default": {
495
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
496
+ },
497
+ "integer": {
498
+ "type": "boolean",
499
+ "description": "Accept whole numbers only."
500
+ },
501
+ "min": {
502
+ "type": "number",
503
+ "description": "Smallest accepted value."
504
+ },
505
+ "max": {
506
+ "type": "number",
507
+ "description": "Largest accepted value."
508
+ },
509
+ "unit": {
510
+ "type": "string",
511
+ "description": "A unit to show next to the value, such as `m` or `rad/s`. Display only; nothing converts values."
512
+ }
513
+ },
514
+ "required": [
515
+ "type"
516
+ ],
517
+ "additionalProperties": false
518
+ },
519
+ {
520
+ "type": "object",
521
+ "properties": {
522
+ "type": {
523
+ "type": "string",
524
+ "const": "boolean"
525
+ },
526
+ "label": {
527
+ "type": "string",
528
+ "maxLength": 120,
529
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
530
+ },
531
+ "description": {
532
+ "type": "string",
533
+ "maxLength": 1000,
534
+ "description": "Free text that explains the field to the people who fill it in."
535
+ },
536
+ "required": {
537
+ "type": "boolean",
538
+ "description": "A new record must set this field, and an update may not clear it."
539
+ },
540
+ "unique": {
541
+ "anyOf": [
542
+ {
543
+ "type": "boolean"
544
+ },
545
+ {
546
+ "type": "string",
547
+ "const": "collection"
548
+ }
549
+ ],
550
+ "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."
551
+ },
552
+ "default": {
553
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
554
+ }
555
+ },
556
+ "required": [
557
+ "type"
558
+ ],
559
+ "additionalProperties": false
560
+ },
561
+ {
562
+ "type": "object",
563
+ "properties": {
564
+ "type": {
565
+ "type": "string",
566
+ "const": "select"
567
+ },
568
+ "label": {
569
+ "type": "string",
570
+ "maxLength": 120,
571
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
572
+ },
573
+ "description": {
574
+ "type": "string",
575
+ "maxLength": 1000,
576
+ "description": "Free text that explains the field to the people who fill it in."
577
+ },
578
+ "required": {
579
+ "type": "boolean",
580
+ "description": "A new record must set this field, and an update may not clear it."
581
+ },
582
+ "unique": {
583
+ "anyOf": [
584
+ {
585
+ "type": "boolean"
586
+ },
587
+ {
588
+ "type": "string",
589
+ "const": "collection"
590
+ }
591
+ ],
592
+ "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."
593
+ },
594
+ "default": {
595
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
596
+ },
597
+ "options": {
598
+ "minItems": 1,
599
+ "maxItems": 500,
600
+ "type": "array",
601
+ "items": {
602
+ "type": "object",
603
+ "properties": {
604
+ "value": {
605
+ "type": "string",
606
+ "minLength": 1,
607
+ "maxLength": 200,
608
+ "description": "What is stored in records and used in filters."
609
+ },
610
+ "label": {
611
+ "type": "string",
612
+ "description": "What people see instead of the value."
613
+ }
614
+ },
615
+ "required": [
616
+ "value"
617
+ ],
618
+ "additionalProperties": false
619
+ },
620
+ "description": "The accepted values, 1 to 500. Two options may not share a value."
621
+ },
622
+ "multiple": {
623
+ "type": "boolean",
624
+ "description": "Hold a list of distinct options instead of one."
625
+ },
626
+ "searchable": {
627
+ "type": "boolean",
628
+ "description": "Include the values and labels of the chosen options in the `search` of record lists."
629
+ }
630
+ },
631
+ "required": [
632
+ "type",
633
+ "options"
634
+ ],
635
+ "additionalProperties": false
636
+ },
637
+ {
638
+ "type": "object",
639
+ "properties": {
640
+ "type": {
641
+ "type": "string",
642
+ "const": "date"
643
+ },
644
+ "label": {
645
+ "type": "string",
646
+ "maxLength": 120,
647
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
648
+ },
649
+ "description": {
650
+ "type": "string",
651
+ "maxLength": 1000,
652
+ "description": "Free text that explains the field to the people who fill it in."
653
+ },
654
+ "required": {
655
+ "type": "boolean",
656
+ "description": "A new record must set this field, and an update may not clear it."
657
+ },
658
+ "unique": {
659
+ "anyOf": [
660
+ {
661
+ "type": "boolean"
662
+ },
663
+ {
664
+ "type": "string",
665
+ "const": "collection"
666
+ }
667
+ ],
668
+ "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."
669
+ },
670
+ "default": {
671
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
672
+ }
673
+ },
674
+ "required": [
675
+ "type"
676
+ ],
677
+ "additionalProperties": false
678
+ },
679
+ {
680
+ "type": "object",
681
+ "properties": {
682
+ "type": {
683
+ "type": "string",
684
+ "const": "datetime"
685
+ },
686
+ "label": {
687
+ "type": "string",
688
+ "maxLength": 120,
689
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
690
+ },
691
+ "description": {
692
+ "type": "string",
693
+ "maxLength": 1000,
694
+ "description": "Free text that explains the field to the people who fill it in."
695
+ },
696
+ "required": {
697
+ "type": "boolean",
698
+ "description": "A new record must set this field, and an update may not clear it."
699
+ },
700
+ "unique": {
701
+ "anyOf": [
702
+ {
703
+ "type": "boolean"
704
+ },
705
+ {
706
+ "type": "string",
707
+ "const": "collection"
708
+ }
709
+ ],
710
+ "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."
711
+ },
712
+ "default": {
713
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
714
+ }
715
+ },
716
+ "required": [
717
+ "type"
718
+ ],
719
+ "additionalProperties": false
720
+ },
721
+ {
722
+ "type": "object",
723
+ "properties": {
724
+ "type": {
725
+ "type": "string",
726
+ "const": "json"
727
+ },
728
+ "label": {
729
+ "type": "string",
730
+ "maxLength": 120,
731
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
732
+ },
733
+ "description": {
734
+ "type": "string",
735
+ "maxLength": 1000,
736
+ "description": "Free text that explains the field to the people who fill it in."
737
+ },
738
+ "required": {
739
+ "type": "boolean",
740
+ "description": "A new record must set this field, and an update may not clear it."
741
+ },
742
+ "unique": {
743
+ "anyOf": [
744
+ {
745
+ "type": "boolean"
746
+ },
747
+ {
748
+ "type": "string",
749
+ "const": "collection"
750
+ }
751
+ ],
752
+ "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."
753
+ },
754
+ "default": {
755
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
756
+ },
757
+ "schema": {
758
+ "anyOf": [
759
+ {
760
+ "type": "string"
761
+ },
762
+ {
763
+ "type": "object",
764
+ "propertyNames": {
765
+ "type": "string"
766
+ },
767
+ "additionalProperties": {}
768
+ }
769
+ ],
770
+ "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."
771
+ }
772
+ },
773
+ "required": [
774
+ "type"
775
+ ],
776
+ "additionalProperties": false
777
+ },
778
+ {
779
+ "type": "object",
780
+ "properties": {
781
+ "type": {
782
+ "type": "string",
783
+ "const": "reference"
784
+ },
785
+ "label": {
786
+ "type": "string",
787
+ "maxLength": 120,
788
+ "description": "A short name for people to read. It may change at any time; the key is what code uses."
789
+ },
790
+ "description": {
791
+ "type": "string",
792
+ "maxLength": 1000,
793
+ "description": "Free text that explains the field to the people who fill it in."
794
+ },
795
+ "required": {
796
+ "type": "boolean",
797
+ "description": "A new record must set this field, and an update may not clear it."
798
+ },
799
+ "unique": {
800
+ "anyOf": [
801
+ {
802
+ "type": "boolean"
803
+ },
804
+ {
805
+ "type": "string",
806
+ "const": "collection"
807
+ }
808
+ ],
809
+ "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."
810
+ },
811
+ "default": {
812
+ "description": "The value a record gets when it does not set this field. It must itself be a valid value of the field."
813
+ },
814
+ "to": {
815
+ "type": "string",
816
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
817
+ "description": "The key of the collection whose records this field points at. It must be a collection of the same document."
818
+ },
819
+ "on_delete": {
820
+ "type": "string",
821
+ "enum": [
822
+ "prevent",
823
+ "clear"
824
+ ],
825
+ "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."
826
+ }
827
+ },
828
+ "required": [
829
+ "type",
830
+ "to"
831
+ ],
832
+ "additionalProperties": false
833
+ }
834
+ ]
835
+ },
836
+ "description": "The fields of a record, at most 100. Their order is the order of the record form."
837
+ }
838
+ },
839
+ "required": [
840
+ "binding",
841
+ "fields"
842
+ ],
843
+ "additionalProperties": false
844
+ }
845
+ }
846
+ },
847
+ "required": [
848
+ "format",
849
+ "collections"
850
+ ],
851
+ "additionalProperties": false,
852
+ "description": "The data model of an app: its collections, their fields, and who may use them."
853
+ }
854
+ },
855
+ "required": [
856
+ "version",
857
+ "published_at",
858
+ "published_by",
859
+ "effect_counts",
860
+ "restored_from",
861
+ "restore_with_data",
862
+ "with_data",
863
+ "reverted_totals",
864
+ "source",
865
+ "doc"
866
+ ],
867
+ "additionalProperties": false,
868
+ "description": "One published version with its document."
869
+ }