@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.
- package/CHANGELOG.md +304 -0
- package/artifacts/openapi.json +20156 -10513
- package/artifacts/routes.json +1429 -292
- package/artifacts/schema/access-warning.schema.json +51 -0
- package/artifacts/schema/action-config.schema.json +35 -0
- package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
- package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
- package/artifacts/schema/app-access-response.schema.json +136 -0
- package/artifacts/schema/app-access.schema.json +80 -0
- package/artifacts/schema/app-deletion-summary.schema.json +15 -8
- package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
- package/artifacts/schema/app-invitation.schema.json +5 -5
- package/artifacts/schema/app-list-response.schema.json +6 -6
- package/artifacts/schema/app-lock.schema.json +30 -0
- package/artifacts/schema/app-user-list-response.schema.json +13 -6
- package/artifacts/schema/app-user.schema.json +13 -6
- package/artifacts/schema/app.schema.json +6 -6
- package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
- package/artifacts/schema/auth-ok.schema.json +20 -6
- package/artifacts/schema/camera-list-response.schema.json +1 -1
- package/artifacts/schema/client-identity.schema.json +21 -6
- package/artifacts/schema/cloud-config.schema.json +359 -5
- package/artifacts/schema/collection-actor.schema.json +35 -0
- package/artifacts/schema/collection-definitions-response.schema.json +612 -0
- package/artifacts/schema/collection-event.schema.json +216 -0
- package/artifacts/schema/collection-export-query.schema.json +56 -0
- package/artifacts/schema/collection-filter.schema.json +9 -0
- package/artifacts/schema/collection-import-preview.schema.json +143 -0
- package/artifacts/schema/collection-import-request.schema.json +105 -0
- package/artifacts/schema/collection-import-result.schema.json +38 -0
- package/artifacts/schema/collection-list-response.schema.json +119 -0
- package/artifacts/schema/collection-record-get-query.schema.json +12 -0
- package/artifacts/schema/collection-record-history-query.schema.json +35 -0
- package/artifacts/schema/collection-record-history-response.schema.json +389 -0
- package/artifacts/schema/collection-record-list-query.schema.json +67 -0
- package/artifacts/schema/collection-record-list-response.schema.json +212 -0
- package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
- package/artifacts/schema/collection-record-write.schema.json +31 -0
- package/artifacts/schema/collection-record.schema.json +180 -0
- package/artifacts/schema/collection-revision.schema.json +295 -0
- package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
- package/artifacts/schema/collection-subscribe.schema.json +48 -0
- package/artifacts/schema/collection-subscribed.schema.json +22 -0
- package/artifacts/schema/collection-summary.schema.json +92 -0
- package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
- package/artifacts/schema/collections-access-change.schema.json +34 -0
- package/artifacts/schema/collections-document.schema.json +732 -0
- package/artifacts/schema/collections-draft-response.schema.json +845 -0
- package/artifacts/schema/collections-effect.schema.json +384 -0
- package/artifacts/schema/collections-issue.schema.json +36 -0
- package/artifacts/schema/collections-publish-request.schema.json +18 -0
- package/artifacts/schema/collections-publish-response.schema.json +450 -0
- package/artifacts/schema/collections-purge-preview.schema.json +60 -0
- package/artifacts/schema/collections-purge-request.schema.json +27 -0
- package/artifacts/schema/collections-purge-response.schema.json +30 -0
- package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
- package/artifacts/schema/collections-restore-preview.schema.json +581 -0
- package/artifacts/schema/collections-restore-request.schema.json +27 -0
- package/artifacts/schema/collections-restore-response.schema.json +455 -0
- package/artifacts/schema/collections-schema-preview.schema.json +519 -0
- package/artifacts/schema/collections-schema-published.schema.json +22 -0
- package/artifacts/schema/collections-version-response.schema.json +869 -0
- package/artifacts/schema/collections-version-summary.schema.json +139 -0
- package/artifacts/schema/collections-versions-response.schema.json +167 -0
- package/artifacts/schema/config-draft-response.schema.json +359 -5
- package/artifacts/schema/config-version-response.schema.json +359 -5
- package/artifacts/schema/confirmation-required-details.schema.json +13 -0
- package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
- package/artifacts/schema/create-app-user-request.schema.json +4 -4
- package/artifacts/schema/create-org-role-request.schema.json +33 -0
- package/artifacts/schema/dangling-reference.schema.json +130 -0
- package/artifacts/schema/datapoint-config.schema.json +35 -0
- package/artifacts/schema/datapoint-list-response.schema.json +2 -2
- package/artifacts/schema/effective-capability.schema.json +104 -0
- package/artifacts/schema/effective-rights-query.schema.json +19 -0
- package/artifacts/schema/effective-rights-response.schema.json +396 -0
- package/artifacts/schema/effective-robot-rights.schema.json +266 -0
- package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
- package/artifacts/schema/invoke-response.schema.json +1 -1
- package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
- package/artifacts/schema/journal-intent-v2.schema.json +84 -0
- package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
- package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
- package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
- package/artifacts/schema/org-plan.schema.json +29 -1
- package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
- package/artifacts/schema/org-quota-usage.schema.json +47 -1
- package/artifacts/schema/org-quotas.schema.json +29 -1
- package/artifacts/schema/org-role-list-response.schema.json +206 -0
- package/artifacts/schema/org-role.schema.json +59 -0
- package/artifacts/schema/patch-app-user-request.schema.json +4 -4
- package/artifacts/schema/patch-org-role-request.schema.json +38 -0
- package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
- package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
- package/artifacts/schema/plan-limit-details.schema.json +3 -1
- package/artifacts/schema/plan-limits.schema.json +29 -1
- package/artifacts/schema/plan-overrides.schema.json +26 -0
- package/artifacts/schema/publish-config-response.schema.json +48 -1
- package/artifacts/schema/publisher-config.schema.json +35 -0
- package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
- package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
- package/artifacts/schema/record-changed-details.schema.json +16 -0
- package/artifacts/schema/record-referenced-details.schema.json +35 -0
- package/artifacts/schema/reference-invalid-details.schema.json +25 -0
- package/artifacts/schema/reference-place.schema.json +112 -0
- package/artifacts/schema/rename-slug-response.schema.json +4 -3
- package/artifacts/schema/required-missing-details.schema.json +19 -0
- package/artifacts/schema/robot-config-doc.schema.json +359 -5
- package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
- package/artifacts/schema/role-collection-rights.schema.json +82 -0
- package/artifacts/schema/role-cycle-details.schema.json +18 -0
- package/artifacts/schema/role-defaults-response.schema.json +59 -0
- package/artifacts/schema/role-rename-preview.schema.json +147 -0
- package/artifacts/schema/service-config.schema.json +35 -0
- package/artifacts/schema/slug-usage-response.schema.json +4 -3
- package/artifacts/schema/update-app-request.schema.json +0 -12
- package/dist/app-users.d.ts +11 -8
- package/dist/app-users.js +18 -10
- package/dist/apps.d.ts +258 -71
- package/dist/apps.js +215 -151
- package/dist/audit.d.ts +35 -5
- package/dist/audit.js +40 -2
- package/dist/billing.d.ts +10 -10
- package/dist/client-auth.d.ts +5 -2
- package/dist/client-auth.js +11 -3
- package/dist/client-robots.d.ts +1 -1
- package/dist/client-robots.js +1 -1
- package/dist/collections-issues.d.ts +67 -0
- package/dist/collections-issues.js +340 -0
- package/dist/collections-records.d.ts +562 -0
- package/dist/collections-records.js +525 -0
- package/dist/collections-rights.d.ts +17 -0
- package/dist/collections-rights.js +41 -0
- package/dist/collections-schema.d.ts +1064 -0
- package/dist/collections-schema.js +386 -0
- package/dist/collections-templates.d.ts +55 -0
- package/dist/collections-templates.js +137 -0
- package/dist/collections-transfer.d.ts +101 -0
- package/dist/collections-transfer.js +206 -0
- package/dist/collections-values.d.ts +67 -0
- package/dist/collections-values.js +284 -0
- package/dist/collections.d.ts +568 -0
- package/dist/collections.js +332 -0
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config-issues.d.ts +1 -1
- package/dist/config-issues.js +1 -1
- package/dist/config.d.ts +78 -12
- package/dist/config.js +109 -15
- package/dist/errors.d.ts +63 -5
- package/dist/errors.js +152 -24
- package/dist/index.d.ts +40 -14
- package/dist/index.js +27 -7
- package/dist/journal-intents.d.ts +30 -0
- package/dist/journal-intents.js +3 -0
- package/dist/legal-acceptances.d.ts +2 -2
- package/dist/mcp.d.ts +5 -37
- package/dist/mcp.js +4 -14
- package/dist/org-roles.d.ts +186 -0
- package/dist/org-roles.js +199 -0
- package/dist/plans.d.ts +25 -7
- package/dist/plans.js +21 -1
- package/dist/protocol.d.ts +19 -1
- package/dist/realtime.d.ts +172 -3
- package/dist/realtime.js +164 -1
- package/dist/rest.d.ts +104 -53
- package/dist/rest.js +79 -55
- package/dist/rights.d.ts +197 -0
- package/dist/rights.js +396 -0
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +675 -150
- package/package.json +1 -1
- package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
- package/artifacts/schema/put-robot-details-request.schema.json +0 -41
- package/artifacts/schema/put-robot-details-response.schema.json +0 -43
- package/artifacts/schema/robot-details-doc.schema.json +0 -33
- package/artifacts/schema/role-delete-query.schema.json +0 -13
- package/artifacts/schema/role-in-use-details.schema.json +0 -28
- package/artifacts/schema/role-list-response.schema.json +0 -48
- package/artifacts/schema/role-permissions.schema.json +0 -61
- package/artifacts/schema/role-rename-request.schema.json +0 -16
- package/artifacts/schema/role.schema.json +0 -35
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"from_version": {
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "integer",
|
|
9
|
+
"minimum": 1,
|
|
10
|
+
"maximum": 9007199254740991
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "null"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"description": "The version that is published now. Null before the first publish."
|
|
17
|
+
},
|
|
18
|
+
"to_version": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": 1,
|
|
21
|
+
"maximum": 9007199254740991,
|
|
22
|
+
"description": "The number the new version would get."
|
|
23
|
+
},
|
|
24
|
+
"valid": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "False when the draft has errors; it cannot be published and no effects are computed."
|
|
27
|
+
},
|
|
28
|
+
"issues": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"path": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"description": "Where in the document, with dots between the keys: `collections.chargers.fields.location.to`."
|
|
37
|
+
},
|
|
38
|
+
"code": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "A stable name for the kind of finding, for code to branch on."
|
|
41
|
+
},
|
|
42
|
+
"message": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "What is wrong, in a sentence for a person."
|
|
45
|
+
},
|
|
46
|
+
"severity": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"error",
|
|
50
|
+
"warning",
|
|
51
|
+
"info"
|
|
52
|
+
],
|
|
53
|
+
"description": "An error makes the document invalid and it cannot be saved or published. A warning and information leave it valid."
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": [
|
|
57
|
+
"path",
|
|
58
|
+
"code",
|
|
59
|
+
"message",
|
|
60
|
+
"severity"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"description": "One finding about a collections document."
|
|
64
|
+
},
|
|
65
|
+
"description": "Everything found in the draft: errors that block publishing, warnings and information."
|
|
66
|
+
},
|
|
67
|
+
"effects": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"oneOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"kind": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"const": "collection_removed"
|
|
77
|
+
},
|
|
78
|
+
"collection": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
81
|
+
"description": "The key of the collection."
|
|
82
|
+
},
|
|
83
|
+
"records": {
|
|
84
|
+
"type": "integer",
|
|
85
|
+
"minimum": 0,
|
|
86
|
+
"maximum": 9007199254740991,
|
|
87
|
+
"description": "Records deleted with the collection."
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"kind",
|
|
92
|
+
"collection",
|
|
93
|
+
"records"
|
|
94
|
+
],
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"description": "The collection is gone from the document, so its records are deleted. Their history is deleted 90 days after the publish or restore that removed the collection, also when it held no records any more by then; until then a restore of an earlier version with its data can bring the records back."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"kind": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"const": "collection_recreated"
|
|
104
|
+
},
|
|
105
|
+
"collection": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
108
|
+
"description": "The key of the collection."
|
|
109
|
+
},
|
|
110
|
+
"records": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"minimum": 0,
|
|
113
|
+
"maximum": 9007199254740991,
|
|
114
|
+
"description": "Records deleted by the re-creation."
|
|
115
|
+
},
|
|
116
|
+
"from": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"enum": [
|
|
119
|
+
"global",
|
|
120
|
+
"per_robot",
|
|
121
|
+
"one_per_robot"
|
|
122
|
+
],
|
|
123
|
+
"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."
|
|
124
|
+
},
|
|
125
|
+
"to": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"enum": [
|
|
128
|
+
"global",
|
|
129
|
+
"per_robot",
|
|
130
|
+
"one_per_robot"
|
|
131
|
+
],
|
|
132
|
+
"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."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": [
|
|
136
|
+
"kind",
|
|
137
|
+
"collection",
|
|
138
|
+
"records",
|
|
139
|
+
"from",
|
|
140
|
+
"to"
|
|
141
|
+
],
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"description": "The binding of the collection changed, which deletes its records and starts the collection again. The history of the deleted records is kept 90 days after the publish or restore, as for a removed collection."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "object",
|
|
147
|
+
"properties": {
|
|
148
|
+
"kind": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"const": "records_created"
|
|
151
|
+
},
|
|
152
|
+
"collection": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
155
|
+
"description": "The key of the collection."
|
|
156
|
+
},
|
|
157
|
+
"count": {
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"minimum": 0,
|
|
160
|
+
"maximum": 9007199254740991,
|
|
161
|
+
"description": "Records created, one for each robot attached to the app."
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"kind",
|
|
166
|
+
"collection",
|
|
167
|
+
"count"
|
|
168
|
+
],
|
|
169
|
+
"additionalProperties": false,
|
|
170
|
+
"description": "A collection with one record per robot got the records of the robots that have none."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"type": "object",
|
|
174
|
+
"properties": {
|
|
175
|
+
"kind": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"const": "field_removed"
|
|
178
|
+
},
|
|
179
|
+
"collection": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
182
|
+
"description": "The key of the collection."
|
|
183
|
+
},
|
|
184
|
+
"field": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
187
|
+
"description": "The key of the field."
|
|
188
|
+
},
|
|
189
|
+
"values": {
|
|
190
|
+
"type": "integer",
|
|
191
|
+
"minimum": 0,
|
|
192
|
+
"maximum": 9007199254740991,
|
|
193
|
+
"description": "Values removed from records."
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"required": [
|
|
197
|
+
"kind",
|
|
198
|
+
"collection",
|
|
199
|
+
"field",
|
|
200
|
+
"values"
|
|
201
|
+
],
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"description": "The field is gone from the document, so its values are removed from the records."
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"type": "object",
|
|
207
|
+
"properties": {
|
|
208
|
+
"kind": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"const": "defaults_filled"
|
|
211
|
+
},
|
|
212
|
+
"collection": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
215
|
+
"description": "The key of the collection."
|
|
216
|
+
},
|
|
217
|
+
"field": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
220
|
+
"description": "The key of the field."
|
|
221
|
+
},
|
|
222
|
+
"records": {
|
|
223
|
+
"type": "integer",
|
|
224
|
+
"minimum": 0,
|
|
225
|
+
"maximum": 9007199254740991,
|
|
226
|
+
"description": "Records that receive the default."
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"required": [
|
|
230
|
+
"kind",
|
|
231
|
+
"collection",
|
|
232
|
+
"field",
|
|
233
|
+
"records"
|
|
234
|
+
],
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"description": "Records without a value get the default of a new or newly required field."
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "object",
|
|
240
|
+
"properties": {
|
|
241
|
+
"kind": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"const": "values_converted"
|
|
244
|
+
},
|
|
245
|
+
"collection": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
248
|
+
"description": "The key of the collection."
|
|
249
|
+
},
|
|
250
|
+
"field": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
253
|
+
"description": "The key of the field."
|
|
254
|
+
},
|
|
255
|
+
"converted": {
|
|
256
|
+
"type": "integer",
|
|
257
|
+
"minimum": 0,
|
|
258
|
+
"maximum": 9007199254740991,
|
|
259
|
+
"description": "Values that became a value of the new type."
|
|
260
|
+
},
|
|
261
|
+
"discarded": {
|
|
262
|
+
"type": "integer",
|
|
263
|
+
"minimum": 0,
|
|
264
|
+
"maximum": 9007199254740991,
|
|
265
|
+
"description": "Values that could not be converted and were removed."
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": [
|
|
269
|
+
"kind",
|
|
270
|
+
"collection",
|
|
271
|
+
"field",
|
|
272
|
+
"converted",
|
|
273
|
+
"discarded"
|
|
274
|
+
],
|
|
275
|
+
"additionalProperties": false,
|
|
276
|
+
"description": "The type of the field changed: values are converted where the conversion rules allow it and removed where they do not."
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"type": "object",
|
|
280
|
+
"properties": {
|
|
281
|
+
"kind": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"const": "values_discarded"
|
|
284
|
+
},
|
|
285
|
+
"collection": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
288
|
+
"description": "The key of the collection."
|
|
289
|
+
},
|
|
290
|
+
"field": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
293
|
+
"description": "The key of the field."
|
|
294
|
+
},
|
|
295
|
+
"reason": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"enum": [
|
|
298
|
+
"reference_target_changed",
|
|
299
|
+
"option_removed",
|
|
300
|
+
"constraint"
|
|
301
|
+
],
|
|
302
|
+
"description": "`reference_target_changed`: the field points at another collection now. `option_removed`: a select option is gone. `constraint`: a limit such as `max_length`, `pattern`, `min`, `max`, `integer` or the JSON schema now excludes the value."
|
|
303
|
+
},
|
|
304
|
+
"values": {
|
|
305
|
+
"type": "integer",
|
|
306
|
+
"minimum": 0,
|
|
307
|
+
"maximum": 9007199254740991,
|
|
308
|
+
"description": "Values removed from records."
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"required": [
|
|
312
|
+
"kind",
|
|
313
|
+
"collection",
|
|
314
|
+
"field",
|
|
315
|
+
"reason",
|
|
316
|
+
"values"
|
|
317
|
+
],
|
|
318
|
+
"additionalProperties": false,
|
|
319
|
+
"description": "Values that the changed field no longer accepts are removed."
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"type": "object",
|
|
323
|
+
"properties": {
|
|
324
|
+
"kind": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"const": "unique_discarded"
|
|
327
|
+
},
|
|
328
|
+
"collection": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
331
|
+
"description": "The key of the collection."
|
|
332
|
+
},
|
|
333
|
+
"field": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
336
|
+
"description": "The key of the field."
|
|
337
|
+
},
|
|
338
|
+
"total": {
|
|
339
|
+
"type": "integer",
|
|
340
|
+
"minimum": 0,
|
|
341
|
+
"maximum": 9007199254740991,
|
|
342
|
+
"description": "The exact number of values removed."
|
|
343
|
+
},
|
|
344
|
+
"records": {
|
|
345
|
+
"maxItems": 1000,
|
|
346
|
+
"type": "array",
|
|
347
|
+
"items": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"properties": {
|
|
350
|
+
"id": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"format": "uuid",
|
|
353
|
+
"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)$"
|
|
354
|
+
},
|
|
355
|
+
"display": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "The record's display text."
|
|
358
|
+
},
|
|
359
|
+
"value": {
|
|
360
|
+
"description": "The value the record loses."
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"required": [
|
|
364
|
+
"id",
|
|
365
|
+
"display",
|
|
366
|
+
"value"
|
|
367
|
+
],
|
|
368
|
+
"additionalProperties": false
|
|
369
|
+
},
|
|
370
|
+
"description": "The records that lose their value, at most 1000; `total` is the exact number."
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"required": [
|
|
374
|
+
"kind",
|
|
375
|
+
"collection",
|
|
376
|
+
"field",
|
|
377
|
+
"total",
|
|
378
|
+
"records"
|
|
379
|
+
],
|
|
380
|
+
"additionalProperties": false,
|
|
381
|
+
"description": "The field became unique, or unique across a wider scope, and records share a value: the record created first keeps it and the others lose it."
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"type": "object",
|
|
385
|
+
"properties": {
|
|
386
|
+
"kind": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"const": "required_left_empty"
|
|
389
|
+
},
|
|
390
|
+
"collection": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
393
|
+
"description": "The key of the collection."
|
|
394
|
+
},
|
|
395
|
+
"field": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
398
|
+
"description": "The key of the field."
|
|
399
|
+
},
|
|
400
|
+
"records": {
|
|
401
|
+
"type": "integer",
|
|
402
|
+
"minimum": 0,
|
|
403
|
+
"maximum": 9007199254740991,
|
|
404
|
+
"description": "Records left without a value."
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"required": [
|
|
408
|
+
"kind",
|
|
409
|
+
"collection",
|
|
410
|
+
"field",
|
|
411
|
+
"records"
|
|
412
|
+
],
|
|
413
|
+
"additionalProperties": false,
|
|
414
|
+
"description": "The field is required now and these records have no value and no default to fill in; they stay updatable in their other fields."
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"type": "object",
|
|
418
|
+
"properties": {
|
|
419
|
+
"kind": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"const": "references_cleared"
|
|
422
|
+
},
|
|
423
|
+
"collection": {
|
|
424
|
+
"type": "string",
|
|
425
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
426
|
+
"description": "The key of the collection."
|
|
427
|
+
},
|
|
428
|
+
"field": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
431
|
+
"description": "The key of the field."
|
|
432
|
+
},
|
|
433
|
+
"values": {
|
|
434
|
+
"type": "integer",
|
|
435
|
+
"minimum": 0,
|
|
436
|
+
"maximum": 9007199254740991,
|
|
437
|
+
"description": "References removed."
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"required": [
|
|
441
|
+
"kind",
|
|
442
|
+
"collection",
|
|
443
|
+
"field",
|
|
444
|
+
"values"
|
|
445
|
+
],
|
|
446
|
+
"additionalProperties": false,
|
|
447
|
+
"description": "References that pointed at records deleted by this change are cleared."
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"description": "One effect of a publish or restore on existing data. Effects that would change nothing are not listed."
|
|
451
|
+
},
|
|
452
|
+
"description": "What would happen to existing data, computed against the data as it is now."
|
|
453
|
+
},
|
|
454
|
+
"access_changes": {
|
|
455
|
+
"type": "array",
|
|
456
|
+
"items": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"properties": {
|
|
459
|
+
"collection": {
|
|
460
|
+
"type": "string",
|
|
461
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
462
|
+
"description": "The key of the collection."
|
|
463
|
+
},
|
|
464
|
+
"action": {
|
|
465
|
+
"type": "string",
|
|
466
|
+
"enum": [
|
|
467
|
+
"read",
|
|
468
|
+
"create",
|
|
469
|
+
"update",
|
|
470
|
+
"delete"
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
"from": {
|
|
474
|
+
"description": "The access before, as written in the document. `null` means nobody."
|
|
475
|
+
},
|
|
476
|
+
"to": {
|
|
477
|
+
"description": "The access after, as written in the document. `null` means nobody."
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"required": [
|
|
481
|
+
"collection",
|
|
482
|
+
"action",
|
|
483
|
+
"from",
|
|
484
|
+
"to"
|
|
485
|
+
],
|
|
486
|
+
"additionalProperties": false,
|
|
487
|
+
"description": "A change of the roles that may do one thing with the records of a collection. Information only; it does not need confirming."
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
"source_sha256": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
493
|
+
"description": "The SHA-256 of the draft text this preview is for (UTF-8, lowercase hex). Send it as `source_sha256` when publishing to publish exactly this draft, also when there are no effects and so no token."
|
|
494
|
+
},
|
|
495
|
+
"token": {
|
|
496
|
+
"anyOf": [
|
|
497
|
+
{
|
|
498
|
+
"type": "string"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"type": "null"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
"description": "Stands for exactly this list of effects, on exactly this draft text and the version in force now: send it as `confirm` when publishing. If the draft was saved again, or the data or the version changed, the token no longer holds. Null when there are no effects, since publishing then needs no confirmation."
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"required": [
|
|
508
|
+
"from_version",
|
|
509
|
+
"to_version",
|
|
510
|
+
"valid",
|
|
511
|
+
"issues",
|
|
512
|
+
"effects",
|
|
513
|
+
"access_changes",
|
|
514
|
+
"source_sha256",
|
|
515
|
+
"token"
|
|
516
|
+
],
|
|
517
|
+
"additionalProperties": false,
|
|
518
|
+
"description": "The preview of publishing the draft: its problems, its effects on existing data and the token that confirms them."
|
|
519
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "collections_schema_published"
|
|
8
|
+
},
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "integer",
|
|
11
|
+
"minimum": 1,
|
|
12
|
+
"maximum": 9007199254740991,
|
|
13
|
+
"description": "The version that is in force now."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"type",
|
|
18
|
+
"version"
|
|
19
|
+
],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"description": "A new schema version is in force for the app."
|
|
22
|
+
}
|