@fleetless/contracts 14.0.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 (119) hide show
  1. package/CHANGELOG.md +163 -0
  2. package/artifacts/openapi.json +19842 -11398
  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/cloud-config.schema.json +5 -5
  9. package/artifacts/schema/collection-actor.schema.json +35 -0
  10. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  11. package/artifacts/schema/collection-event.schema.json +216 -0
  12. package/artifacts/schema/collection-export-query.schema.json +56 -0
  13. package/artifacts/schema/collection-filter.schema.json +9 -0
  14. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  15. package/artifacts/schema/collection-import-request.schema.json +105 -0
  16. package/artifacts/schema/collection-import-result.schema.json +38 -0
  17. package/artifacts/schema/collection-list-response.schema.json +119 -0
  18. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  19. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  20. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  21. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  22. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  23. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  24. package/artifacts/schema/collection-record-write.schema.json +31 -0
  25. package/artifacts/schema/collection-record.schema.json +180 -0
  26. package/artifacts/schema/collection-revision.schema.json +295 -0
  27. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  28. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  29. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  30. package/artifacts/schema/collection-summary.schema.json +92 -0
  31. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  32. package/artifacts/schema/collections-access-change.schema.json +34 -0
  33. package/artifacts/schema/collections-document.schema.json +732 -0
  34. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  35. package/artifacts/schema/collections-effect.schema.json +384 -0
  36. package/artifacts/schema/collections-issue.schema.json +36 -0
  37. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  38. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  39. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  40. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  41. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  42. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  43. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  44. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  45. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  46. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  47. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  48. package/artifacts/schema/collections-version-response.schema.json +869 -0
  49. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  50. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  51. package/artifacts/schema/config-draft-response.schema.json +5 -5
  52. package/artifacts/schema/config-version-response.schema.json +5 -5
  53. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  54. package/artifacts/schema/dangling-reference.schema.json +7 -6
  55. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  56. package/artifacts/schema/effective-rights-response.schema.json +87 -1
  57. package/artifacts/schema/org-plan.schema.json +29 -1
  58. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  59. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  60. package/artifacts/schema/org-quotas.schema.json +29 -1
  61. package/artifacts/schema/org-role-list-response.schema.json +8 -7
  62. package/artifacts/schema/org-role.schema.json +1 -1
  63. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  64. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  65. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  66. package/artifacts/schema/plan-limits.schema.json +29 -1
  67. package/artifacts/schema/plan-overrides.schema.json +26 -0
  68. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  69. package/artifacts/schema/record-changed-details.schema.json +16 -0
  70. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  71. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  72. package/artifacts/schema/reference-place.schema.json +7 -6
  73. package/artifacts/schema/required-missing-details.schema.json +19 -0
  74. package/artifacts/schema/robot-config-doc.schema.json +5 -5
  75. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  76. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  77. package/artifacts/schema/role-rename-preview.schema.json +7 -6
  78. package/dist/apps.d.ts +18 -2
  79. package/dist/apps.js +12 -2
  80. package/dist/audit.d.ts +32 -2
  81. package/dist/audit.js +40 -2
  82. package/dist/collections-issues.d.ts +67 -0
  83. package/dist/collections-issues.js +340 -0
  84. package/dist/collections-records.d.ts +562 -0
  85. package/dist/collections-records.js +525 -0
  86. package/dist/collections-rights.d.ts +17 -0
  87. package/dist/collections-rights.js +41 -0
  88. package/dist/collections-schema.d.ts +1064 -0
  89. package/dist/collections-schema.js +386 -0
  90. package/dist/collections-templates.d.ts +55 -0
  91. package/dist/collections-templates.js +137 -0
  92. package/dist/collections-transfer.d.ts +101 -0
  93. package/dist/collections-transfer.js +206 -0
  94. package/dist/collections-values.d.ts +67 -0
  95. package/dist/collections-values.js +284 -0
  96. package/dist/collections.d.ts +568 -0
  97. package/dist/collections.js +332 -0
  98. package/dist/config.d.ts +8 -8
  99. package/dist/config.js +13 -13
  100. package/dist/errors.d.ts +50 -1
  101. package/dist/errors.js +115 -0
  102. package/dist/index.d.ts +24 -8
  103. package/dist/index.js +13 -3
  104. package/dist/org-roles.d.ts +4 -0
  105. package/dist/org-roles.js +10 -9
  106. package/dist/plans.d.ts +19 -1
  107. package/dist/plans.js +21 -1
  108. package/dist/realtime.d.ts +166 -0
  109. package/dist/realtime.js +163 -0
  110. package/dist/rest.d.ts +28 -28
  111. package/dist/rest.js +39 -27
  112. package/dist/rights.d.ts +2 -2
  113. package/dist/rights.js +1 -1
  114. package/dist/routes.d.ts +1 -1
  115. package/dist/routes.js +495 -21
  116. package/package.json +1 -1
  117. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  118. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  119. package/artifacts/schema/robot-details-doc.schema.json +0 -33
