@fleetless/contracts 13.3.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/CHANGELOG.md +304 -0
  2. package/artifacts/openapi.json +20156 -10513
  3. package/artifacts/routes.json +1429 -292
  4. package/artifacts/schema/access-warning.schema.json +51 -0
  5. package/artifacts/schema/action-config.schema.json +35 -0
  6. package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
  7. package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
  8. package/artifacts/schema/app-access-response.schema.json +136 -0
  9. package/artifacts/schema/app-access.schema.json +80 -0
  10. package/artifacts/schema/app-deletion-summary.schema.json +15 -8
  11. package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
  12. package/artifacts/schema/app-invitation.schema.json +5 -5
  13. package/artifacts/schema/app-list-response.schema.json +6 -6
  14. package/artifacts/schema/app-lock.schema.json +30 -0
  15. package/artifacts/schema/app-user-list-response.schema.json +13 -6
  16. package/artifacts/schema/app-user.schema.json +13 -6
  17. package/artifacts/schema/app.schema.json +6 -6
  18. package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
  19. package/artifacts/schema/auth-ok.schema.json +20 -6
  20. package/artifacts/schema/camera-list-response.schema.json +1 -1
  21. package/artifacts/schema/client-identity.schema.json +21 -6
  22. package/artifacts/schema/cloud-config.schema.json +359 -5
  23. package/artifacts/schema/collection-actor.schema.json +35 -0
  24. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  25. package/artifacts/schema/collection-event.schema.json +216 -0
  26. package/artifacts/schema/collection-export-query.schema.json +56 -0
  27. package/artifacts/schema/collection-filter.schema.json +9 -0
  28. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  29. package/artifacts/schema/collection-import-request.schema.json +105 -0
  30. package/artifacts/schema/collection-import-result.schema.json +38 -0
  31. package/artifacts/schema/collection-list-response.schema.json +119 -0
  32. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  33. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  34. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  35. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  36. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  37. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  38. package/artifacts/schema/collection-record-write.schema.json +31 -0
  39. package/artifacts/schema/collection-record.schema.json +180 -0
  40. package/artifacts/schema/collection-revision.schema.json +295 -0
  41. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  42. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  43. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  44. package/artifacts/schema/collection-summary.schema.json +92 -0
  45. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  46. package/artifacts/schema/collections-access-change.schema.json +34 -0
  47. package/artifacts/schema/collections-document.schema.json +732 -0
  48. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  49. package/artifacts/schema/collections-effect.schema.json +384 -0
  50. package/artifacts/schema/collections-issue.schema.json +36 -0
  51. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  52. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  53. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  54. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  55. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  56. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  57. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  58. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  59. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  60. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  61. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  62. package/artifacts/schema/collections-version-response.schema.json +869 -0
  63. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  64. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  65. package/artifacts/schema/config-draft-response.schema.json +359 -5
  66. package/artifacts/schema/config-version-response.schema.json +359 -5
  67. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  68. package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
  69. package/artifacts/schema/create-app-user-request.schema.json +4 -4
  70. package/artifacts/schema/create-org-role-request.schema.json +33 -0
  71. package/artifacts/schema/dangling-reference.schema.json +130 -0
  72. package/artifacts/schema/datapoint-config.schema.json +35 -0
  73. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  74. package/artifacts/schema/effective-capability.schema.json +104 -0
  75. package/artifacts/schema/effective-rights-query.schema.json +19 -0
  76. package/artifacts/schema/effective-rights-response.schema.json +396 -0
  77. package/artifacts/schema/effective-robot-rights.schema.json +266 -0
  78. package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
  79. package/artifacts/schema/invoke-response.schema.json +1 -1
  80. package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
  81. package/artifacts/schema/journal-intent-v2.schema.json +84 -0
  82. package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
  83. package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
  84. package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
  85. package/artifacts/schema/org-plan.schema.json +29 -1
  86. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  87. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  88. package/artifacts/schema/org-quotas.schema.json +29 -1
  89. package/artifacts/schema/org-role-list-response.schema.json +206 -0
  90. package/artifacts/schema/org-role.schema.json +59 -0
  91. package/artifacts/schema/patch-app-user-request.schema.json +4 -4
  92. package/artifacts/schema/patch-org-role-request.schema.json +38 -0
  93. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  94. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  95. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  96. package/artifacts/schema/plan-limits.schema.json +29 -1
  97. package/artifacts/schema/plan-overrides.schema.json +26 -0
  98. package/artifacts/schema/publish-config-response.schema.json +48 -1
  99. package/artifacts/schema/publisher-config.schema.json +35 -0
  100. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  101. package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
  102. package/artifacts/schema/record-changed-details.schema.json +16 -0
  103. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  104. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  105. package/artifacts/schema/reference-place.schema.json +112 -0
  106. package/artifacts/schema/rename-slug-response.schema.json +4 -3
  107. package/artifacts/schema/required-missing-details.schema.json +19 -0
  108. package/artifacts/schema/robot-config-doc.schema.json +359 -5
  109. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  110. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  111. package/artifacts/schema/role-cycle-details.schema.json +18 -0
  112. package/artifacts/schema/role-defaults-response.schema.json +59 -0
  113. package/artifacts/schema/role-rename-preview.schema.json +147 -0
  114. package/artifacts/schema/service-config.schema.json +35 -0
  115. package/artifacts/schema/slug-usage-response.schema.json +4 -3
  116. package/artifacts/schema/update-app-request.schema.json +0 -12
  117. package/dist/app-users.d.ts +11 -8
  118. package/dist/app-users.js +18 -10
  119. package/dist/apps.d.ts +258 -71
  120. package/dist/apps.js +215 -151
  121. package/dist/audit.d.ts +35 -5
  122. package/dist/audit.js +40 -2
  123. package/dist/billing.d.ts +10 -10
  124. package/dist/client-auth.d.ts +5 -2
  125. package/dist/client-auth.js +11 -3
  126. package/dist/client-robots.d.ts +1 -1
  127. package/dist/client-robots.js +1 -1
  128. package/dist/collections-issues.d.ts +67 -0
  129. package/dist/collections-issues.js +340 -0
  130. package/dist/collections-records.d.ts +562 -0
  131. package/dist/collections-records.js +525 -0
  132. package/dist/collections-rights.d.ts +17 -0
  133. package/dist/collections-rights.js +41 -0
  134. package/dist/collections-schema.d.ts +1064 -0
  135. package/dist/collections-schema.js +386 -0
  136. package/dist/collections-templates.d.ts +55 -0
  137. package/dist/collections-templates.js +137 -0
  138. package/dist/collections-transfer.d.ts +101 -0
  139. package/dist/collections-transfer.js +206 -0
  140. package/dist/collections-values.d.ts +67 -0
  141. package/dist/collections-values.js +284 -0
  142. package/dist/collections.d.ts +568 -0
  143. package/dist/collections.js +332 -0
  144. package/dist/common.d.ts +1 -1
  145. package/dist/common.js +1 -1
  146. package/dist/config-issues.d.ts +1 -1
  147. package/dist/config-issues.js +1 -1
  148. package/dist/config.d.ts +78 -12
  149. package/dist/config.js +109 -15
  150. package/dist/errors.d.ts +63 -5
  151. package/dist/errors.js +152 -24
  152. package/dist/index.d.ts +40 -14
  153. package/dist/index.js +27 -7
  154. package/dist/journal-intents.d.ts +30 -0
  155. package/dist/journal-intents.js +3 -0
  156. package/dist/legal-acceptances.d.ts +2 -2
  157. package/dist/mcp.d.ts +5 -37
  158. package/dist/mcp.js +4 -14
  159. package/dist/org-roles.d.ts +186 -0
  160. package/dist/org-roles.js +199 -0
  161. package/dist/plans.d.ts +25 -7
  162. package/dist/plans.js +21 -1
  163. package/dist/protocol.d.ts +19 -1
  164. package/dist/realtime.d.ts +172 -3
  165. package/dist/realtime.js +164 -1
  166. package/dist/rest.d.ts +104 -53
  167. package/dist/rest.js +79 -55
  168. package/dist/rights.d.ts +197 -0
  169. package/dist/rights.js +396 -0
  170. package/dist/routes.d.ts +1 -1
  171. package/dist/routes.js +675 -150
  172. package/package.json +1 -1
  173. package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
  174. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  175. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  176. package/artifacts/schema/robot-details-doc.schema.json +0 -33
  177. package/artifacts/schema/role-delete-query.schema.json +0 -13
  178. package/artifacts/schema/role-in-use-details.schema.json +0 -28
  179. package/artifacts/schema/role-list-response.schema.json +0 -48
  180. package/artifacts/schema/role-permissions.schema.json +0 -61
  181. package/artifacts/schema/role-rename-request.schema.json +0 -16
  182. package/artifacts/schema/role.schema.json +0 -35
