@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,295 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"seq": {
|
|
6
|
+
"type": "integer",
|
|
7
|
+
"exclusiveMinimum": 0,
|
|
8
|
+
"maximum": 9007199254740991,
|
|
9
|
+
"description": "The position of this revision in the history. Use it to page (`before_seq`) and to restore (`seq`)."
|
|
10
|
+
},
|
|
11
|
+
"op": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"create",
|
|
15
|
+
"update",
|
|
16
|
+
"delete",
|
|
17
|
+
"restore"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"at": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "date-time",
|
|
23
|
+
"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))$"
|
|
24
|
+
},
|
|
25
|
+
"actor": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"kind": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": [
|
|
31
|
+
"developer",
|
|
32
|
+
"app_user",
|
|
33
|
+
"server_key",
|
|
34
|
+
"fleetless"
|
|
35
|
+
],
|
|
36
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
37
|
+
},
|
|
38
|
+
"id": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "uuid",
|
|
41
|
+
"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)$",
|
|
42
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
43
|
+
},
|
|
44
|
+
"label": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"maxLength": 200,
|
|
48
|
+
"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."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": [
|
|
52
|
+
"kind",
|
|
53
|
+
"id",
|
|
54
|
+
"label"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"description": "Who or what made a change to a record."
|
|
58
|
+
},
|
|
59
|
+
"reason": {
|
|
60
|
+
"anyOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "null"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"description": "Why a change was made when it was not an ordinary write: `schema v5`, `import`, `restore v4`. Null otherwise."
|
|
69
|
+
},
|
|
70
|
+
"revision": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"minimum": 1,
|
|
73
|
+
"maximum": 9007199254740991,
|
|
74
|
+
"description": "The record's revision number after this change."
|
|
75
|
+
},
|
|
76
|
+
"changes": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"propertyNames": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"old": {},
|
|
85
|
+
"new": {}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"old",
|
|
89
|
+
"new"
|
|
90
|
+
],
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
},
|
|
93
|
+
"description": "The fields this change touched by key, each with its value before and after. `null` means no value."
|
|
94
|
+
},
|
|
95
|
+
"record": {
|
|
96
|
+
"anyOf": [
|
|
97
|
+
{
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"id": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"format": "uuid",
|
|
103
|
+
"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)$"
|
|
104
|
+
},
|
|
105
|
+
"robot_id": {
|
|
106
|
+
"anyOf": [
|
|
107
|
+
{
|
|
108
|
+
"type": "string",
|
|
109
|
+
"format": "uuid",
|
|
110
|
+
"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)$"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "null"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"description": "The robot a record of a `per_robot` or `one_per_robot` collection belongs to; null in a `global` collection."
|
|
117
|
+
},
|
|
118
|
+
"created_at": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"format": "date-time",
|
|
121
|
+
"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))$"
|
|
122
|
+
},
|
|
123
|
+
"created_by": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"kind": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"enum": [
|
|
129
|
+
"developer",
|
|
130
|
+
"app_user",
|
|
131
|
+
"server_key",
|
|
132
|
+
"fleetless"
|
|
133
|
+
],
|
|
134
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
135
|
+
},
|
|
136
|
+
"id": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"format": "uuid",
|
|
139
|
+
"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)$",
|
|
140
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
141
|
+
},
|
|
142
|
+
"label": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"minLength": 1,
|
|
145
|
+
"maxLength": 200,
|
|
146
|
+
"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."
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": [
|
|
150
|
+
"kind",
|
|
151
|
+
"id",
|
|
152
|
+
"label"
|
|
153
|
+
],
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"description": "Who or what made a change to a record."
|
|
156
|
+
},
|
|
157
|
+
"updated_at": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"format": "date-time",
|
|
160
|
+
"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))$"
|
|
161
|
+
},
|
|
162
|
+
"updated_by": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"kind": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"enum": [
|
|
168
|
+
"developer",
|
|
169
|
+
"app_user",
|
|
170
|
+
"server_key",
|
|
171
|
+
"fleetless"
|
|
172
|
+
],
|
|
173
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
174
|
+
},
|
|
175
|
+
"id": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"format": "uuid",
|
|
178
|
+
"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)$",
|
|
179
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
180
|
+
},
|
|
181
|
+
"label": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1,
|
|
184
|
+
"maxLength": 200,
|
|
185
|
+
"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."
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"required": [
|
|
189
|
+
"kind",
|
|
190
|
+
"id",
|
|
191
|
+
"label"
|
|
192
|
+
],
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"description": "Who or what made a change to a record."
|
|
195
|
+
},
|
|
196
|
+
"revision": {
|
|
197
|
+
"type": "integer",
|
|
198
|
+
"minimum": 1,
|
|
199
|
+
"maximum": 9007199254740991,
|
|
200
|
+
"description": "Starts at 1 and grows by one with every change. Send it as `expected_revision` to refuse a write that would overwrite a newer one."
|
|
201
|
+
},
|
|
202
|
+
"display": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"description": "The collection's display template filled in for this record."
|
|
205
|
+
},
|
|
206
|
+
"missing_required": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"items": {
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
"description": "Required fields that are empty because the schema changed after the record was written. The record can still be updated in its other fields. Absent when nothing is missing."
|
|
212
|
+
},
|
|
213
|
+
"values": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"propertyNames": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"additionalProperties": {},
|
|
219
|
+
"description": "The record's fields by key. A field without a value is absent. With `expand`, a reference field holds the referenced record in this same shape instead of its id, when the caller may read that collection."
|
|
220
|
+
},
|
|
221
|
+
"deleted_at": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"format": "date-time",
|
|
224
|
+
"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))$",
|
|
225
|
+
"description": "When the record was deleted. Present only in the list of deleted records (`deleted=true`); absent on a live record."
|
|
226
|
+
},
|
|
227
|
+
"deleted_by": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"properties": {
|
|
230
|
+
"kind": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"enum": [
|
|
233
|
+
"developer",
|
|
234
|
+
"app_user",
|
|
235
|
+
"server_key",
|
|
236
|
+
"fleetless"
|
|
237
|
+
],
|
|
238
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
239
|
+
},
|
|
240
|
+
"id": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"format": "uuid",
|
|
243
|
+
"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)$",
|
|
244
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
245
|
+
},
|
|
246
|
+
"label": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"minLength": 1,
|
|
249
|
+
"maxLength": 200,
|
|
250
|
+
"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."
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"required": [
|
|
254
|
+
"kind",
|
|
255
|
+
"id",
|
|
256
|
+
"label"
|
|
257
|
+
],
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"description": "Who deleted the record. Present only in the list of deleted records (`deleted=true`); absent on a live record."
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"required": [
|
|
263
|
+
"id",
|
|
264
|
+
"robot_id",
|
|
265
|
+
"created_at",
|
|
266
|
+
"created_by",
|
|
267
|
+
"updated_at",
|
|
268
|
+
"updated_by",
|
|
269
|
+
"revision",
|
|
270
|
+
"display",
|
|
271
|
+
"values"
|
|
272
|
+
],
|
|
273
|
+
"additionalProperties": false,
|
|
274
|
+
"description": "A record of a collection: its system fields and its values."
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"type": "null"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"description": "The whole record, on a `delete` revision. Null on every other operation."
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"required": [
|
|
284
|
+
"seq",
|
|
285
|
+
"op",
|
|
286
|
+
"at",
|
|
287
|
+
"actor",
|
|
288
|
+
"reason",
|
|
289
|
+
"revision",
|
|
290
|
+
"changes",
|
|
291
|
+
"record"
|
|
292
|
+
],
|
|
293
|
+
"additionalProperties": false,
|
|
294
|
+
"description": "One change in the history of a record."
|
|
295
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "collection_subscribe_error"
|
|
8
|
+
},
|
|
9
|
+
"request_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The `request_id` of the subscription, as the client sent it."
|
|
12
|
+
},
|
|
13
|
+
"code": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"description": "A stable error code, as in REST; `unauthorized` is also possible here, for a subscribe sent before `auth`."
|
|
17
|
+
},
|
|
18
|
+
"message": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"type",
|
|
25
|
+
"request_id",
|
|
26
|
+
"code",
|
|
27
|
+
"message"
|
|
28
|
+
],
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"description": "A collection subscription was refused or has ended."
|
|
31
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "collection_subscribe"
|
|
8
|
+
},
|
|
9
|
+
"request_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"maxLength": 64,
|
|
13
|
+
"description": "Chosen by the client, unique among the collection subscriptions open on this socket: a `request_id` that is already in use is refused with `validation_error`. Every frame about the subscription carries it."
|
|
14
|
+
},
|
|
15
|
+
"app_id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uuid",
|
|
18
|
+
"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)$",
|
|
19
|
+
"description": "The app whose collection to follow. Required on the connection of a developer, whose token belongs to the organization and so to no app: without it the subscribe is refused with `validation_error`. On the connection of an app user or a server key it can be left out, because the token names the app; if it is sent, it must be that app, otherwise `validation_error`. An app that does not exist or belongs to another organization is answered `collection_not_found`."
|
|
20
|
+
},
|
|
21
|
+
"collection": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
24
|
+
"description": "The key of the collection."
|
|
25
|
+
},
|
|
26
|
+
"robot_id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"format": "uuid",
|
|
29
|
+
"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)$",
|
|
30
|
+
"description": "Only the records of this robot, in a collection that belongs to robots."
|
|
31
|
+
},
|
|
32
|
+
"filter": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"propertyNames": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": {},
|
|
38
|
+
"description": "Only records matching this filter are delivered, with the grammar of the `filter` of the record list but as an object, not JSON text. The whole frame is at most 16,384 bytes; a larger frame closes the socket with code 1009 (message too big) instead of being answered, so a filter with many long values may not fit."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": [
|
|
42
|
+
"type",
|
|
43
|
+
"request_id",
|
|
44
|
+
"collection"
|
|
45
|
+
],
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"description": "Subscribes to the changes of the records of one collection. The cloud answers an accepted subscription with `collection_subscribed` and a refused one with `collection_subscribe_error`."
|
|
48
|
+
}
|
|
@@ -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": "collection_subscribed"
|
|
8
|
+
},
|
|
9
|
+
"request_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"maxLength": 64,
|
|
13
|
+
"description": "The `request_id` of the subscription that is now registered."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"type",
|
|
18
|
+
"request_id"
|
|
19
|
+
],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"description": "A collection subscription is registered: every change it covers is delivered from now on."
|
|
22
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"key": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
8
|
+
"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."
|
|
9
|
+
},
|
|
10
|
+
"label": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"binding": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": [
|
|
16
|
+
"global",
|
|
17
|
+
"per_robot",
|
|
18
|
+
"one_per_robot"
|
|
19
|
+
],
|
|
20
|
+
"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."
|
|
21
|
+
},
|
|
22
|
+
"records": {
|
|
23
|
+
"type": "integer",
|
|
24
|
+
"minimum": 0,
|
|
25
|
+
"maximum": 9007199254740991,
|
|
26
|
+
"description": "Records the collection holds now."
|
|
27
|
+
},
|
|
28
|
+
"fields": {
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"minimum": 0,
|
|
31
|
+
"maximum": 9007199254740991
|
|
32
|
+
},
|
|
33
|
+
"read_roles": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"description": "The roles that may read the records."
|
|
39
|
+
},
|
|
40
|
+
"warnings": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": [
|
|
45
|
+
"no_role_access",
|
|
46
|
+
"history_growing",
|
|
47
|
+
"unknown_role"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"description": "`no_role_access`: no role may read these records. `unknown_role`: `access` names a role the organization does not have. `history_growing`: the history is far larger than the records, which often means a client writing in a loop."
|
|
51
|
+
},
|
|
52
|
+
"revisions": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"minimum": 0,
|
|
55
|
+
"maximum": 9007199254740991,
|
|
56
|
+
"description": "Entries in the history of all the collection's records."
|
|
57
|
+
},
|
|
58
|
+
"history_bytes": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 0,
|
|
61
|
+
"maximum": 9007199254740991,
|
|
62
|
+
"description": "The size of that history in bytes."
|
|
63
|
+
},
|
|
64
|
+
"updated_at": {
|
|
65
|
+
"anyOf": [
|
|
66
|
+
{
|
|
67
|
+
"type": "string",
|
|
68
|
+
"format": "date-time",
|
|
69
|
+
"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))$"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "null"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"description": "When a record of the collection last changed. Null if it never held one."
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"key",
|
|
80
|
+
"label",
|
|
81
|
+
"binding",
|
|
82
|
+
"records",
|
|
83
|
+
"fields",
|
|
84
|
+
"read_roles",
|
|
85
|
+
"warnings",
|
|
86
|
+
"revisions",
|
|
87
|
+
"history_bytes",
|
|
88
|
+
"updated_at"
|
|
89
|
+
],
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"description": "A collection as the developer's overview shows it."
|
|
92
|
+
}
|
|
@@ -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": "collection_unsubscribe"
|
|
8
|
+
},
|
|
9
|
+
"request_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"maxLength": 64,
|
|
13
|
+
"description": "The `request_id` of the subscription to end."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"type",
|
|
18
|
+
"request_id"
|
|
19
|
+
],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"description": "Ends a collection subscription."
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"collection": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
8
|
+
"description": "The key of the collection."
|
|
9
|
+
},
|
|
10
|
+
"action": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": [
|
|
13
|
+
"read",
|
|
14
|
+
"create",
|
|
15
|
+
"update",
|
|
16
|
+
"delete"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"from": {
|
|
20
|
+
"description": "The access before, as written in the document. `null` means nobody."
|
|
21
|
+
},
|
|
22
|
+
"to": {
|
|
23
|
+
"description": "The access after, as written in the document. `null` means nobody."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": [
|
|
27
|
+
"collection",
|
|
28
|
+
"action",
|
|
29
|
+
"from",
|
|
30
|
+
"to"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"description": "A change of the roles that may do one thing with the records of a collection. Information only; it does not need confirming."
|
|
34
|
+
}
|