@@ -31,6 +31,24 @@
31
31
  "type": "integer",
32
32
  "minimum": 0,
33
33
  "maximum": 9007199254740991
34
+ },
35
+ "collection_records": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 9007199254740991,
39
+ "description": "Current records in the app collections of all the org's apps. Deleted records do not count."
40
+ },
41
+ "collection_bytes": {
42
+ "type": "integer",
43
+ "minimum": 0,
44
+ "maximum": 9007199254740991,
45
+ "description": "Bytes the current records of the org's app collections occupy, as stored JSON."
46
+ },
47
+ "collection_history_bytes": {
48
+ "type": "integer",
49
+ "minimum": 0,
50
+ "maximum": 9007199254740991,
51
+ "description": "Bytes the history of the org's app collections occupies: revisions of current and deleted records. Information only; no limit applies to it."
34
52
  }
35
53
  },
36
54
  "additionalProperties": false
@@ -34,6 +34,32 @@
34
34
  "type": "integer",
35
35
  "exclusiveMinimum": 0,
36
36
  "maximum": 9007199254740991
37
+ },
38
+ "collection_records": {
39
+ "anyOf": [
40
+ {
41
+ "type": "integer",
42
+ "exclusiveMinimum": 0,
43
+ "maximum": 9007199254740991
44
+ },
45
+ {
46
+ "type": "null"
47
+ }
48
+ ],
49
+ "description": "The most records the app collections of all the org's apps may hold together: the plan limit `collection_records`, or the operator's override of it. `null` is by contract (Enterprise)."
50
+ },
51
+ "collection_bytes": {
52
+ "anyOf": [
53
+ {
54
+ "type": "integer",
55
+ "exclusiveMinimum": 0,
56
+ "maximum": 9007199254740991
57
+ },
58
+ {
59
+ "type": "null"
60
+ }
61
+ ],
62
+ "description": "The most bytes the current records of the org's app collections may occupy together: the plan limit `collection_bytes`, or the operator's override of it. `null` is by contract (Enterprise)."
37
63
  }
38
64
  },
39
65
  "required": [
@@ -42,7 +68,9 @@
42
68
  "max_end_users",
43
69
  "max_retention_bytes",
44
70
  "max_retention_writes_per_minute",
45
- "max_realtime_connections"
71
+ "max_realtime_connections",
72
+ "collection_records",
73
+ "collection_bytes"
46
74
  ],
47
75
  "additionalProperties": false
48
76
  },
@@ -78,6 +106,24 @@
78
106
  "type": "integer",
79
107
  "minimum": 0,
80
108
  "maximum": 9007199254740991