@@ -0,0 +1,212 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "records": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "type": "string",
12
+ "format": "uuid",
13
+ "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)$"
14
+ },
15
+ "robot_id": {
16
+ "anyOf": [
17
+ {
18
+ "type": "string",
19
+ "format": "uuid",
20
+ "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)$"
21
+ },
22
+ {
23
+ "type": "null"
24
+ }
25
+ ],
26
+ "description": "The robot a record of a `per_robot` or `one_per_robot` collection belongs to; null in a `global` collection."
27
+ },
28
+ "created_at": {
29
+ "type": "string",
30
+ "format": "date-time",
31
+ "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))$"
32
+ },
33
+ "created_by": {
34
+ "type": "object",
35
+ "properties": {
36
+ "kind": {
37
+ "type": "string",
38
+ "enum": [
39
+ "developer",
40
+ "app_user",
41
+ "server_key",
42
+ "fleetless"
43
+ ],
44
+ "description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
45
+ },
46
+ "id": {
47
+ "type": "string",
48
+ "format": "uuid",
49
+ "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)$",
50
+ "description": "The id of the developer, app user or server key. The nil id for the platform."
51
+ },
52
+ "label": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 200,
56
+ "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."
57
+ }
58
+ },
59
+ "required": [
60
+ "kind",
61
+ "id",
62
+ "label"
63
+ ],
64
+ "additionalProperties": false,
65
+ "description": "Who or what made a change to a record."
66
+ },
67
+ "updated_at": {
68
+ "type": "string",
69
+ "format": "date-time",
70
+ "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))$"
71
+ },
72
+ "updated_by": {
73
+ "type": "object",
74
+ "properties": {
75
+ "kind": {
76
+ "type": "string",
77
+ "enum": [
78
+ "developer",
79
+ "app_user",
80
+ "server_key",
81
+ "fleetless"
82
+ ],
83
+ "description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
84
+ },
85
+ "id": {
86
+ "type": "string",
87
+ "format": "uuid",
88
+ "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)$",
89
+ "description": "The id of the developer, app user or server key. The nil id for the platform."
90
+ },
91
+ "label": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "maxLength": 200,
95
+ "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."
96
+ }
97
+ },
98
+ "required": [
99
+ "kind",
100
+ "id",
101
+ "label"
102
+ ],
103
+ "additionalProperties": false,
104
+ "description": "Who or what made a change to a record."
105
+ },
106
+ "revision": {
107
+ "type": "integer",
108
+ "minimum": 1,
109
+ "maximum": 9007199254740991,
110
+ "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."
111
+ },
112
+ "display": {
113
+ "type": "string",
114
+ "description": "The collection's display template filled in for this record."
115
+ },
116
+ "missing_required": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "string"
120
+ },
121
+ "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."
122
+ },
123
+ "values": {
124
+ "type": "object",
125
+ "propertyNames": {
126
+ "type": "string"
127
+ },
128
+ "additionalProperties": {},
129
+ "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."
130
+ },
131
+ "deleted_at": {
132
+ "type": "string",
133
+ "format": "date-time",
134
+ "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))$",
135
+ "description": "When the record was deleted. Present only in the list of deleted records (`deleted=true`); absent on a live record."
136
+ },
137
+ "deleted_by": {
138
+ "type": "object",
139
+ "properties": {
140
+ "kind": {
141
+ "type": "string",
142
+ "enum": [
143
+ "developer",
144
+ "app_user",
145
+ "server_key",
146
+ "fleetless"
147
+ ],
148
+ "description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
149
+ },
150
+ "id": {
151
+ "type": "string",
152
+ "format": "uuid",
153
+ "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)$",
154
+ "description": "The id of the developer, app user or server key. The nil id for the platform."
155
+ },
156
+ "label": {
157
+ "type": "string",
158
+ "minLength": 1,
159
+ "maxLength": 200,
160
+ "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."
161
+ }
162
+ },
163
+ "required": [
164
+ "kind",
165
+ "id",
166
+ "label"
167
+ ],
168
+ "additionalProperties": false,
169
+ "description": "Who deleted the record. Present only in the list of deleted records (`deleted=true`); absent on a live record."
170
+ }
171
+ },
172
+ "required": [
173
+ "id",
174
+ "robot_id",
175
+ "created_at",
176
+ "created_by",
177
+ "updated_at",
178
+ "updated_by",
179
+ "revision",
180
+ "display",
181
+ "values"
182
+ ],
183
+ "additionalProperties": false,
184
+ "description": "A record of a collection: its system fields and its values."
185
+ },
186
+ "description": "The records of the page. A page is cut short at 4 MiB of stored record values (for the list of deleted records, of the revisions that deleted them), so it can hold fewer than `limit` records while more follow. It always holds at least one record when there is one, and a list of ordinary size is never cut."
187
+ },
188
+ "next_cursor": {
189
+ "anyOf": [
190
+ {
191
+ "type": "string"
192
+ },
193
+ {
194
+ "type": "null"
195
+ }
196
+ ],
197
+ "description": "Send it as `cursor` to read the next page; it continues after the last record this page holds. Null when this is the last page, which a short page does not say on its own: only `null` says the list is at its end."
198
+ },
199
+ "total": {
200
+ "type": "integer",
201
+ "minimum": 0,
202
+ "maximum": 9007199254740991,
203
+ "description": "The number of records that match, sent only when `count=true` was asked for. A page cut short does not change it."
204
+ }
205
+ },
206
+ "required": [
207
+ "records",
208
+ "next_cursor"
209
+ ],
210
+ "additionalProperties": false,
211
+ "description": "One page of records."
212
+ }
@@ -0,0 +1,14 @@
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": "Put the record back to its state after this revision. Leave it out to restore a deleted record."
10
+ }
11
+ },
12
+ "additionalProperties": false,
13
+ "description": "The body of a record restore."
14
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "values": {
6
+ "type": "object",
7
+ "propertyNames": {
8
+ "type": "string"
9
+ },
10
+ "additionalProperties": {},
11
+ "description": "The fields to set by key. A `null` clears a field. On an update, fields that are left out keep their value. A record may hold 1,048,576 bytes of values as JSON; more is `400 validation_error`, field `values`, rule `record_too_large`, and so is a request body of more than 2 MiB."
12
+ },
13
+ "robot_id": {
14
+ "type": "string",
15
+ "format": "uuid",
16
+ "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)$",
17
+ "description": "The robot of a new record in a collection that belongs to robots. Fixed once the record exists."
18
+ },
19
+ "expected_revision": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "maximum": 9007199254740991,
23
+ "description": "The revision you last read. The write is refused with `record_changed` if the record has moved on."
24
+ }
25
+ },
26
+ "required": [
27
+ "values"
28
+ ],
29
+ "additionalProperties": false,
30
+ "description": "The body of a record create or update."
31
+ }
@@ -0,0 +1,180 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "format": "uuid",
8
+ "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)$"
9
+ },
10
+ "robot_id": {
11
+ "anyOf": [
12
+ {
13
+ "type": "string",
14
+ "format": "uuid",
15
+ "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)$"
16
+ },
17
+ {
18
+ "type": "null"
19
+ }
20
+ ],
21
+ "description": "The robot a record of a `per_robot` or `one_per_robot` collection belongs to; null in a `global` collection."
22
+ },
23
+ "created_at": {
24
+ "type": "string",
25
+ "format": "date-time",
26
+ "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))$"
27
+ },
28
+ "created_by": {
29
+ "type": "object",
30
+ "properties": {
31
+ "kind": {
32
+ "type": "string",
33
+ "enum": [
34
+ "developer",
35
+ "app_user",
36
+ "server_key",
37
+ "fleetless"
38
+ ],
39
+ "description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
40
+ },
41
+ "id": {
42
+ "type": "string",
43
+ "format": "uuid",
44
+ "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)$",
45
+ "description": "The id of the developer, app user or server key. The nil id for the platform."
46
+ },
47
+ "label": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 200,
51
+ "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."
52
+ }
53
+ },
54
+ "required": [
55
+ "kind",
56
+ "id",
57
+ "label"
58
+ ],
59
+ "additionalProperties": false,
60
+ "description": "Who or what made a change to a record."
61
+ },
62
+ "updated_at": {
63
+ "type": "string",
64
+ "format": "date-time",
65
+ "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))$"
66
+ },
67
+ "updated_by": {
68
+ "type": "object",
69
+ "properties": {
70
+ "kind": {
71
+ "type": "string",
72
+ "enum": [
73
+ "developer",
74
+ "app_user",
75
+ "server_key",
76
+ "fleetless"
77
+ ],
78
+ "description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
79
+ },
80
+ "id": {
81
+ "type": "string",
82
+ "format": "uuid",
83
+ "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)$",
84
+ "description": "The id of the developer, app user or server key. The nil id for the platform."
85
+ },
86
+ "label": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "maxLength": 200,
90
+ "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."
91
+ }
92
+ },
93
+ "required": [
94
+ "kind",
95
+ "id",
96
+ "label"
97
+ ],
98
+ "additionalProperties": false,
99
+ "description": "Who or what made a change to a record."
100
+ },
101
+ "revision": {
102
+ "type": "integer",
103
+ "minimum": 1,
104
+ "maximum": 9007199254740991,
105
+ "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."
106
+ },
107
+ "display": {
108
+ "type": "string",
109
+ "description": "The collection's display template filled in for this record."
110
+ },
111
+ "missing_required": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string"
115
+ },
116
+ "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."
117
+ },
118
+ "values": {
119
+ "type": "object",
120
+ "propertyNames": {
121
+ "type": "string"
122
+ },
123
+ "additionalProperties": {},
124
+ "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."
125
+ },
126
+ "deleted_at": {
127
+ "type": "string",
128
+ "format": "date-time",
129
+ "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))$",
130
+ "description": "When the record was deleted. Present only in the list of deleted records (`deleted=true`); absent on a live record."
131
+ },
132
+ "deleted_by": {
133
+ "type": "object",
134
+ "properties": {
135
+ "kind": {
136
+ "type": "string",
137
+ "enum": [
138
+ "developer",
139
+ "app_user",
140
+ "server_key",
141
+ "fleetless"
142
+ ],
143
+ "description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
144
+ },
145
+ "id": {
146
+ "type": "string",
147
+ "format": "uuid",
148
+ "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)$",
149
+ "description": "The id of the developer, app user or server key. The nil id for the platform."
150
+ },
151
+ "label": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "maxLength": 200,
155
+ "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."
156
+ }
157
+ },
158
+ "required": [
159
+ "kind",
160
+ "id",
161
+ "label"
162
+ ],
163
+ "additionalProperties": false,
164
+ "description": "Who deleted the record. Present only in the list of deleted records (`deleted=true`); absent on a live record."
165
+ }
166
+ },
167
+ "required": [
168
+ "id",
169
+ "robot_id",
170
+ "created_at",
171
+ "created_by",
172
+ "updated_at",
173
+ "updated_by",
174
+ "revision",
175
+ "display",
176
+ "values"
177
+ ],
178
+ "additionalProperties": false,
179
+ "description": "A record of a collection: its system fields and its values."
180
+ }