109
+ },
110
+ "collection_records": {
111
+ "type": "integer",
112
+ "minimum": 0,
113
+ "maximum": 9007199254740991,
114
+ "description": "Current records in the app collections of all the org's apps. Deleted records do not count."
115
+ },
116
+ "collection_bytes": {
117
+ "type": "integer",
118
+ "minimum": 0,
119
+ "maximum": 9007199254740991,
120
+ "description": "Bytes the current records of the org's app collections occupy, as stored JSON."
121
+ },
122
+ "collection_history_bytes": {
123
+ "type": "integer",
124
+ "minimum": 0,
125
+ "maximum": 9007199254740991,
126
+ "description": "Bytes the history of the org's app collections occupies: revisions of current and deleted records. Information only; no limit applies to it."
81
127
  }
82
128
  },
83
129
  "additionalProperties": false
@@ -31,6 +31,32 @@
31
31
  "type": "integer",
32
32
  "exclusiveMinimum": 0,
33
33
  "maximum": 9007199254740991
34
+ },
35
+ "collection_records": {
36
+ "anyOf": [
37
+ {
38
+ "type": "integer",
39
+ "exclusiveMinimum": 0,
40
+ "maximum": 9007199254740991
41
+ },
42
+ {
43
+ "type": "null"
44
+ }
45
+ ],
46
+ "description": "The most records the app collections of all the org's apps may hold together: the plan limit `collection_records`, or the operator's override of it. `null` is by contract (Enterprise)."
47
+ },
48
+ "collection_bytes": {
49
+ "anyOf": [
50
+ {
51
+ "type": "integer",
52
+ "exclusiveMinimum": 0,
53
+ "maximum": 9007199254740991
54
+ },
55
+ {
56
+ "type": "null"
57
+ }
58
+ ],
59
+ "description": "The most bytes the current records of the org's app collections may occupy together: the plan limit `collection_bytes`, or the operator's override of it. `null` is by contract (Enterprise)."
34
60
  }
35
61
  },
36
62
  "required": [
@@ -39,7 +65,9 @@
39
65
  "max_end_users",
40
66
  "max_retention_bytes",
41
67
  "max_retention_writes_per_minute",
42
- "max_realtime_connections"
68
+ "max_realtime_connections",
69
+ "collection_records",
70
+ "collection_bytes"
43
71
  ],
44
72
  "additionalProperties": false
45
73
  }
@@ -48,7 +48,7 @@
48
48
  "type": "integer",
49
49
  "minimum": 0,
50
50
  "maximum": 9007199254740991,
51
- "description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml`. A rename with `update_references` rewrites them."
51
+ "description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml` or an `access` entry in an app's collections schema. A rename with `update_references` rewrites them."
52
52
  }
53
53
  },
54
54
  "required": [
@@ -82,17 +82,18 @@
82
82
  "type": "string",
83
83
  "enum": [
84
84
  "config",
85
+ "collection_schema",
85
86
  "app_user",
86
87
  "invitation",
87
88
  "app_default",
88
89
  "role_inherits",
89
90
  "org_default"
90
91
  ],
91
- "description": "What writes the key: `config` is a `role` or `access` value in a robot's `fleetless.yaml`, `app_user` an app user who holds it, `invitation` an invitation that carries it, `app_default` an app's default role, `role_inherits` another role that inherits from it, and `org_default` one of the organization's defaults."
92
+ "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."
92
93
  },
93
94
  "label": {
94
95
  "type": "string",
95
- "description": "What a person reads to find the place: the robot name (`config`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the app name (`app_default`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`)."
96
+ "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`)."
96
97
  },
97
98
  "path": {
98
99
  "anyOf": [
@@ -103,7 +104,7 @@
103
104
  "type": "null"
104
105
  }
105
106
  ],
106
- "description": "Where the key is written. For `config`, the place in the YAML, such as `services.arm_home.role` or `access.rules[1].role`; for `role_inherits`, the key of the role that inherits from it, because display names are not unique; `null` for every other kind."
107
+ "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."
107
108
  },
108
109
  "robot_id": {
109
110
  "anyOf": [
@@ -129,7 +130,7 @@
129
130
  "type": "null"
130
131
  }
131
132
  ],
132
- "description": "The app the user, invitation or default role belongs to (`app_user`, `invitation`, `app_default`); `null` for every other kind."
133
+ "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."
133
134
  },
134
135
  "user_id": {
135
136
  "anyOf": [
@@ -157,7 +158,7 @@
157
158
  "type": "null"
158
159
  }
159
160
  ],
160
- "description": "Which version of the robot's document holds the key (`config`): the published one or the draft; `null` for every other kind."
161
+ "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."
161
162
  },
162
163
  "new_version": {
163
164
  "anyOf": [
@@ -170,7 +171,7 @@
170
171
  "type": "null"
171
172
  }
172
173
  ],
173
- "description": "For a published document, the version number a rename with `update_references` would give it, a copy that differs only in the key; `null` for a draft and for every place that is no document."
174
+ "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."
174
175
  }
175
176
  },
176
177
  "required": [
@@ -43,7 +43,7 @@
43
43
  "type": "integer",
44
44
  "minimum": 0,
45
45
  "maximum": 9007199254740991,
46
- "description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml`. A rename with `update_references` rewrites them."
46
+ "description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml` or an `access` entry in an app's collections schema. A rename with `update_references` rewrites them."
47
47
  }
48
48
  },
49
49
  "required": [
@@ -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
@@ -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,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
+ }
@@ -6,17 +6,18 @@
6
6
  "type": "string",
7
7
  "enum": [
8
8
  "config",
9
+ "collection_schema",
9
10
  "app_user",
10
11
  "invitation",
11
12
  "app_default",
12
13
  "role_inherits",
13
14
  "org_default"
14
15
  ],
15
- "description": "What writes the key: `config` is a `role` or `access` value in a robot's `fleetless.yaml`, `app_user` an app user who holds it, `invitation` an invitation that carries it, `app_default` an app's default role, `role_inherits` another role that inherits from it, and `org_default` one of the organization's defaults."
16
+ "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."
16
17
  },
17
18
  "label": {
18
19
  "type": "string",
19
- "description": "What a person reads to find the place: the robot name (`config`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the app name (`app_default`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`)."
20
+ "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`)."
20
21
  },
21
22
  "path": {
22
23
  "anyOf": [
@@ -27,7 +28,7 @@
27
28
  "type": "null"
28
29
  }
29
30
  ],
30
- "description": "Where the key is written. For `config`, the place in the YAML, such as `services.arm_home.role` or `access.rules[1].role`; for `role_inherits`, the key of the role that inherits from it, because display names are not unique; `null` for every other kind."
31
+ "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."
31
32
  },
32
33
  "robot_id": {
33
34
  "anyOf": [
@@ -53,7 +54,7 @@
53
54
  "type": "null"
54
55
  }
55
56
  ],
56
- "description": "The app the user, invitation or default role belongs to (`app_user`, `invitation`, `app_default`); `null` for every other kind."
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."
57
58
  },
58
59
  "user_id": {
59
60
  "anyOf": [
@@ -81,7 +82,7 @@
81
82
  "type": "null"
82
83
  }
83
84
  ],
84
- "description": "Which version of the robot's document holds the key (`config`): the published one or the draft; `null` for every other kind."
85
+ "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."
85
86
  },
86
87
  "new_version": {
87
88
  "anyOf": [
@@ -94,7 +95,7 @@
94
95
  "type": "null"
95
96
  }
96
97
  ],
97
- "description": "For a published document, the version number a rename with `update_references` would give it, a copy that differs only in the key; `null` for a draft and for every place that is no document."
98
+ "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."
98
99
  }
99
100
  },
100
101
  "required": [
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "fields": {
6
+ "minItems": 1,
7
+ "type": "array",
8
+ "items": {
9
+ "type": "string",
10
+ "minLength": 1
11
+ },
12
+ "description": "The keys of the required fields that have no value."
13
+ }
14
+ },
15
+ "required": [
16
+ "fields"
17
+ ],
18
+ "additionalProperties": false
19
+ }
@@ -465,7 +465,7 @@
465
465
  }
466
466
  ]
467
467
  },
468
- "description": "Values the robot publishes, each one field of one topic or a whole topic, and **never several topics**. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` and `robot_details` are built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all five are refused when the document is validated.",
468
+ "description": "Values the robot publishes, each one field of one topic or a whole topic, and **never several topics**. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` is built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all four are refused when the document is validated.",
469
469
  "defaultSnippets": [
470
470
  {
471
471
  "label": "a datapoint",
@@ -748,7 +748,7 @@
748
748
  }
749
749
  ]
750
750
  },
751
- "description": "Things the robot does on request that take time, each reported as a job with progress. **At most one job runs per action slug**: a second call is refused `busy`, and every observer of that slug watches the same job. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` and `robot_details` are built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all five are refused when the document is validated.",
751
+ "description": "Things the robot does on request that take time, each reported as a job with progress. **At most one job runs per action slug**: a second call is refused `busy`, and every observer of that slug watches the same job. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` is built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all four are refused when the document is validated.",
752
752
  "defaultSnippets": [
753
753
  {
754
754
  "label": "an action",
@@ -1004,7 +1004,7 @@
1004
1004
  }
1005
1005
  ]
1006
1006
  },
1007
- "description": "ROS service calls the robot answers — one request, one reply. Unlike an action a service reports **no progress** and the call returns with its result already on the job, so there is nothing left to observe; a second concurrent call is still refused `busy`, exactly as for an action. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` and `robot_details` are built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all five are refused when the document is validated.",
1007
+ "description": "ROS service calls the robot answers — one request, one reply. Unlike an action a service reports **no progress** and the call returns with its result already on the job, so there is nothing left to observe; a second concurrent call is still refused `busy`, exactly as for an action. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` is built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all four are refused when the document is validated.",
1008
1008
  "defaultSnippets": [
1009
1009
  {
1010
1010
  "label": "a service",
@@ -1347,7 +1347,7 @@
1347
1347
  }
1348
1348
  ]
1349
1349
  },
1350
- "description": "Topics clients may send to, and where the format's whole safety story lives. The `message` template fixes every value a caller cannot change, and **`failsafe` is required**: once a client falls silent the bridge sends the failsafe message itself, so an operator whose window closed does not leave a robot driving. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` and `robot_details` are built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all five are refused when the document is validated.",
1350
+ "description": "Topics clients may send to, and where the format's whole safety story lives. The `message` template fixes every value a caller cannot change, and **`failsafe` is required**: once a client falls silent the bridge sends the failsafe message itself, so an operator whose window closed does not leave a robot driving. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` is built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all four are refused when the document is validated.",
1351
1351
  "defaultSnippets": [
1352
1352
  {
1353
1353
  "label": "a publisher, with its parameters and its failsafe",
@@ -1766,7 +1766,7 @@
1766
1766
  }
1767
1767
  ]
1768
1768
  },
1769
- "description": "Video the robot streams, and the still frames the cloud serves from it. `width`, `height`, `fps` and `bitrate_kbps` are what **the bridge produces before sending**, not what the camera captures — they live in the configuration rather than in a viewer's request precisely so that no viewer can make a robot send more. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` and `robot_details` are built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all five are refused when the document is validated.",
1769
+ "description": "Video the robot streams, and the still frames the cloud serves from it. `width`, `height`, `fps` and `bitrate_kbps` are what **the bridge produces before sending**, not what the camera captures — they live in the configuration rather than in a viewer's request precisely so that no viewer can make a robot send more. Keys are slugs, one namespace across all five exposure sections, which is what lets an app lock name `{robot, slug}` without naming a kind; `bridge_state` is built-in, `history` is reserved because `GET …/jobs/history` would shadow an action of that name, and `assets` and `job_history` are reserved because they name the robot-level capabilities; all four are refused when the document is validated.",
1770
1770
  "defaultSnippets": [
1771
1771
  {
1772
1772
  "label": "a camera",